On Wed, 26 Jan 2000, Bosko Milekic wrote:
>
> On Wed, 26 Jan 2000, Doug White wrote:
>
> >When people refer to mbufs, they refer to mbuf clusters, of which there's
> >a fixed number. The kernel will allocate more mbufs as necessary.
>
> Uhm, actually, mbufs are also allocated from mb_map. Thus, they are
> also capped. (Unless I'm missing something big again... :-) )
That would be correct, at least looking at the appropriate code in
/sys/kern/uipc_mbuf.c. The read-only sysctls kern.ipc.nmbclusters and
kern.ipc.nmbufs hold the max mbuf clusters and the max mbufs, respecively.
kern.ipc.nmbufs is bound to an nmbufs value in there, but I can't figure
out to what value it's initialized to.
> >The usual rule of thumb is that the peak should never exceed 75% of the
> >max mbufs in the system to allow for sufficient overhead in extreme
> >situations. In this case you're at 80%, so you should probably recompile
> >your kernel and bump maxusers.
>
> Actually, for mbufs and mbuf clusters, you should increase
> NMBCLUSTERS, which will serve as an indication of allocate-able clusters
> as well as, ultimately, mbufs.
Increasing maxusers has the side effect of increasing NMBCLUSTERS
according to this formula (from /sys/conf/param.c):
#ifndef NMBCLUSTERS
#define NMBCLUSTERS (512 + MAXUSERS * 16)
#endif
You only have to override NMBCLUSTERS by hand if you want a truly gigantic
(i.e. > 10,000) number of nmbclusters. Just be VERY CAREFUL doing so
since you can *reduce* the number, and that's not good!
>From personal experience, 512 maxusers and 16384 nmbclusters is more than
enough for just about anything -- just make sure you can handle a 17MB
kernel. :-)
Doug White | FreeBSD: The Power to Serve
[EMAIL PROTECTED] | www.FreeBSD.org
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message