From owner-freebsd-hackers Sat Jan 29 10: 2:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by hub.freebsd.org (Postfix) with ESMTP id 69B8F1505C for ; Sat, 29 Jan 2000 10:02:20 -0800 (PST) (envelope-from bmilekic@dsuper.net) Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by oracle.dsuper.net (8.9.3/8.9.3) with ESMTP id NAA13951; Sat, 29 Jan 2000 13:02:15 -0500 (EST) Date: Sat, 29 Jan 2000 13:02:15 -0500 (EST) From: Bosko Milekic To: Doug White Cc: Kris Kirby , hackers@FreeBSD.ORG Subject: Re: Acceptable MBUF levels? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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