www.devco.net by r.i.pienaar

11Apr/052

OS X to Samba slow performance

I have been really annoyed at this iBook since it was very very slow to my Samba servers - around 200kb/sec - and no amount of fiddling the Samba could get it to go fast.
First I tested using my Windows machines to the Samba servers in question and they were very fast as you'd expect, the Apple just wasn't fast at all. Today when I got to work for the first time in ages I noticed that accessing my RedHat Enterprise Samba server is fast, so tonight I upgraded my Samba's at home to version 3 and that fixed it.
So if your OS X is performing slow to Samba servers, make sure you are on the 3 branch of Samba.
UPDATE: After this I was still having some issues, especially with very slow read performance.
I came across this post on macosxhints and figured I'd give it a try, sorted, reading and writing is much faster now.

About R.I. Pienaar

Systems Administrator, Consultant, Linux Guy, Automator, Ruby Coder
Comments (2) Trackbacks (0)
  1. 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]
    Apologies for the lack of formatting – couldn’t figure out how to get paragraph spacing on this blog.

  2. Hi!
    What version fo Mac OS X do you have?
    We’re interested on this to recommend it as a tip to our user group (Amahi Linux Home Server).
    I experience some delays when selecting access to my Amahi LHS, something like 3 seconds to “connect”. Performance is ok, though it seems slow, so I wanted to try it.
    So far we have tried it with 10.5.1, however, the difference is not noticeable with a value of 0.
    The previous value was 3. We set it to 0.
    HOWEVER, we tried with a different machine, with 10.5.2 in it, and it was very snappy!
    Carlos


Leave a comment


Trackbacks are disabled.