Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I noticed today that the MBUF usage has hit its limit. Apparently the site I'm running under pfsense is having some troubles too, I'd like to know if it would be safe to just

sysctl kern.ipc.nmbclusters=65536

I wouldn't like to reboot the server, is it safe (or useful) to do it via pfsense shell?

2.0-RELEASE (amd64) built on Tue Sep 13 17:05:32 EDT 2011

State table size    35573/550000
MBUF Usage    25600/25600
CPU usage 2%
Memory usage 17% (2GB)
Swap 0%
CPU: Intel(R) Xeon(R) CPU E5450 @ 3.00GHz
share|improve this question
up vote 4 down vote accepted

Changing (increasing) nmbclusters is safe -- you should be able to do this with no adverse effects.
Note however that you must also make the appropriate changes to /boot/loader.conf in order for the change to persist across reboots.

Also note that the kernel you are using may not allow you to change this value at runtime: Older versions of FreeBSD require you to set the value in /boot/loader.conf (and really ancient versions require the value to be compiled into the kernel).
If the sysctl command doesn't work you will have to edit /boot/loader.conf and reboot to make this change.

share|improve this answer
MBUF Usage 25600/65536, thanks for your help, apparently it's all right! I will post here if I see any problem or unexpected condition. have a good day. – sathia Nov 28 '11 at 17:26
@sathia Be careful not to set the limit too high, failed mallocs in kernel space tend to end in dump screens (65k on a server with 2GB RAM is safe, just don't pick an outrageous number). Also, the value can not be decreased; take a reboot to lower the running max. – Chris S Nov 28 '11 at 20:25
@ChrisS Hi, Yes, of course I've read what would be a good amount of nbclusters with 2 GB and apparently the sweet spot is 65k. thanks though. So far so good, I've seen a sensible increase in traffic. even if it's only using 26030/65536. thanks for your help, it's appreciated. – sathia Nov 29 '11 at 9:48

It is recommended to place kern.ipc.nmbclusters tweak in /boot/loader.conf.local rather than /boot/loader.conf (as suggested in @voretaq7's answer), because the latter one can get replaced during upgrade.

You can also adjust this variable via System Tunables (System > Advanced > System Tunables tab) inside pfSense web GUI.

The actual value for nmbclusters depends on the the number of network interfaces, CPU cores, and few other factors - a bit of experimenting is required to find the optimal value for each system.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.