FreeBSD 6.2 kernel parameters (Was Re: reboot after panic)

Clifton Royston cliftonr at lava.net
Sun May 4 23:48:57 UTC 2008


  I got a couple requests for the tuning settings I've been using; it
seems I'm not the only one who's had problems with FreeBSD 6.x
stability as compared to 4.x.

  I don't understand the kernel well enough to say whether any of these
are to any extent "right", but despite being pure voodoo, they seem to
have helped substantially in performance and stability.  I picked some
of them off the discussion about tuning required to get ZFS running
stably, ditto for discussion of ggatec/ggated.  (The first 3 settings
in sysctl - through kern.ipc.somaxconn - were carried over from my 4.x
config.)

  Here's what I've got, and any solid recommendations from the kernel
developers will I'm sure get close attention, and not only from me. 
I.e. if you can authoritatively tell me I'm an idiot, and some of these
aren't really helping, or tell me what will, great.  As I say, they
seem to help.

  Ditto if someone can really say authoritatively whether 6.3 is in
practice more stable and higher performance than 6.2; with all the
discussed problems on list, and the discussions of known fixes not
being committed, I have not felt confident about making such a move.

/boot/loader.conf:
kern.ipc.nmbclusters="32768"
vm.kmem_size="512M"
vm.kmem_size_max="512M"
kern.maxvnodes="400000"

/etc/sysctl.conf:
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#
# TUNING VALUES confirmed by Cal's mailserver testing
kern.maxfiles=16384
kern.maxfilesperproc=16384
# Speculative: enlarge listen queue for large number of incoming TCP conns
# Default listen queue size = 128, 1024 recommended for busy webservers
kern.ipc.somaxconn=1024
# From FreeBSD mailing list, reported on improving stability with
# ggatec/ggated.
net.inet.tcp.sendspace=1048576
net.inet.tcp.recvspace=1048576
kern.ipc.maxsockbuf=2049152
# Disable hyperthreading "logical CPUs"
machdep.hlt_logical_cpus=1

  -- Clifton

-- 
    Clifton Royston  --  cliftonr at iandicomputing.com / cliftonr at lava.net
       President  - I and I Computing * http://www.iandicomputing.com/
 Custom programming, network design, systems and network consulting services


More information about the freebsd-stable mailing list