Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Enable macOS Server Performance Mode

Performance mode changes the system parameters of your Mac. These changes take better advantage of your hardware for demanding server applications.

A Mac with macOS Server that needs to run high-performance services can turn on performance mode to dedicate additional system resources for server applications. Note, however, that performance mode can be enabled even without macOS Server being installed to achieve similar benifits for other high-performance services.

sudo nvram boot-args="serverperfmode=1 $(nvram boot-args 2>/dev/null | cut -f 2-)"
sudo reboot

Reference: https://support.apple.com/en-us/HT202528.

Changes to sysctl -a output before/after enabling

Changes shown in parameter: before -> after format. The full diff output of sysctl has been cleaned up a quite a bit to exclude things that are obviously not tuning params (like uptime and counters or stats, for example)

kern.maxvnodes: 263168 -> 300000
kern.maxproc: 2128 -> 5000
kern.maxprocperuid: 1418 -> 3750
kern.ipc.somaxconn: 128 -> 1024
kern.ipc.nmbclusters: 65536 -> 98304
kern.ipc.njcl: 21840 -> 32768
kern.bootargs:  -> serverperfmode=1 
kern.timer.longterm.threshold: 1000 -> 0
kern.timer.longterm.qlen: 155 -> 0
kern.timer.longterm.scan_pauses: 282 -> 0
kern.progressmeter: 685 -> 674
net.inet.ip.rtexpire: 10 -> 3600
net.inet.ip.maxfragpackets: 2048 -> 3072
net.inet.tcp.fastopen_backlog: 10 -> 200
net.inet.tcp.tcbhashsize: 4096 -> 8192
net.inet6.ip6.maxfragpackets: 2048 -> 3072
net.inet6.ip6.maxfrags: 4096 -> 6144
ktrace.background_pid: 80154 -> 0
ktrace.configured_by: tailspind -> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.