Garrett D'Amore wrote: > Roland Mainz wrote: > > Bob Friesenhahn wrote: > >> On Fri, 10 Jul 2009, Roland Mainz wrote: > >>> Does anyone know where the default buffer size for pipes (e.g. $ ulimit > >>> -p #) is defined and how it can be changed (or turned into a system > >>> tuneable) ? The current default of 5120 bytes is AFAIK not always > >>> optimal (originally defined when systems only had single-byte locales, > >>> with the rise of multibyte locales the number of _characters_ which can > >>> be buffered shrunk a lot) and a larger buffer size may be nice... > >>> > >> Some applications may misbehave or lock-up if the size of the pipe > >> buffer is changed. > > > > Erm... why ? > > > >> It seems rather dangerous to change it > >> system-wide. > > > > Well, my final goal was to make it an rlimit tuneable (e.g. $ ulimit -p > > <newpipesize> #) ... in the meantime I found that the fifofs (pipes go > > through fifofs) simply uses |PIPE_BUF| which is defined as |5120| ... > > ... the question is now whether we can add a new member to |fifonode_t| > > which is initalised based on the rlimit values and used instead of the > > hardcoded |PIPE_BUF|. > > Why not allow applications to issue an ioctl to change the pipe buffer > size? The shell could do this directly.
Erm... then we would need another non-standard API for this, right ? I really would prefer which can be used with the existing APIs (e.g. |rlimit()|&co.) and doesn't require to patch every shell... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.ma...@nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org