Date: Wed, 9 Apr 2003 18:10:46 +0400 From: "Sergey A. Osokin" <osa@freebsd.org.ru> To: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua> Cc: freebsd-stable@freebsd.org Subject: Re: 4.8-STABLE Kernel Panic with dummynet options. Message-ID: <20030409141046.GV37669@freebsd.org.ru> In-Reply-To: <20030409162809.L34513-100000@atlantis.atlantis.dp.ua> References: <20030409125932.BE2BC37B409@hub.freebsd.org.lucky.freebsd.stable> <20030409162809.L34513-100000@atlantis.atlantis.dp.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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 / \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030409141046.GV37669>