general VM / KMEM tunables question

Jim Keller jim at centerfuse.net
Mon Oct 23 05:53:24 UTC 2006


Trying to tune a new system (FreeBSD 6.1) for the best performance 
(moderately busy webserver, but nothing over the top). However, I'm 
having a lot of trouble finding documentation on VM sysctl tunables. I 
have run into the (somewhat common) issue before of running out of 
PV_Entries due to Apache getting busy, so my current webserver kernels 
all have the following in them:

options KVA_PAGES=512
options PMAP_SHPGPERPROC=401

However, these values were only chosen because they seemed to fix my 
problem, not because I'm entirely sure they're the best possible values. 
How does one go about determining how many KVA_PAGES and 
PMAP_SHPGPERPROC to set? Also, are there sysctl OIDs for these options? 
Poking around google, I've seen mention of vm.pmap.pv_entry_max and 
vm.pmap.shgperproc, but those OIDs do not exist on my system as far as I 
can tell.

I also have the following in my sysctl.conf, but again I'm not sure how 
I initially came up with these figures (though they do work), and I 
wanted to get a better handle on my system tuning:

vm.v_free_min=8192
vm.v_free_target=16384
vm.v_free_reserved=8192
vm.v_free_severe=16384

Basically just trying to get some clues as to how to figure out (based 
on system config) what these values should reasonably be set to.
Thanks.

-Jim Keller



More information about the freebsd-questions mailing list