From owner-freebsd-questions Mon Nov 24 05:56:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA03859 for questions-outgoing; Mon, 24 Nov 1997 05:56:27 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from dddc011.pr.osd.mil (dddc011.pr.osd.mil [134.152.65.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA03849 for ; Mon, 24 Nov 1997 05:56:24 -0800 (PST) (envelope-from gregorys@af.pentagon.mil) Received: by dddc011.pr.osd.mil with Internet Mail Service (5.0.1458.49) id ; Mon, 24 Nov 1997 08:56:15 -0500 Message-ID: From: "Gregory, Scott, SrA, SAF/AADXT" To: "'dg@root.com'" Cc: "'freebsd-questions@freebsd.org'" Subject: RE: Mbuf allocation or lack there of Date: Mon, 24 Nov 1997 08:34:13 -0500 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Thanks for the info, but now I have a few more questions. 1. I specified that "NMBCLUSTERS=4096". Does this mean that the system has 4096 Mbuf clusters available? 2. If #1 is yes, then why did I get an "out of mbuf clusters" error when the system had only used 1136? (I was reading the numbers correctly, I just explained it poorly :-) ) 3. Does the generic kernel (with max users set to 100 and maxmem set to 96megs) allocate more mbufs than my custom kernel with maxusers set to 128 and NMBCLUSTERS set to 4096? The reason I ask this is because the slightly modified kernel was able to attain a maximum of 2318 mbufs where as the modified kernel was only able to get to 1136. 4. What would you suggest I set NMBCLUSTERS and/or maxusers to? Thanks again, Scott > -----Original Message----- > From: David Greenman [SMTP:dg@root.com] > Sent: Saturday, November 22, 1997 2:09 PM > To: Gregory, Scott, SrA, SAF/AADXT > Cc: 'freebsd-questions@freebsd.org' > Subject: Re: Mbuf allocation or lack there of > > >I submitted a question to the group a couple of weeks ago about my > >system crashing with a " /kernel: Out of mbuf clusters - increase > >maxusers! " error. Taking a suggestion from someone on this mailing > >list I increased my max users to "maxusers 128" and added > >"options NMBCLUSTERS=4096". This kernel has been running for > 14 > >days and I have again gotten the " /kernel: Out of mbuf clusters - > >increase maxusers! " error, however my system did not reboot. > > > >The output of netstat -m is: > > > >715 mbufs in use: > > 351 mbufs allocated to data > > 357 mbufs allocated to packet headers > > 6 mbufs allocated to protocol control blocks > > 1 mbufs allocated to socket names and addresses > >334/1136 mbuf clusters in use > >2361 Kbytes allocated to network (32% in use) > >0 requests for memory denied > >0 requests for memory delayed > >0 calls to protocol drain routines > > > >Yesterday this was running 80-90% in use. The number of clusters in > use > >continues to increase ( xxx/1136 ). Yesterday it only had 984 > clusters > >which increaseed to 1026 which increased to the current 1136. When I > >was running a slightly modified generic kernel netstat -m ouput was: > > > >714 mbufs in use: > > 685 mbufs allocated to data > > 23 mbufs allocated to packet headers > > 5 mbufs allocated to protocol control blocks > > 1 mbufs allocated to socket names and addresses > >683/2318 mbuf clusters in use > >4725 Kbytes allocated to network (30% in use) > >0 requests for memory denied > >0 requests for memory delayed > >0 calls to protocol drain routines > > > >As you can see the mbuf clusters in use was up to 2318. > > You're misinterpreting the numbers. The second number is the > maximum that > have been in-use since system startup. The first number is the current > number > in use. > > >1. Does the system dynamically allocate mbuf clusters as it needs > them? > > Yes, up to the limit of NMBCLUSTERS. > > >2. Is there any way to find out what the maximum allocation will be? > > If you've specified the NMBCLUSTERS option, then it will be that > value. > Otherwise, it is a formula based on maxusers. > > >3. Did I get the "Out of mbuf clusters" error yesterday because the > >system couldn't allocate clusters fast enough or because it reached > the > >hard limit? > > It reached the hard limit. This is bad and can result in the system > crashing. > > >4. Are my kernel settings sufficient? > > Apparantly not. You need to specify an even larger amount for > NMBCLUSTERS, > but beware that they each take 2K of RAM. > > >I am running a web server with 2.2.2-R on a PPro 200, 96 meg RAM. I > am > >also running Apache 1.2.4 which at times has 200+ clients connected. > > You have a (very) busy machine. 96MB of RAM is probably not enough. > > -DG > > David Greenman > Core-team/Principal Architect, The FreeBSD Project