From owner-freebsd-hackers@FreeBSD.ORG Fri May 23 12:41:56 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D1B3337B404 for ; Fri, 23 May 2003 12:41:56 -0700 (PDT) Received: from smtp.distributel.net (cns2.distributel.NET [66.38.181.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5935643F93 for ; Fri, 23 May 2003 12:41:55 -0700 (PDT) (envelope-from bmilekic@unixdaemons.com) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by smtp.distributel.net (8.12.6/8.12.6) with ESMTP id h4NJfrDi068144; Fri, 23 May 2003 15:41:54 -0400 (EDT) Content-Type: text/plain; charset="iso-8859-1" From: Bosko Milekic To: "Michael R. Wayne" , freebsd-hackers@FreeBSD.ORG Date: Fri, 23 May 2003 15:42:36 +0000 User-Agent: KMail/1.4.3 References: <200305231907.h4NJ7ubu089890@manor.msen.com> In-Reply-To: <200305231907.h4NJ7ubu089890@manor.msen.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200305231542.36266.bmilekic@unixdaemons.com> Subject: Re: mbuf reference? (and missing man page) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: bmilekic@unixdaemons.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 19:41:57 -0000 On May 23, 2003 07:07 pm, Michael R. Wayne wrote: > Missing man page: > 4.8 releasse - man netstat has a reference to mbuf(9) but man mbuf > says: No manual entry for mbuf True. This is a bug. Someone from -doc should fix this, because mbuf(9) only exists in 5.0 and later. Try submitting a PR and filing it to -doc. Here's a link to an on-line version of the mbuf(9)=20 man page appearing in 5.x: http://www.FreeBSD.org/cgi/man.cgi?apropos=3D0&sektion=3D9& \ query=3Dmbuf&manpath=3DFreeBSD+5.0-current&format=3Dhtml > Real question: > I'm seeking some additional documentation on the relationship > between mbufs, mbuf clusters and network memory usage (essentially > the output of netstat -m). > > Obviously, the number of mbuf clusters is tunable with > kern.ipc.nmbclusters. The maximum number of mbufs appears to be 4 * > that number (or is that 4 a tunable?) kern.ipc.nmbclusters and kern.ipc.nmbufs set the number of clusters and= =20 the number of mbufs, respectively, and are tunable at boottime. > Not sure how network memory allocation is chosen (% of base memory > size as default?) and, does it grow dynamically or should one be > building a new kernel once, say, 80% of the mb_map is in use? Or > simply ignore occasional high mb_map utilization unless requests > for memorey are delayed/denied? Yeah, the last thing you said sounds correct. You don't want to be tuning for high memory usage just because you had a single spike. This is one of the advantages of having a capped virtual address space for network buffers (that does not grow dynamically); if you get hit by a sudden high usage spike (e.g., DOS, other irregularity), your system will hopefully stay alive as the network buffer usage will get capped off due to the finiteness of the address space reserved for the buffers. So, basically, you want to tune/increase NMBCLUSTERS according to how many times you've failed on the allocations over a longer period of time. If you are always hitting high usage and failing, you should consider increasing NMBCLUSTERS. If you notice that your highest cluster or mbuf usage has never actually hit the maximum, but you're still getting memory denied requests, then you're actually running out of RAM, and increasing NMBCLUSTERS is not going to help you. Adding RAM is. > /\/\ \/\/ > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" --=20 Bosko Milekic bmilekic@unixdaemons.com bmilekic@FreeBSD.org