From owner-freebsd-stable@FreeBSD.ORG Wed Apr 9 07:10:49 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB22C37B401 for ; Wed, 9 Apr 2003 07:10:49 -0700 (PDT) Received: from freebsd.org.ru (freebsd.org.ru [194.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92E9D43F75 for ; Wed, 9 Apr 2003 07:10:47 -0700 (PDT) (envelope-from osa@freebsd.org.ru) Received: by freebsd.org.ru (Postfix, from userid 1000) id 6435F5D; Wed, 9 Apr 2003 18:10:46 +0400 (MSD) Date: Wed, 9 Apr 2003 18:10:46 +0400 From: "Sergey A. Osokin" To: Dmitry Pryanishnikov Message-ID: <20030409141046.GV37669@freebsd.org.ru> References: <20030409125932.BE2BC37B409@hub.freebsd.org.lucky.freebsd.stable> <20030409162809.L34513-100000@atlantis.atlantis.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030409162809.L34513-100000@atlantis.atlantis.dp.ua> User-Agent: Mutt/1.5.4i cc: freebsd-stable@freebsd.org Subject: Re: 4.8-STABLE Kernel Panic with dummynet options. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: osa@FreeBSD.org.ru List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 14:10:49 -0000 On Wed, Apr 09, 2003 at 05:03:03PM +0300, Dmitry Pryanishnikov wrote: > On Wed, 9 Apr 2003 15:13:53 +0400, Sergey A. Osokin wrote: > >> options NMBCLUSTERS=1024 > >> options NMBUFS=4096 > > > > What is the NMBUFS? You talk about NSFBUFS? > > Nope, there is NMBUFS - number of single mbufs vs NMBCLUSTERS for > mbuf clusters. You can see current usage: > > root@atlantis# netstat -m > 1080/2736/32768 mbufs in use (current/peak/max): > 1010 mbufs allocated to data > 70 mbufs allocated to packet headers > 781/2434/16384 mbuf clusters in use (current/peak/max) > > (1st line for mbufs, 4th for mbuf clusters) and adjust both values in > /boot/loader.conf: > > kern.ipc.nmbufs="32768" # Number of mbufs > kern.ipc.nmbclusters="16384" # Number of mbuf clusters > > Note the following sanity check in kernel: > > /* Sanity checks */ > if (nmbufs < nmbclusters * 2) > nmbufs = nmbclusters * 2; > > > AFAIK 1024 is very-very small value for NMBCLUSTERS. > > Well, it depends ;) Really, one of my routers shows the following: > > dmitry@cs37$ netstat -m > 69/560/6144 mbufs in use (current/peak/max): > 69 mbufs allocated to data > 35/206/1536 mbuf clusters in use (current/peak/max) > > after uptime of 46 days (total traffic up to several Mbit/s, 6 network > interfaces, dummynet in use). > > On Wed, 9 Apr 2003 16:00:46 +0400, Sergey A. Osokin wrote: > >> And what about the HZ value? > > > > AFAIK its compile time option. > > It's also boot-time tunable long time ago, see 4.4-RELEASE release notes: > > The maxusers kernel configuration parameter is now a boot-time tunable > variable. The kernel parameters derived from maxusers are now also > tunables and can be overridden at boot-time. The hz parameter is also now > ^^^^^^^^^^^^ > a tunable. > > So one can just set HZ to some reasonable value (200, 500, 1000 - it depends > also) in loader.conf: > > kern.hz="200" # Clock interrupts per second Looks like time to rewrite handbook/faq/tuning(7)/etc. :-) -- Rgdz, /"\ ASCII RIBBON CAMPAIGN Sergey Osokin aka oZZ, \ / AGAINST HTML MAIL http://ozz.pp.ru/ X AND NEWS / \