httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Sutherland <ja...@cam.ac.uk>
Subject Re: AP_MIN_SENDFILE_BYTES
Date Fri, 02 Feb 2001 16:01:06 GMT
On Fri, 2 Feb 2001 rbb@covalent.net wrote:

> > read()+write() for "normal" GETs on tiny files
> > sendfile() on "normal" GETs on bigger files
> > mmap()+writev() for multiple byteranges, whatever the size
> 
> When I talk about read, I expect us to use writev, so we will merge
> packets. 

Yes - will multiple small reads be merged, though?

If we get a request like bytes 1-5, 10-20, 25-75..., unless the read is
merged into a single bigger read, mmap() will probably be the winner
there. Just fault in the first page, and access directly.

Of course, logic to merge reads like that together into a 4k read would be
better still...

> Also, even for byterange requests, we will want to use
> sendfile.  Imagine a byterange request for 15000 bytes from a 10Meg
> file.   This can be sent using sendfile instead of mmap.

Yes - that's a single range, so it would be anyway under the logic
above. If you're hopping around, though, multiple sendfile()s will hurt
much more than an mmap().


James.


Mime
View raw message