On Wed, Jun 16, 2010 at 12:05:21PM +0200, Graham Leggett wrote:
> On 16 Jun 2010, at 10:45 AM, Joe Orton wrote:
> 
> >>There is already mod_buffer in trunk. From reading the docs, it
> >>should
> >>be suitable for this purpose. Or is it missing some functionality?
> >
> >You can get many of the benefits of using a memory buffer in the
> >output
> >filter chain very cheaply by increasing SendBufferSize, without the
> >extra overhead of an extra filter.
> 
> This won't help you when you have many small file buckets, which is
> what you get when you put a forest of mod_include directives into a
> file. Each of the (in our worst case 500 or so) file buckets is
> happily sent out using SENDFILE, one after the other, in tiny chunks
> on the wire. This same problem can occur in any dynamic application
> doing a lot of small writes.

The core output filter should coalesce "small" writes already and if 
it's not doing that effeciently that's a bug.  Are the "tiny" files you 
were seeing getting sendfile()d out bigger than AP_MIN_SENDFILE_BYTES?  
That sounds like a case for bumping up AP_MIN_SENDFILE_BYTES.

Regards, Joe

Reply via email to