From owner-freebsd-questions@FreeBSD.ORG Tue Dec 12 16:16:56 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 732C016A415 for ; Tue, 12 Dec 2006 16:16:56 +0000 (UTC) (envelope-from nomadlogic@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60ADE43CA0 for ; Tue, 12 Dec 2006 16:15:32 +0000 (GMT) (envelope-from nomadlogic@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1544515uge for ; Tue, 12 Dec 2006 08:16:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Oashomi6+TuPanRt1QxjPCmyDkMR/5EThTqAYbTVBoHbCqy3MXjbx/Q9BVbjBN4PvCHsv3mmua8b6M0S94New2NBZXwswEIeh59RGe9gI3Ub8ArIPhpRLpUnQ6B1LqpgjLR0KdttIP+THWjkYPDJOJDjEZbGfghpFGIHjgsV8zI= Received: by 10.78.201.2 with SMTP id y2mr2705573huf.1165940214277; Tue, 12 Dec 2006 08:16:54 -0800 (PST) Received: by 10.78.195.14 with HTTP; Tue, 12 Dec 2006 08:16:54 -0800 (PST) Message-ID: <57d710000612120816t3f19e3e3y8ea9ed447a22b1e7@mail.gmail.com> Date: Tue, 12 Dec 2006 08:16:54 -0800 From: "pete wright" To: "John Oxley" In-Reply-To: <20061212100723.GA32371@yoafrica.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061212100723.GA32371@yoafrica.com> Cc: questions@freebsd.org Subject: Re: running out of mbuf clusters X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 16:16:56 -0000 On 12/12/06, John Oxley wrote: > Hi, > > I'm running a shaper system on a FreeBSD box. It is pushing sustained 8 > Mbps. In the messages log I'm getting lots of > > Dec 11 21:03:54 ritalin /kernel: All mbuf clusters exhausted, please see > tuning(7). > > When I run netstat -m however I get > $ netstat -m > 1766/5904/80000 mbufs in use (current/peak/max): > 1766 mbufs allocated to data > 1765/5900/20000 mbuf clusters in use (current/peak/max) > 13276 Kbytes allocated to network (22% of mb_map in use) > 30 requests for memory denied > 0 requests for memory delayed > 0 calls to protocol drain routines > > > Why is it saying its run out of mbuf clusters when it peaked at 5900? > The machine is running FreeBSD 4.9-RELEASE. The reason for this is that > it is a shaper appliance, and it was shipped to us with 4.9 on it. > hmm...don't have a 4.x box handy but on 6.1-RELEASE "man tuning" turns this up: " kern.ipc.nmbclusters may be adjusted to increase the number of network mbufs the system is willing to allocate. Each cluster represents approx- imately 2K of memory, so a value of 1024 represents 2M of kernel memory reserved for network buffers. " yikes, can't remember if 4.x allows you to tune this via sysctl or if you have to define it in your kernel config. in any event if you type "sysctl kern.ipc.nmbclusters" that should report you maximum mbuf's that can be allocated. I am guessing you may have to increase this value. -pete -- ~~o0OO0o~~ Pete Wright www.nycbug.org NYC's *BSD User Group