Subject: Re: Measuring dropped packets
To: None <tech-net@netbsd.org>
From: Christoph Kaegi <kgc@zhwin.ch>
List: tech-net
Date: 10/30/2006 16:28:27
On 30.10-14:05, Rui Paulo wrote:

> Maybe you run out of mbufs ?
> netstat -m can help you. If you have a lot of calls to protocol drain  
> routines, you need to bump NMBCLUSTERS.

# sysctl -a |grep nmbclust
---------------------------- 8< ----------------------------
kern.mbuf.nmbclusters = 2048
---------------------------- 8< ----------------------------


and netstat -m says:
---------------------------- 8< ----------------------------
1028 mbufs in use:
        1025 mbufs allocated to data
        3 mbufs allocated to packet headers
247034 calls to protocol drain routines
---------------------------- 8< ----------------------------

> Eitherway, if you reached mclpool limit, a message should've been  
> printed in the console/dmesg.

# vmstat -m |egrep "Requests|mcl"    
---------------------------- 8< ----------------------------
vmstat: Kmem statistics are not being gathered by the kernel.
Name        Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
mclpl       2048     2002 247026      0  1001     0  1001  1001     4  1024    0
---------------------------- 8< ----------------------------

Looking at the 'Fail' column, I get the impression I should
indeed increase NMBCLUSTERS.

Are there other variables I should look at?

Chris

-- 
----------------------------------------------------------------------
Christoph Kaegi                                           kgc@zhwin.ch
----------------------------------------------------------------------