From owner-freebsd-questions@FreeBSD.ORG Tue Apr 8 22:01:11 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0941837B401 for ; Tue, 8 Apr 2003 22:01:11 -0700 (PDT) Received: from mmp-1.gci.net (mmp-1.gci.net [208.138.130.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52FD143F3F for ; Tue, 8 Apr 2003 22:01:10 -0700 (PDT) (envelope-from jonr@destar.net) Received: from destar.net (240-7-237-24.gci.net [24.237.7.240]) by mmp-1.gci.net (iPlanet Messaging Server 5.2 HotFix 1.13 (built Mar 7 2003)) with SMTP id <0HD200BLM8LWWG@mmp-1.gci.net> for freebsd-questions@freebsd.org; Tue, 08 Apr 2003 21:01:09 -0800 (AKDT) Received: from 192.168.1.1 (SquirrelMail authenticated user jonr@destar.net) by www.destar.net with HTTP; Tue, 08 Apr 2003 20:54:31 -0800 (AKDT) Date: Tue, 08 Apr 2003 20:54:31 -0800 (AKDT) From: jonr@destar.net In-reply-to: <20030409034713.GC650@gothmog.gr> To: freebsd-questions@freebsd.org Message-id: <1438.192.168.1.1.1049864071.squirrel@www.destar.net> MIME-version: 1.0 X-Mailer: SquirrelMail (version 1.2.9) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 References: <1049817201.1588.30.camel@localhost.localdomain> <20030409034713.GC650@gothmog.gr> Subject: Re: mbufs exhausted X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 05:01:11 -0000 > On 2003-04-08 07:53, Jon Reynolds wrote: >> I am getting the message "mbufs exhausted please see tuning". So, I >> saw tuning. What file can you change the mbufs in? I remeber it being >> in /etc but not which config file it was. >> >> Also, would adding 'NMBCLUSTERS=4096' to the end of my kernel be ok? >> Whats the highest value I can set this too? I found inside of 'LINT' >> that mbufs would size itself 4x that of 'NMBCLUSTERS' if the NMBUFS >> option is not specified. So would this help the errors that I am >> getting? > > Each packet that is received from or sent by your FreeBSD kernel is > stored while in transit in one or more "mbufs". You can see how many > are in use any time with sysctl and netstat: > > $ sysctl -a | grep nmbufs > kern.ipc.nmbufs: 34432 > > $ sysctl -a | grep nmbcl > kern.ipc.nmbclusters: 17216 > > $ netstat -m > mbuf usage: > GEN cache: 0/0 (in use/in pool) > CPU #0 cache: 25/64 (in use/in pool) > Total: 25/64 (in use/in pool) > Mbuf cache high watermark: 512 > Mbuf cache low watermark: 128 > --> Maximum possible: 34432 > Allocated mbuf types: > --> 25 mbufs allocated to data > 0% of mbuf map consumed > mbuf cluster usage: > GEN cache: 0/0 (in use/in pool) > CPU #0 cache: 0/64 (in use/in pool) > Total: 0/64 (in use/in pool) > Cluster cache high watermark: 128 > Cluster cache low watermark: 16 > --> Maximum possible: 17216 > 0% of cluster map consumed > 144 KBytes of wired memory reserved (4% in use) > 0 requests for memory denied > 0 requests for memory delayed > 0 calls to protocol drain routines > > It's easy to see that kern.ipc.nmbufs is reported by netstat as the > "maximum possible" value for allocated mbufs, while the value of the > kern.ipc.nmbclusters sysctl is reported as the "maximum possible" > number of mbuf clusters. > > The size of an mbuf is very small when compared to the size of an "mbuf > cluster". If the output of netstat shows that you're running out of > mbufs but not out of clusters you should only increase NMBUFS. If > they're both running out, you should probably increase NMBCLUSTERS and > let NMBUFS pick up the change from there. > > - Giorgos Thanks Giorgos, I did as you suggested and both nmbclusters and nmbufs were maxed out, well nmbclusters was about 3 clusters shy of maxxing out. I went into my /boot/defaults/loader.conf and changed the nmbclusters to =4096 and rebooted. Should this setting have been added to the kernel and recompiled or is setting it in the loader.conf alright also? Thanks again, Jon