Mac OSX Tuning

General Approach

This page contains information on tuning Mac OS X hosts connected at speeds of 1Gbps or higher. Note that most of the tuning settings described here will actually decrease performance of hosts connected at rates of 100 Mbps or less, such as home users on Cable/DSL connections. Do not make these changes on laptops that connect via WIFI.

Starting with OSX 10.5, Apple added "self tuning TCP", and increased the default maximum socket buffer to 4MB, a much more reasonable value. Unfortunately they also reduced the default win_scale_factor to 3, which prevents the TCP window from ever going above 512K. Be sure to set net.inet.tcp.win_scale_factor as shown below.

Settings for OSX Yosemite/Mavericks/Sierra

These versions of OSX comes with the following defaults:

net.inet.tcp.win_scale_factor: 3 (or 5 in newer versions)
net.inet.tcp.autorcvbufmax: 1048576 (or 2097152 in newer versions )
net.inet.tcp.autosndbufmax: 1048576

It is suggested to apply these settings to /etc/sysctl.conf, and reboot:

  # OSX default of 3 is not big enough 
 # increase OSX TCP autotuning maximums


Settings for Previous versions of OSX

Apply these settings to /etc/sysctl.conf, and reboot:

  # SX default of 3 is not big enough
# for 10G hosts it would be nice to increase this too, but
# 4G seems to be the limit for some OSX installations

More information can be found in this OSX Network Tuning Guide.