Initial configuration

System variables

by ross at 04:51:04 on October 23, 2017

/etc/sysctl.conf:

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
security.bsd.see_other_uids=0

# FS tunables
kern.maxvnodes=307200
kern.maxfiles=307200
kern.maxfilesperproc=300000

# Better handling of CPU-intensive tasks
kern.sched.preempt_thresh=220

# More shared memory
kern.ipc.shmmax=1073741824
kern.ipc.shmall=2097152

# Network
net.inet.tcp.recvspace=65536
net.inet.udp.recvspace=65536
net.inet.udp.maxdgram=131072

# Users can mount
vfs.usermount=1

See also tuning(7).

You might not need that many vnodes (or might need more). Do sysctl -a | grep vnodes after all the services has started to see how many vnodes are in use. Set your maximum to something higher than that (if you ran out of vnodes disk IO will stall). Or use the default which is around 200K.

 

Comments