Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Nov 1997 10:47:15 -0500
From:      "Gregory, Scott, SrA, SAF/AADXT" <gregorys@af.pentagon.mil>
To:        "'Marc Slemko'" <marcs@znep.com>
Cc:        "'freebsd-questions@freebsd.org'" <freebsd-questions@FreeBSD.ORG>
Subject:   RE: Need Help Determining Why My System Keeps Crashing
Message-ID:  <c=US%a=attmail%p=gov%2Bdms%2Btrans%l=DFSMTTAYZ023-971106154715Z-7109@DFDC004.HQ.AF.MIL>

next in thread | raw e-mail | index | archive | help
I hope this is better.

>> >[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.
>
>[Gregory, Scott, SrA, SAF/AADXT]  
>Fair enough.  I had assumed that the mbufs were not being returned by some
>process and over time they had all been allocated.
>
>
>> >
>> >> ***********************************************
>> >> 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. 
>
>[Gregory, Scott, SrA, SAF/AADXT]  
>
>I haven't kept a log, but it was about every two weeks.  Does anything use
>mbufs besides the network?  
>
>The docs mention that the most important function of the maxusers is to set
>the maximum number of processes that can run.  I set it to 30 since I didn't
>see this system running more than 500 simultaneous processes.  What other
>system tables (that I would use heavily as a web server) does this effect and
>what would you suggest as a fix?
>
>Here is the output of netstat -m:
>
>netstat -m  
>
>2691 mbufs in use:
>        2279 mbufs allocated to data
>        405 mbufs allocated to packet headers
>        6 mbufs allocated to protocol control blocks
>        1 mbufs allocated to socket names and addresses
>2219/2302 mbuf clusters in use
>4940 Kbytes allocated to network (96% in use)
>0 requests for memory denied
>0 requests for memory delayed
>0 calls to protocol drain routines
>
>I ran netstat -m a few times and got utilization anywhere from 64% to 97%.
>Obviously I'm running VERY low in resources.  What would you do?  Set
>maxusers high? And/or set NMBCLUSTERS?  (where do you set the NMBCLUSTERS,
>kernel option?)
>
>Was the error I pulled from the console the result of running out of mbufs,
>or do I have something else wrong?  Is it safe to assume that when I run out
>of mbufs the system will crash?
>
>Thanks for your assistance.  
>
>Scott



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c=US%a=attmail%p=gov%2Bdms%2Btrans%l=DFSMTTAYZ023-971106154715Z-7109>