httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject Re: mod_file_cache performance
Date Tue, 03 Jul 2001 01:11:58 GMT
On Mon, 2 Jul 2001, dean gaudet wrote:

> oh that's bad.

Thanks for the explanation...

> sendfile() is the best thing to use on linux (and probably everywhere else
> that has it).  it doesn't require any virt->phys mappings to be created,
> and supports zero-copy.

I guess the easy answer is that AP_MIN_BYTES_TO_WRITE ought to be
decreased (possibly by a lot).  It's currently set to 8KB.  If it were,
say, 1KB, then any file bigger than 1KB would get sendfile'd, even in
keepalive requests.  We've been talking about changing it for a while now,
and just haven't gotten around to it because no one (that I know of) has
done any testing to figure out what a "good" value would be.  How many
bytes is "enough" to warrant dumping a packet onto the network?  I don't
know for sure, but it's clearly < 8KB.

Another option is to increase MMAP_THRESHOLD in apr_buckets_file.c
(currently 1 byte except on SUNOS4, where it's 8KB), though that's only
helpful if reading into a buffer is cheaper on a given system than calling

> wasn't this how apache 2.0 worked on linux prior to the filters/buckets?

I really couldn't say.  I've only been around as long as the buckets,
which is, I suppose, why I've spent so much time focusing on them.  My
knowledge of Apache's internals (beyond the module author's level) prior
to buckets is slim to none and Slim just left town, as a buddy of mine
would say.  =-)


   Cliff Woolley
   Charlottesville, VA

View raw message