Date: Fri, 28 Jan 2000 23:49:14 -0800 (PST) From: Doug White <dwhite@resnet.uoregon.edu> To: Bosko Milekic <bmilekic@dsuper.net> Cc: Kris Kirby <kris@hiwaay.net>, hackers@FreeBSD.ORG Subject: Re: Acceptable MBUF levels? Message-ID: <Pine.BSF.4.21.0001282334320.74829-100000@resnet.uoregon.edu> In-Reply-To: <Pine.OSF.4.05.10001262001540.22674-100000@oracle.dsuper.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0001282334320.74829-100000>