httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Date Fri, 02 Feb 2001 15:59:37 GMT

> > Yep.  Basically, there needs to be a cut-off, so that we don't sendfile a
> > lot of little files.  We are much better off with a hierarchy:
> > 
> > read  if it's really small,
> > mmap or sendfile if it's a bit bigger.
> I think for byterange requests, mmap()+writev() would be the best - the
> other two options won't merge packets, which will be a performance
> hit. Even for tiny files, getting bytes 5-10,10-15 would be better under
> mmap()+writev() - read/write and sendfile will both send two tiny packets,
> it seems.
> So:
> 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.  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.

This is all dependant on what the response data looks like.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message