Fix slow network file transfers across Mac OSX Lion

Sud­denly, after the upgrade from Snow Leop­ard to the much vaunted OSX Lion, my wire­less trans­fers over a home LAN net­work became slug­gish. It was tak­ing a few *min­utes* to trans­fer a sim­ple file.

Appar­ently I am not the only one with these issues.

I tried a few fixes gleaned from a bunch of sep­a­rate threads on the Apple forum, and off the web. Not every­thing is a smart sug­ges­tion. Here's what finally works, so hope this saves some peo­ple with sim­i­lar prob­lems the time:

[You need root access for the "sudo" bits of the fol­low­ing code to work, of course.]

1
2
3
sudo bash -c "echo 'net.inet.tcp.delayed_ack=0' >> /etc/sysctl.conf"
sudo bash -c "echo 'net.inet.tcp.recvspace=40960' >> /etc/sysctl.conf"
sudo bash -c "echo 'net.inet.tcp.rfc1323=0' >> /etc/sysctl.conf"

Make sure the sin­gle quotes remain sin­gle quotes in the above code share. These new sysctl set­tings will take effect after a reboot.

Another use­ful sug­ges­tion is to dis­able the IPV6 stuff. Not needed for now. Done using:


System Preferences ->
Network ->
Airport (or your WiFi listing) ->
Advanced (button) ->
TCP/IP (tab)

Change the IPV6 to "Link — Local".

  • gilgo­ngo

    Didn't make a blind bit of dif­fer­ence to me on Lion. I have a Mac Book Pro and a Lenovo run­ning Win­dows 7, both are plugged into the same LAN. Access­ing net­work resources over appar­ently any pro­to­col (SMB, Web­DAV and FTP are the ones I've tried) is with­out exag­ger­a­tion about 5 times slower on the Mac.

  • nigelh

    Some­thing very strange about th way you have the live­fyre stuff con­fig­ured. This page keeps reload­ing a cou­ple of track­ing items, every few sec­onds. I noticed this morn­ing that my browser activ­ity log was show­ing this page as hav­ing more than 11,000 items open!  The repeat­ing items are:
     
    http://stream1.livefyre.com/conv/11415916/version/101445223/?.……
    http://usea1l3lc42.livefyre.com:8080/livecountping/11415916/114111434435/?.……
     
    Maybe this is some­thing you should look into, 'cos it don't seem right as it is!

  • nigelh

    Now that's what I call responsive! 😉

  • http://shanx.com/ Near­ly­Nor­mal

    Hi Nigel. I changed it to Dis­qus. Live­Fyre has always been a bit tricky for me. Thx for the heads up.

  • bons

    How do you undo these commands?

  • col

    Did not work for me either. MBA

  • mrfr0g

    Works great on Moun­tain Lion (10.8.2), I've seen a remark­able speed increase.

  • Mark Pentler

    Just wanted to say thanks for this. After hav­ing no issues what­so­ever, one day my Mac Pro with 10.8 on it just decided to slow down dra­mat­i­cally copy­ing over the net­work to our NAS dri­ves. Adding those 3 lines to sysctl seemed to improve things by a fac­tor of lit­er­ally 10 if you mea­sure the speed. Incredible!

  • alligator69

    Hi. I'm hav­ing this same issue with 10.8.2 with a late 2009 27in iMac. I need to trans­fer a 400 GB iTunes Music Library music files folder over my net­work back to my newly replaced HD in the Mac and am get­ting painfully slow trans­fer speeds like 2 hrs. to copy a 7 GB folder. The files are not in a disc image backup folder that I can con­ve­niently do a "Restore from backup" on as my Time Cap­sule drive also ceased func­tion­ing after the "upgrade" to Moun­tain Lion 10.8.2. leav­ing me with no cur­rent back­ups and ulti­mately delet­ing the old ones as Time Machine thought the disc was full when it wasn't and still did/does regard­less of how many addi­tional old back­ups were deleted, free­ing up even more addi­tional space. (just one of the more egre­gious issues out of many that appeared after installing 10.8.2). In any event, I know noth­ing about inter­nal codes or com­mands or mak­ing adjust­ments to them as in the above exam­ple. Could some­one please help me out with exactly how and where I would add this code to my sys­tem to recover nor­mal oper­at­ing speeds? My net­work already has the IPV6 set to local only. Thanks in advance.

  • Bruce

    WOW, you nailed it. My files are trans­fer­ring at least 10 times faster. Ques­tion, can I freely share this good tip.

  • mus0r

    Quick ques­tion– if you are in a OS X client/server envi­ron­ment, should this be done on the Mac server as well?

  • surb

    Hi, same prob­lem like you. I tried your fix, but i didn't solve the Prob­lem.
    I've a macMini server with SL-server an iMac with ML. Copy­ing a 15MB file takes "TEN" min­utes.
    Copy­ing to a NAS is no Prob­lem. Copy­ing from an other Mac with SL no Prob­lem.
    So I'm at a loss what to do.…

  • Dal­guard

    Worked great… Thanks.

  • notreya

    Hello, I am stu­pid and just ran this on Mav­er­icks 10.9.4 and now I can­not see my net­work shares. Help? 😀

  • Joe­Joe The mon­key boy

    I almost did the same thing. Thanks for the post. Any fix yet?

  • imtheone

    Wow. I can oper­ate very quick with these! Spec­tra

  • http://www.fallingbrick.co.uk/ Tom

    Works like a charm, thanks!