httpd-dev mailing list archives

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

> you don't need to dump a packet on the network... that's what TCP_CORK is
> all about.  see <http://www.kegel.com/c10k.html> 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.

I'll look into that.  Any guesses then as to what might be a good value
for AP_MIN_BYTES_TO_WRITE?  I'm willing to believe that it might want to
be a platform-dependent value...


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

Sorry for the confusion.  For NON-keepalive requests of static files,
sendfile() will always be used, regardless of file size.  For keepalive
requests, sendfile() will be used if and only if the file size + header
size is >= AP_MIN_BYTES_TO_WRITE.  If it's less than that, the file will
be mmap'ed and sent with writev() when enough requests have come along to
total AP_MIN_BYTES_TO_WRITE.

For non-static files, sendfile() will be used when bits of the original
file are left in the output stream and the output stream is >=
AP_MIN_BYTES_TO_WRITE.  I think.

That's my understanding.  Somebody please correct me if I've gone astray
somewhere.

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA




Mime
View raw message