Nginx/freebsd kern.maxbcache

Hi

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
http://serverfault.com/questions/64356/freebsd-performance-tuning-sysctls-loader-conf-kernel
and here http://wiki.nginx.org/FreeBSDOptimizations
However, I can’t get the value of ‘vfs.maxbufspace’ to increase:
kern.maxbcache: 21474836480
vfs.maxbufspace: 3441033216

Did anyone else use this tunable and get results?

Many thanks
Richard

On Mar 22, 2013, at 6:32 PM, Richard K.
[email protected] wrote:

Hi

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
http://serverfault.com/questions/64356/freebsd-performance-tuning-sysctls-loader-conf-kernel
and here http://wiki.nginx.org/FreeBSDOptimizations
However, I can’t get the value of ‘vfs.maxbufspace’ to increase:
kern.maxbcache: 21474836480
vfs.maxbufspace: 3441033216

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
200MB,
due to KVA constraints; and buffer space is reserved in KVM on early
boot).
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
/boot/loader.conf
With your current maxbufspace value, it’s kern.nbuf=210024 now.


Sergey Kandaurov
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs