This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING] Avoid excessive buffer size in libio


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]