Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Feb 1998 14:59:39 -0500 (EST)
From:      SrA Scott Gregory <gregory@afpubs.hq.af.mil>
To:        freebsd-questions@FreeBSD.ORG
Cc:        dg@root.com, grobin@accessv.com
Subject:   FW: Something is very wrong. Memory leak?  (fwd)
Message-ID:  <Pine.BSF.3.96.980202142259.11490A-100000@afpubs.hq.af.mil>

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


> -----Original Message-----
> From:	David Greenman [SMTP:dg@root.com]
> Sent:	Saturday, January 31, 1998 6:27 AM
> To:	grobin@accessv.com
> Cc:	questions@FreeBSD.ORG
> Subject:	Re: Something is very wrong. Memory leak? 
> 
> >> options "NMBCLUSTERS=<n>"
> >> 
> >>    ...where <n> is something like 4000. I would suggest that you do
> both
> >> of these - set maxusers to at least 64, and NMBCLUSTERS to 4000.
> >> 
> >
> >I have NMBCLUSTERS set to 4096 and maxuses set to 500. Do I have to
> have
> >NMBCLUSTERS=4096 in quotation marks?
> 
>    Depends on the version of FreeBSD. For recent versions, quotes
> aren't
> needed.
> 
> > This is what I have right now.
> >
> >machine         "i386"
> >#cpu            "I386_CPU"
> >#cpu            "I486_CPU"
> >cpu             "I586_CPU"
> >#cpu            "I686_CPU"
> >ident           "DATAIS1"
> >maxusers        500
> >
> >options         NMBCLUSTERS=4096   #mbuf clusters
> >options         CHILD_MAX=1000     #Max # child processes
> >options         OPEN_MAX=1000      #Max fds            
> >
> >I based these setting on the Apache document _Running a
> High-Performance
> >Web Server for BSD_.
> 
>    maxusers is probably a bit high; going over 300 might cause
> problems
> with running out of kernel VM, but I don't think this is your problem.
> While the system is running, I suggest that you periodically monitor
> the
> output of "netstat -m" and make sure that the second number in "mbuf
> clusters in use" doesn't exceed 3/4ths of what you have NMBCLUSTERS
> set
> to.
> 

Back in November I asked this very same question.  I set my maxusers to
256 and nmbclusters to 4096 as suggested.  The server was up for 50+ days
(taken down due to a scheduled power outage).  I had asked if the max the
clusters would get to would be 4096 and was told yes, however, before the
server was taken down it was 4400+.  The number of clusters that had been
used had gradually increased over the 50+ days and the percentage
allocated to the network never dropped below 25% (even at 2am when the
server was answering 1 client request).   

If setting nmbclusters at 4096 didn't stop the system from allocating more
than 4096, how do I know when the server will reach its maximum?  I think
that given enough time the server would have crashed like before.  I
accidently did a "vmstat -m" instead of "netstat -m" and found the
following (among other stats):

Memory statistics by type                          Type  Kern
        Type  InUse MemUse HighUse  Limit Requests Limit Limit Size(s)
         mbuf     1     8K      8K 19661K        1    0     0  8K


Is there anything that can clear or deallocate mbuf clusters?  I ran
something a while ago that (I believe) showed the number of allocated
mbufs that were active and inactive.  At 2am there was alot more clusters
active than should have been.

Any ideas?

Scott


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980202142259.11490A-100000>