From owner-freebsd-questions Thu Nov 6 07:46:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA23395 for questions-outgoing; Thu, 6 Nov 1997 07:46:11 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from DFDC004.HQ.AF.MIL (dfdc004.hq.af.mil [134.205.95.12]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id HAA23389 for ; Thu, 6 Nov 1997 07:46:06 -0800 (PST) (envelope-from gregorys@af.pentagon.mil) Received: by DFDC004.HQ.AF.MIL with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52) id <01BCEA9F.E2C5BA40@DFDC004.HQ.AF.MIL>; Thu, 6 Nov 1997 10:36:48 -0500 Message-ID: From: "Gregory, Scott, SrA, SAF/AADXT" To: "'Marc Slemko'" Cc: "'freebsd-questions@freebsd.org'" Subject: RE: Need Help Determining Why My System Keeps Crashing Date: Thu, 6 Nov 1997 10:47:15 -0500 X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52 Encoding: 96 TEXT Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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