Wednesday, February 4, 2009

OSX ssh

I have had ongoing problems with OSX's ssh. Connections would essentially time out when transferring a lot of data. Others have too, see http://www.speedguide.net/faq_in_q.php?category=89&qid=129 and http://lists.apple.com/archives/Macnetworkprog/2006/Oct/msg00030.html for example. I have packet captures that i'll try to post here. Quick fix is "sudo sysctl -w net.inet.tcp.delayed_ack=2".

More: turning other parameter dramatically increases OSX's performance on high speed links. See http://www.psc.edu/networking/projects/tcptune/ for example. I created /etc/sysctl.conf than contains:
net.inet.tcp.delayed_ack=2
kern.ipc.maxsockbuf=500000
net.inet.tcp.sendspace=250000
net.inet.tcp.recvspace=250000
net.inet.tcp.mssdflt=1460
More still: the delayed_ack seems to be the critical one...

2 comments:

drb80 said...

More info. Adding "net.inet.tcp.sack: 0" to /etc/sysctl.conf seems to help a lot. I'll post later if I find out more.

drb80 said...

I did find out more. Use "sysctl net.ipv4.tcp_sack=0" on Linux.