This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PING] Avoid excessive buffer size in libio
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 30 Nov 2016 16:14:04 -0500
- Subject: Re: [PING] Avoid excessive buffer size in libio
- Authentication-results: sourceware.org; auth=none
- References: <56E17C8E.1070209@redhat.com> <20160311215230.B5AF32C3C1E@topped-with-meat.com> <56E69B9D.3000808@redhat.com> <20160318225258.7D1852C3C60@topped-with-meat.com> <56FCF883.4050506@redhat.com> <dd5e4979-233b-76ea-806f-75422571fd6a@redhat.com> <43220417-5ad0-e127-363f-7b34827cf6cc@redhat.com> <6d4ae393-e904-8845-f6ad-0b4e65b3ac9d@redhat.com> <5279be24-0e54-f288-5171-0fb19a5e27d4@redhat.com> <55f9feb0-fe42-5a44-8196-0facc3cf3ec2@redhat.com>
On 11/30/2016 08:17 AM, Florian Weimer wrote:
> They can still install their own buffer, yes.
The only tradeoff I see is that you're making wasteful
write syscalls while the kernel waits for enough data
to optimally send to the target device.
You really have to know a lot about your device to have
enough information to do this optimally.
xstat()
https://lwn.net/Articles/686106/
~~~
Howells noted that Dave Chinner wanted more I/O
parameters (e.g. preferred read and write sizes,
erase block size). There were five to seven
different numbers that Chinner wanted, but those
could always be added later, he said.
~~~
And the sysfs information is useless for my SATA disks...
[carlos@athas ~]$ cat /sys/block/sda/queue/optimal_io_size
0
So we aren't yet at any kind of utopia where there is
enough information to make the right choice. Even then
the "right" choice depends on what you're trying to do
e.g. small write, large write, throughput, low-latency etc.
--
Cheers,
Carlos.