On Mar 22, 2013, at 6:32 PM, Richard K.
[email protected] wrote:
I’m trying to tune ‘kern.maxbcache’ with hope of increasing ‘vfs.maxbufspace’ so
that more files can be stored in buffer memory on freebsd 9.1
It’s suggested to tune this value here
and here http://wiki.nginx.org/FreeBSDOptimizations
However, I can’t get the value of ‘vfs.maxbufspace’ to increase:
I assume that you have 9.1 amd64, the following applies only to amd64.
On amd64 maxbcache is zero by default and effectively is no-op,
thus it doesn’t further limit maxbufspace (cf. on i386 it’s set to
due to KVA constraints; and buffer space is reserved in KVM on early
The kernel auto-tunes maxbufspace based on the amount of
physical memory available using the formula “for the first 64 MB of ram
use 1/4 for buffers, plus 1/10 of the ram over 64 MB”. So, your current
vfs.maxbufspace value corresponds to 32GB RAM and is quite enough.
Anyway, you can further increase it by setting kern.nbuf in
With your current maxbufspace value, it’s kern.nbuf=210024 now.