Delayed ACK in OS X is incomprehensible…
I still don’t understand exactly why OS X ships with Delayed ACK but it sure does kill network performance immensely – at least with a Freenas based server. Modifying the Delayed ACK parameter will greatly improve you OS X network performance.
Today I was transferring a few files from the server to a Macbook running Leopard 10.6.2 and found it pokey. A quick check of the network throughput revealed ~275KB/sec over a wireless N connection. A quick look at the delayed ack reveled a value of “3”. I changed the value of “3” to “0” and throughput jumped to 4+MB/Sec. Much better.
To check Delayed ACK Value
$ sudo sysctl -a | grep net.inet.tcp.delayed_ack
kern.exec: unknown type returned
net.inet.tcp.delayed_ack: 3
To change Delayed ACK Value
$ sudo sysctl -w net.inet.tcp.delayed_ack=0
net.inet.tcp.delayed_ack: 3 -> 0
A good read detailing this phenomenon
Update:
When I posted this I forgot that “sysctl -w” does not survive a reboot, it simply makes the setting active immediately. You must create /etc/sysctl.conf with net.inet.tcp.delayed_ack=0 in it for the setting to remain persistent. Personally I do sudo -s, add password and use vi to create the sysctl.conf file.
NB. Since 10.5, a value of 3 means ‘use Greg Minshall’s “Proposed Modification to Nagle’s Algorithm“.’ (reference: http://rolande.wordpress.com/2010/12/30/performance-tuning-the-network-stack-on-mac-osx-10-6/).
You can save a step by losing the grep:
sysctl net.inet.tcp.delayed_ack
Or see the whole class:
sysctl net.inet.tcp