mbuf tuning

Mike Silbersack silby at silby.com
Mon Jan 19 23:56:14 PST 2004

On Mon, 19 Jan 2004, CHOI Junho wrote:

> I am using custom version of thttpd. It allocates mmap() first(builtin
> method of thttpd), and it try to use sendfile() if mmap() fails(out of
> mmap memory). It really works good in normal status but the problem is
> that sendfile buffer is also easy to flood. I need more sendfile
> buffers but I don't know how to increase sendfile buffers either(I
> think it's hidden sysctl but it was more difficult to tune than
> nmbclusters). With higher traffic, thttpd sometimes stuck at "sfbufa"
> status when I run top(I guess it's "sendfile buffer allocation"
> status).
> 5.2 is fair good quality in my desktop but I have no experience in
> production environment. I'll consider it once 5.x enters -STABLE tree,
> but not now.
> Apache2 is one of my targets. How much better than apache-1.3.x in
> static file service?

thttpd using sendfile will certainly run circles around apache2, apache2
is still pre-fork.  Under 4.x, you're going to have to tune the sfbufs by
trial and error, but doing so will be worth it.

Mike "Silby" Silbersack

More information about the freebsd-performance mailing list