Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Nov 1997 07:49:53 -0700 (MST)
From:      Marc Slemko <marcs@znep.com>
To:        "Gregory, Scott, SrA, SAF/AADXT" <gregorys@af.pentagon.mil>
Cc:        "'freebsd-questions@freebsd.org'" <freebsd-questions@FreeBSD.ORG>
Subject:   RE: Need Help Determining Why My System Keeps Crashing
Message-ID:  <Pine.BSF.3.95.971106074045.26802A-100000@alive.znep.com>
In-Reply-To: <c=US%a=attmail%p=gov%2Bdms%2Btrans%l=DFSMTTAYZ023-971106123933Z-7073@DFDC004.HQ.AF.MIL>

next in thread | previous in thread | raw e-mail | index | archive | help
Please fix whatever program you are using so it quotes properly.  The
style of quoting you use below is _VERY_ difficult to read and makes it
almost impossible to distinguish between your words and my words.

On Thu, 6 Nov 1997, Gregory, Scott, SrA, SAF/AADXT wrote:

> >> I have a web server running FreeBSD 2.2.2.  I have been experiencing
> >> random crashes and until today have not gotten any info as to why.  I
> >> caught the server before it rebooted and was able to get this
> >> information from the console:
> >> 
> >> Nov  5 10:44:02 afpubs /kernel: Out of mbuf clusters - increase
> >> maxusers!
> >
> >Well, have you tried doing what it says?
> >
> >[Gregory, Scott, SrA, SAF/AADXT]  
> >
> >Actually yes.  The kernel that was previously installed had the max users set
> >to 100.  It took longer, but the system still crashed (it did log the above
> >error).  Something is not releasing all the mbuf clusters is uses.

I see no reason to suspect that.  You have a server.  It has a lot of
traffic.  It needs a good number of mbuf clusters.

> >
> >> ***********************************************
> >> Kernel Configuration File:
> >> 
> >> machine         "i386"
> >> #cpu            "I386_CPU"
> >> #cpu            "I486_CPU"
> >> #cpu            "I586_CPU"
> >> cpu             "I686_CPU"
> >> ident           "AFPUBS"
> >> maxusers        30
> >maxusers	128
> >
> >(or even 256)
> >[Gregory, Scott, SrA, SAF/AADXT]  
> >
> >What is the limit?  It seems that maxusers set this high will make the
> >internal tables larger than they need to be which is why I changed it to 30
> >(I don't plan to have more than 500 processes at any given time).  I could
> >increase maxusers everytime it crashes, but I would prefer to find out what
> >is sucking up the mbufs.  Is there any utility that will allow me to monitor
> >mbuf usage and maybe even find mbufs that are assigned without a running
> >process?

The limit?  There is no particular limit, other than what is reasonable.
maxusers is not just related to the number of people you want logged in.
You are doing a reasonable volume of web traffic on the machine, so it is
reasonable to need a maxusers far higher than 30.

netstat -m will show the number of mbuf clusters in use.  

How often does this problem occur?  Just try increasing maxusers to 128
and 256.  You can set NMBCLUSTERS higher without increasing maxusers, but
there are other things that make a maxusers of 30 not entirely
appropriate.  3000 or 4000 so should be a fair setting, but that depends
on your traffic. 

> >
> >> 
> >> options         "MAXMEM=98304"
> >
> >If you have 128 megs of RAM, you are only using 96 with this setup.
> >
> >You should be able to handle around 400 httpd process w/128 megs of RAM
> >without much trouble if nothing else is going on.
> >
> >[Gregory, Scott, SrA, SAF/AADXT]  
> >
> >My mistake.  This system has only 96 megs of RAM.  My other BSD box has the
> >128.  Will the processor be able to handle 400 httpd processes?

I'm not too worried about the processor unless you are doing a lot of CGI
or using specialized modules.  The memory is the problem; you probably
won't be able to go that high with only 96 megs.




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