I’ve been using FreeNAS for about a year now to host content for my XBMC and other things, such as my iTunes Library and family photos. One thing that’s always bothered me is on Windows, it’s been fast and responsive, but on my MacBook Pro (running tiger) it crawls at about 150-200kbps, even when plugged into the same switch as the NAS.
Today, I was copying over an audio file (AK1200 Live in San Francisco to be exact) and i finally decided enough is enough. Finally found a way to fix it, that was apparently posted in 2005 (i’m a little slow). It’s not the actual blog post, but the comment under it. So, just in case anyone is having the same problem, here is the solution.
This didn’t work for me, but setting the sysctl parameter net.inet.tcp.delayed_ack to 0 did! For me, the results were dramatic: drag-and-drop of a 100MB .wav file from the samba server took 45 minutes before the fix, and < 2 minutes after the fix. Wahoooo!
Found the info here: http://julipedia.blogspot.com/2006/02/samba-performance-under-mac-os-x.html
[in case that link vanishes, here's the short version:
use 'sudo sysctl -w net.inet.tcp.delayed_ack=0' on command-line to try it (persistent until reboot) and put the line
'net.inet.tcp.delayed_ack=0' in /etc/sysctl.conf to fix it 'permanently' -- note: I haven't tested the latter yet. I had to create the sysctl.conf file, and haven't rebooted yet]
and a good discussion of *why* it works, starts at the bottom of that same blog entry, then links to the crux of the problem here:
http://mail-index.netbsd.org/tech-net/2003/01/28/0004.html
[It's a TCP bug inherited from the FreeBSD stack - the same bug was fixed in NetBSD back in 1997, and Apple has known about it since before Jaguar release]
Tags: osx, samba, freeNAS, file sharing, home networking
Posted: May 17th, 2008 under Computers.
Comments: 1