Subject: kern/12606: NMBCLUSTERS too small for nowadays use (netbsd-1-5)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itojun@itojun.org>
List: netbsd-bugs
Date: 04/11/2001 10:17:59
>Number:         12606
>Category:       kern
>Synopsis:       NMBCLUSTERS too small for nowadays use (netbsd-1-5)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 10 18:19:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jun-ichiro itojun Hagino
>Release:        1.5.1_BETA
>Organization:
	itojun.org
>Environment:
System: NetBSD coconut.itojun.org 1.5.1_BETA NetBSD 1.5.1_BETA (COCONUT) #3: Tue Apr 10 10:08:08 JST 2001 itojun@coconut.itojun.org:/export/home/itojun/NetBSD15/src/sys/arch/i386/compile/COCONUT i386


>Description:
	it seems to me that NMBCLUSTERS (256, or 512 if GATEWAY)
	is too small for nowadays applications.

	my mail/web server choked this morning by web crawler with mbuf
	cluster shortage.  my upstream is just 128K!

	another problem maybe is in fxp* driver:
	- fxp* driver keeps 64 mbuf cluster in the driver for DMA transfers,
	  so effective NMBCLUSTERS value is 64 less for other portion of the
	  kernel code.
	- once we hit NMBCLUSTERS limit, it seems that IPv6 TCP layer becomes
	  unable to establish IPv6 TCP session.  I see SYN and SYN ACK, then
	  there's no further processing.  i'll try to investigate this part
	  later, but i guess the problem is hard to track down (it could be a
	  temporary issue).
>How-To-Repeat:
	this is after the machine choked.  i cannot establish IPv6 TCP session
	to the machine.

% ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	media: Ethernet autoselect (10baseT)
	status: active
	inet 210.160.95.97 netmask 0xfffffff0 broadcast 210.160.95.111
	inet6 fe80::2ae:d0ff:fe00:3b%fxp0 prefixlen 64 scopeid 0x1
	inet6 2001:218:420:0:2ae:d0ff:fe00:3b prefixlen 64
	inet6 3ffe:8020:10ff:1:2ae:d0ff:fe00:3b prefixlen 64
	inet6 3ffe:507:1:1:2ae:d0ff:fe00:3b prefixlen 64
	inet6 3ffe:501:410:0:2ae:d0ff:fe00:3b prefixlen 64
% netstat -m
70 mbufs in use:
	64 mbufs allocated to data
	6 mbufs allocated to packet headers
64/256 mapped pages in use
628 Kbytes allocated to network (23% in use)
0 requests for memory denied
0 requests for memory delayed
1701 calls to protocol drain routines
Kmem statistics are not being gathered by the kernel.
Memory resource pool statistics
Name        Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
phpool        40      197    0        0     2     0     2     2     0   inf    0
pmappl        68    16749    0    16709     2     0     2     2     0   inf    1
vmsppl       188    16749    0    16709     5     0     5     5     0   inf    3
vmmpepl       64   468123    0   467543    24     0    24    24     0   inf   14
uaoeltpl      84        0    0        0     0     0     0     0     0   inf    0
aobjpl        52        0    0        0     0     0     0     0     0   inf    0
amappl        40   185222    0   184907     7     0     7     7     0   inf    3
mbpl         256  1946361    0  1946292    29     0    29    29     1   inf   23
mclpl       2048   593290 3346   593226   128     0   128   128     4   128   95
sockpl       164    74151    0    74049    14     0    14    14     0   inf    8
ttypl        284       71    0        0     6     0     6     6     0   inf    0
rndsample    528     9814    0     9811     1     0     1     1     0   inf    0
procpl       404    16806    0    16763    10     0    10    10     0   inf    5
pgrppl        24     4894    0     4871     1     0     1     1     0   inf    0
pcredpl       24    16806    0    16763     1     0     1     1     0   inf    0
plimitpl     156     1870    0     1854     1     0     1     1     0   inf    0
rusgepl       72    16763    0    16763     1     0     1     1     0   inf    1
filepl        48  1189276    0  1189121     4     0     4     4     0   inf    1
cwdipl        12    16803    0    16763     1     0     1     1     0   inf    0
fdescpl      124    16803    0    16763     3     0     3     3     0   inf    1
vnodepl      208     6418    0        0   338     0   338   338     0   inf    0
ncachepl      72     6418    0        0   115     0   115   115     0   inf    0
ffsinopl     216  2013243    0  2007503   357     0   357   357     0   inf    0
ext2fsinopl  216        0    0        0     0     0     0     0     0   inf    0
lfsinopl     216        0    0        0     0     0     0     0     0   inf    0
nfsnodepl    276        0    0        0     0     0     0     0     0   inf    0
nfsvapl      100        0    0        0     0     0     0     0     0   inf    0
cd9660nopl   108        0    0        0     0     0     0     0     0   inf    0
msdosnopl    100        0    0        0     0     0     0     0     0   inf    0
wdcspl        48   623923    0   623923     1     0     1     1     0   inf    1
extent        20      259    0      246     1     0     1     1     0   inf    0
bufpl        124        1    0        1     1     0     1     1     0   inf    1
ccdpl        140        0    0        0     0     0     0     0     0   inf    0
rtentpl      132      131    0       77     2     0     2     2     0   inf    0
inpcbpl       96    44021    0    44001     6     0     6     6     0   inf    5
rttmrpl       32       16    0       16     1     0     1     1     0   inf    1
ipqepl        40    11640    0    11640     1     0     1     1     0   inf    1
tcpcbpl      176    14529    0    14511    10     0    10    10     0   inf    9
synpl        168    13629    0    13629     3     0     3     3     0   inf    3
sigapl       840    16803    0    16763    23     0    23    23     0   inf   13
swp buf      152        0    0        0     0     0     0     0     0   inf    0
swp vnx       20        0    0        0     0     0     0     0     0   inf    0
swp vnd      128        0    0        0     0     0     0     0     0   inf    0

In use 3293K, total allocated 4396K; utilization 74.9%
>Fix:
	for i386, pullup sys/arch/i386/include/param.h 1.42 -> 1.43.
>Release-Note:
>Audit-Trail:
>Unformatted: