EnderUNIX Team.


EnderUNIX tips

Mail to My Friend , Home Page

[ FreeBSD ]

"too many network connections and NMBCLUSTERS kernel value" - Barış Şimşek - (2004-12-20 12:05:59)   [6720]

If there are too many network connections to your FreeBSD box, FreeBSD cannot accept any more connections. You will see following messages:

All mbuf clusters exhausted, please see tuning(7)

# netstat -m
988/7104/262144 mbufs in use (current/peak/max):
981 mbufs allocated to data
7 mbufs allocated to packet headers
964/6694/65536 mbuf clusters in use (current/peak/max)
15164 Kbytes allocated to network (7% of mb_map in use)
0 requests for memory denied

0 requests for memory delayed
0 calls to protocol drain routines

You can see maximum number of mbuf kernel supports :

# sysctl kern.ipc.nmbclusters
kern.ipc.nmbclusters: 65536

Plug-out ethernet cable for a while, and then edit kernel configuration file under /usr/src/sys/i386/conf/. Then add following line to conf. file:

option NMBCLUSTERS="32768"

it can be maximum 65536. Now compile kernel with new option and install it. Then reboot.


Mail to My Friend , Home Page