Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Apr 2001 11:31:36 +0400
From:      Dmitry Samersoff <dms@wplus.net>
To:        Bosko Milekic <bmilekic@technokratis.com>
Cc:        Archie Cobbs <archie@dellroad.org>, Archie Cobbs <archie@packetdesign.com>, freebsd-net@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG
Subject:   Re: mbuf leak? fxp?
Message-ID:  <3ACD70D8.3F14CD6@wplus.net>
References:  <200103312350.f2VNon305299@bubba.packetdesign.com> <200104051718.f35HIcF73652@arch20m.dellroad.org> <20010405194846.A22964@technokratis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Bosko Milekic wrote:
> 
> 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).

I always increase NMBCLASTERS instead increasing MAXUSER 
if I only need more networks, because increasing maxuser
slow down FreeBSD. 

I also have a number of problems with modern Intel ethernet cards,
probably (but I'm not sure) FreeBSD 4.2 fxp driver not 100% compatible 
with the latest one. 

(Intel PRO/100+ Fast Ethernet Controller (82559) on Mother Board)


-- 
Dmitry Samersoff, dms@wplus.net, ICQ:3161705
http://devnull.wplus.net
* There will come soft rains ...

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?3ACD70D8.3F14CD6>