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: [EMAIL PROTECTED] | 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message