From owner-freebsd-stable Thu Apr 5 16:48:17 2001 Delivered-To: freebsd-stable@freebsd.org Received: from technokratis.com (modemcable092.3-201-24.mtl.mc.videotron.ca [24.201.3.92]) by hub.freebsd.org (Postfix) with ESMTP id E086637B43F; Thu, 5 Apr 2001 16:47:58 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by technokratis.com (8.11.3/8.11.3) id f35Nmk523032; Thu, 5 Apr 2001 19:48:46 -0400 (EDT) (envelope-from bmilekic) Date: Thu, 5 Apr 2001 19:48:46 -0400 From: Bosko Milekic To: Archie Cobbs Cc: Archie Cobbs , freebsd-net@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: mbuf leak? fxp? Message-ID: <20010405194846.A22964@technokratis.com> References: <200103312350.f2VNon305299@bubba.packetdesign.com> <200104051718.f35HIcF73652@arch20m.dellroad.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200104051718.f35HIcF73652@arch20m.dellroad.org>; from archie@dellroad.org on Thu, Apr 05, 2001 at 10:18:38AM -0700 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Apr 05, 2001 at 10:18:38AM -0700, Archie Cobbs wrote: > Archie Cobbs writes: > > I have this machine that starts running out of mbufs every few days > > ("looutput: mbuf allocation failed") and then crashes, and was wondering > > if anyone else has seen similar behavior... > > > > For example... > > > > Yesterday... > > $ netstat -m > > 461/624/4096 mbufs in use (current/peak/max): > > 459 mbufs allocated to data > > 2 mbufs allocated to packet headers > > 434/490/1024 mbuf clusters in use (current/peak/max) > > 1136 Kbytes allocated to network (36% of mb_map in use) > > 0 requests for memory denied > > 0 requests for memory delayed > > 0 calls to protocol drain routines > > > > Today... > > $ netstat -m > > 947/1072/4096 mbufs in use (current/peak/max): > > 945 mbufs allocated to data > > 2 mbufs allocated to packet headers > > 920/946/1024 mbuf clusters in use (current/peak/max) > > 2160 Kbytes allocated to network (70% of mb_map in use) > > 0 requests for memory denied > > 0 requests for memory delayed > > 0 calls to protocol drain routines > > > > It appears that something is slowly eating up mbuf clusters. > > The machine is on a network with continuous but very low volume > > traffic, including some random multicast, NTP, etc. The machine > > itself is doing hardly anything at all. > > Well, my current guess is that this is simply an NMBCLUSTERS problem. > I increased NMBCLUSTERS to 8192 and it hasn't happened again yet. I kind of doubt that, judging simply from the netstat -m outputs you have posted above. In niether one is the number of clusters allocated meeting the maximum number of allocatable clusters. If it were the case, you would likely see some numbers for "requests for memory denied" and/or "requests for memory delayed." In any case, increasing NMBCLUSTERS to the number you mention is not a bad idea. > This machine has 5 ethernet interfaces, which must be probably more > than the default NMBCLUSTERS can handle. > > I wonder if we should increase the default NMBCLUSTERS, or document > somewhere that > 4 interfaces requires doing so? Well, the way it should be done is that `maxusers' should be increased, if anything. `maxusers' automatically tunes NMBCLUSTERS and NMBUFS accordingly. Chances are, if you are explicitly declaring `NMBCLUSTERS ' in your kernel configuration file, that you are actually lowering the number of clusters/mbufs that would otherwise be allowed with your given `maxusers' value (unless you have an unreasonably low maxusers). > Thanks for all the suggestions... > > -Archie > > __________________________________________________________________________ > Archie Cobbs * Packet Design * http://www.packetdesign.com Regards, -- Bosko Milekic bmilekic@technokratis.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message