fasterdata.es.netfasterdata.es.netESnet Network Performance Knowledge Base

Mac OSX Tuning

General Approach

This page contains information on tuning Mac OSX 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 OC3 (155 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 Mavericks

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

  # OSX default of 3 is not big enough 
net.inet.tcp.win_scale_factor=8
 # increase OSX TCP autotuning maximums
 net.inet.tcp.autorcvbufmax: 16777216
 net.inet.tcp.autosndbufmax: 16777216

Settings for Previous versions of OSX

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

  # SX default of 3 is not big enough
net.inet.tcp.win_scale_factor=8
# for 10G hosts it would be nice to increase this too, but
# 4G seems to be the limit for some OSX installations
kern.ipc.maxsockbuf=16777216

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