Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jan 2000 13:02:15 -0500 (EST)
From:      Bosko Milekic <bmilekic@dsuper.net>
To:        Doug White <dwhite@resnet.uoregon.edu>
Cc:        Kris Kirby <kris@hiwaay.net>, hackers@FreeBSD.ORG
Subject:   Re: Acceptable MBUF levels?
Message-ID:  <Pine.OSF.4.05.10001291252050.29628-100000@oracle.dsuper.net>
In-Reply-To: <Pine.BSF.4.21.0001282334320.74829-100000@resnet.uoregon.edu>

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

On Fri, 28 Jan 2000, Doug White wrote:

>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.  

	`nmbufs' is actually NMBCLUSTERS * 4, unless a value is fetched from
  the environment (see `loader'). A similar initialization is done for
  `nmbclusters,' only nmbclusters defaults to NMBCLUSTERS unless something
  else is provided through the getenv() call (see `TUNABLE_INT_DECL').

>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. :-)

	Yes, that's exactly right. Good thing you pointed it out too. :-)
  However, increasing MAXUSERS also ends up increasing other global
  parameters in the kernel, so you could end up with a rather large kernel
  when all you really want to do is increase NMBCLUSTERS, and nothing else.
  	But yeah, your point is very valid.

Cheers,
Bosko.

 -------------------------------------------------------------------------
| Bosko Milekic                           | Coffee vector: 1.0i+1.0j+1.0k |
| Email: bmilekic@dsuper.net              | Sleep vector: -1.0i-1.0j-1.0k |
| WWW: http://pages.infinit.net/bmilekic/ | Resulting life: 0i+0j+0k (DNE)|
 -------------------------------------------------------------------------




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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.4.05.10001291252050.29628-100000>