This article aims to show configuration examples for common configurations. Configuration examples for [[login.conf]], [[sysctl.conf]] or specific parameters required to [[newfs]] for particular setups belong here, but the article should not become a configuration files gallery for every setup. It also does not aim to explain every detail of the configuration. Links should be provided to the relevant detailed documentation.
For performance-oriented configuration details, also see [[Tuning NetBSD for performance]].
This article is a work in progress.
# Desktop PC
Generally, desktop systems run applications which heavily require executable and stack pages. Part of the file buffer cache may be sacrificed in most cases to permit the system to keep more executable pages in live memory.
sysctl.conf:
vm.execmin=14
vm.filemin=1
vm.execmax=70
vm.filemax=10
kern.maxvnodes=32768
login.conf:
default|:\
:datasize=256M:\
:memoryuse=256M:\
:stacksize=64M:\
:maxproc=2048:\
:openfiles=2048:\
:priority=-1:
kernel configuration:
options SHMMAXPGS=32768 # 2048 pages is the default
# Database server
## PostgreSQL
PostgreSQL recommends the following in its documentation:
options SYSVSHM
options SHMMAXPGS=4096
options SHMSEG=256
options SYSVSEM
options SEMMNI=256
options SEMMNS=512
options SEMMNU=256
options SEMMAP=256
Also recommends to enable **kern.ipc.shm_use_phys**.