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: [PATCH] libio: Always use _IO_BUFSIZE for stream buffers [BZ #4099]


On 03/11/2016 10:52 PM, Roland McGrath wrote:
> Justify with clear rationale.

It fixes bug 4099.  We need an arbitrary limit for that.

The libstdc++ buffer size is 8192 (or 8191), so this makes buffering
more consistent across the system.

The PostgreSQL people did extensive benchmarks to determine their
block/page size, and settled for a 8192 (but they do not use stdio
streams, for obvious reasons).

<stdio.h> documents BUFSIZ as the default buffer size. The new
implementation matches that.

Additional memory consumption is limited because file descriptors are a
scarce resource.

I can do some benchmarking, but I don't expect any compelling results.

Florian


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