os x leopard samba slowness fix

It’s been a year since I purchased my Mac Mini running OS X Leopard, and copying files from my file server (Samba on FreeBSD) to the Mac has been excruciatingly slow — I can’t believe I lived with that abysmal performance all this time. Mentioned it to a coworker who said he’d heard of a known issue with Macs and Samba… so I googled it this morning and found the following fix: add the following line to the /etc/sysctl.conf file (or in my case, create the file) on the Mac:

net.inet.tcp.delayed_ack=0

Now performance is normal — what it should have been from the start. Why didn’t I research this sooner? Maybe cuz as a mac n00b I just figured macs were slugs accessing SMB shares…I was ready to assume the worst. Whatever, I’m happy it’s finally fixed.

9 Responses to “os x leopard samba slowness fix”

  1. Josh Says:

    I don’t mean to rib you too hard on it.. but anytime you ’settle for less’ when on a Mac, research it cause there’s always a way to make a Mac kick the living shit out of Windoze. :)

  2. frog Says:

    yeah but linux frequently kicks both of those proprietary systems. I can tell ya this could become quite a lengthy conversation as soon as I start mentioning what windoze does that the mac doesn’t (scanning), what linux does better than both etc. maybe i’ll save it for f2f. suffice 2 say I use them all for various reasons but would choose linux if I had to use only one.

  3. Thomas Westring Says:

    Where, on the mac, can I find the “/etc/sysctl.conf” file?

  4. frog Says:

    Thomas, /etc is not visible from Finder. I used a terminal window to list the /etc folder contents, and since this particular file wasn’t there, I just created it with the entire contents being that single line. The file is read by Mac OS X when the network is started on boot.

  5. Thomas Westring Says:

    Wow, you make it sound simple :-)
    I´m just a graphic designer. Is it possible for you to give the “details for dummies”, or should I just keep my fingers away?!

  6. Thomas Westring Says:

    Hi.
    My system supporter helped me with the Terminal thing. Unfortunally it didn’t work. My upload to the server is very fine (gigabit) but the download is very unstady and slow.
    I have had 2 dif. supporters to help me out without any luck. The only thing I can do, is to set my network to 100 base. But that is offcourse ten times slower.
    Any ideas?

  7. frog Says:

    Sorry Thomas, the fact that only your downloads are slow is a clue but I can’t help you any more than sharing what fixed MY mac. I’m a Mac n00b myself. All I can recommend is googling this problem, which you obviously did to find my post. Good luck.

  8. Thomas Westring Says:

    Im a happy man this morning. My support man got it fixed, by “doing something” on the smb protocol. So if anyone have this problem, you can write me a note on my mail (tw@westring-welling.dk) and I will give his contact info.

  9. Oliver Says:

    I have set this and tested it to ensure that the tweak applied the settings ( it is set to 0) but I can still only read from samba shares at about 7MB/s.

    I can write at about 60MB/s to the samba share. Over AFP or FTP I can read from the same drive at around 45MB/s.

    The other problem I have is that after transfering about 2GB the mac will lose connection with the share. This seems to be a problem with the mac as windows machines don’t have this problem. The samba share is on a ubuntu fileserver (9.04).

Leave a Reply