Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Mar 2003 13:29:36 -0600
From:      "Alan L. Cox" <alc@imimic.com>
To:        arch@freebsd.org, Sean Chittenden <sean@chittenden.org>
Subject:   Re: Should sendfile() to return ENOBUFS?
Message-ID:  <3E64FEA0.CCA21C7@imimic.com>

next in thread | raw e-mail | index | archive | help
Sean,

The current sf_buf implementation has a simple problem that could
account for your frequent blocking.  Let me describe an extreme example
that will make it clear.  Suppose you have a web server that delivers
nothing but a single file of 8 pages, or 32K bytes of data, to its
clients.  Here's the punchline: If you had 1,000 concurrent requests,
you could wind up allocating 8,000 sf_bufs.  Given that the main purpose
of the sf_buf is simply to provide an in-kernel virtual address for the
page, one sf_buf per page should suffice.  Sf_bufs are already reference
counted.  So, the principle change would be to add a directory data
structure that could answer the question "Does this page already have an
allocated sf_buf?"

Regards,
Alan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E64FEA0.CCA21C7>