swap zone exhausted, increase kern.maxswzone

Martin Hudec corwin at aeternal.net
Sat May 5 17:12:14 UTC 2007


Marc G. Fournier wrote:
> Apparently that doesn't exist on 6-STABLE, although its generating the error?
> 
> # sysctl kern.maxswzone
> sysctl: unknown oid 'kern.maxswzone'

As in /usr/src/sys/conf/NOTES:
...
# 2.  In /boot/loader.conf, set the tunables kern.maxswzone,
#     kern.maxbcache, kern.maxtsiz, kern.dfldsiz, kern.maxdsiz,
#     kern.dflssiz, kern.maxssiz and kern.sgrowsiz.
...

As in man loader:

kern.maxswzone
Limits the amount of KVM to be used to hold swap meta
information, which directly governs the maximum amount of
swap the system can support.  This value is specified in
bytes of KVA space and defaults to around 70MBytes.  Care
should be taken to not reduce this value such that the
actual amount of configured swap exceeds 1/2 the kernel-
supported swap.  The default 70MB allows the kernel to sup-
port a maximum of (approximately) 14GB of configured swap.
Only mess around with this parameter if you need to greatly
extend the KVM reservation for other resources such as the
buffer cache or NMBCLUSTERS.  Modifies VM_SWZONE_SIZE_MAX.

Also check -hackers maillist for following and the replies:
http://lists.freebsd.org/pipermail/freebsd-hackers/2007-January/019217.html

Martin


More information about the freebsd-stable mailing list