Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Apr 2001 19:48:46 -0400
From:      Bosko Milekic <bmilekic@technokratis.com>
To:        Archie Cobbs <archie@dellroad.org>
Cc:        Archie Cobbs <archie@packetdesign.com>, freebsd-net@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG
Subject:   Re: mbuf leak? fxp?
Message-ID:  <20010405194846.A22964@technokratis.com>
In-Reply-To: <200104051718.f35HIcF73652@arch20m.dellroad.org>; from archie@dellroad.org on Thu, Apr 05, 2001 at 10:18:38AM -0700
References:  <200103312350.f2VNon305299@bubba.packetdesign.com> <200104051718.f35HIcF73652@arch20m.dellroad.org>

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

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 <NO>' 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010405194846.A22964>