httpd-dev mailing list archives

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

> On Mon, 2 Jul 2001, dean gaudet wrote:
> > 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.

you don't need to dump a packet on the network... that's what TCP_CORK is
all about.  see <> and search for TCP_CORK
to find out more info.

the trick to using TCP_CORK is to understand how the haldduplex /
safe_read stuff worked in 1.3 -- every time you're in need of blocking on
read (to get more requests) you want to pop the cork.  you want to put a
new cork on before you write anything.

also, i seem to be confused -- your earlier description made it sound like
sendfile() wasn't ever used.


View raw message