Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Dec 2006 23:17:48 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Holtor <holtor@yahoo.com>
Cc:        stable@freebsd.org
Subject:   Re: kern.ipc.nsfbufs Max Value?
Message-ID:  <20061210201748.GB81270@rambler-co.ru>
In-Reply-To: <718463.76303.qm@web31704.mail.mud.yahoo.com>
References:  <718463.76303.qm@web31704.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--7iMSBzlTiPOCCT2k
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Dec 10, 2006 at 08:23:00AM -0800, Holtor wrote:
> I have an extremely busy web server here serving mostly static html pages
> and images using apache 2.2.3 with sendfile enabled. It's a Dual Xeon
> server with 4 GB RAM and I've tweaked many sysctl variables to help the
> system chug along. At peak, apache is running nearly 1,500 child
> processes.
>=20
Have a look at ports/www/nginx for the alternative web server.

> To my question, what is the max value of kern.ipc.nsfbufs and does it
> depend on any other values? I had originally increased it to 32768 however
> sfbufs got maxed out slowing the server. Then I increased it to 65536 and
> currently have these results:
>=20
> 45348/48844/65536 sfbufs in use (current/peak/max)
>=20
> To me that's too close for comfort so I further tried to increase it to
> 131072 however with that setting the system would not boot. The kernel
> page faulted with an error in the swapper process until I decreased
> kern.ipc.nsfbufs back to 65536.
>=20
> Is there anyway to increase this value even higher? The server has nearly
> 2.5 GB of free ram out of the 4 GB installed and the load averages are
> very low 0.07, 0.15, 0.34 so hopefully it's possible to tweak this some
> more.
>=20
> Any ideas?
>=20
On i386, the sfbufs are allocated from kernel_map which is basically
limited by the amount of KVA.  Try increasing KVA_PAGES to give more
virtual space for the kernel (at the cost of reducing the virtual
address space for userland); see the comments regarding this option
in sys/i386/conf/NOTES.  On amd64, you wouldn't have this problem as
sf_bufs are only opaque objects there and don't consume real memory.


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--7iMSBzlTiPOCCT2k
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFfGtsqRfpzJluFF4RAnT1AJ40clu2xYtR4StPgzhREAXlWMt63ACdH3yF
d/Mds6G0Am8YsJMCuz7gCzE=
=n1IV
-----END PGP SIGNATURE-----

--7iMSBzlTiPOCCT2k--



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