cvs commit: ports/www/thttpd/files patch-mmc.c
sean at chittenden.org
Sat Nov 22 00:34:27 PST 2003
> > BTW, is there any place/docs I can read about pros/cons
> > USE_SENDFILE yields me?
> > Thanks!
> > ./danfe
> I can give you a quick overview:
> - It's slightly more efficient with system resources.
> - You need to tune sfbufs rather than mbufs, so it requires a bit more
> skill to tune at the moment.
> - Sendfile is slightly less efficient at sending small files (for now.)
> - The thttpd sendfile support is rather experimental right now.
> So, given that thttpd is very efficient without sendfile support
> compiled in, it's not worth worrying about using sendfile with it
> yet. Once I finish importing some of the DeBox project's changes to
> sendfile, then there will be substantial benefits to using sendfile.
Also, if you're handling tens of thousands of connections sending
different files, sendfile(2) is a HUGE win for reducing the memory
footprint of the server. When sending a handful of different files,
however, mmap(2) will be the winner until you move to 5.2+. Alan just
committed some bits that cache sfbuf's so that there's only one sfbuf
for each page of data sent. In versions prior to 5.2, there was more
than one sfbuf for the same page of data read off of disk. If you
have other questions about sendfile(2), bring them up on the
performance@ mailing list and we can discuss them more there. HTH.
More information about the cvs-ports