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

TCP Performance problems caused by interaction between Nagle’s Algorithm and Delayed ACK-Stuart Cheshire

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.

4 replies

Trackbacks & Pingbacks

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *