File copy over AFP / SMB very slow on Mavericks

Discussion in 'OS X Mavericks (10.9)' started by xinevil, Jan 5, 2014.

  1. xinevil macrumors newbie

    Jul 12, 2008
    Hi guys.

    I have a retina macbook pro (early 2013) and a mac mini (late 2012).
    Both are running 10.9.1. The mac mini has OS X server installed and 2 USB 3.0 harddisks attached to it in RAID0.
    I have a Thunderbolt display hooked up to my MBP. I have a 1gbit wired network between the two machines.

    Now comes the problem: file copy from the USB 3.0 RAID array to the macbook pro over AFP or SMB is slow, I only get around 8 MB/sec.
    First I thought it was a wiring issue (I created my own ethernet cables). However, I tried copying the file via SCP (i.e. SSH) and then I get 50 MB/sec. Still not close to the maximum for gigabit, but at least a lot higher than 8 MB/sec.

    I tried googling if anybody else has the same issue, but couldn't really find definitive answers.

    I have tried everything with both jumbo frames of and on. Both give the same results.

    What's even stranger is if I connect my MBP over 5 GHz to my airport instead of wired, I get 20 MB/sec over AFP....

    As far as I know the problem did not arise in the pre-Mavericks time.

    Does anybody have any suggestions or solutions? 8 MB/sec is not really that nice :(
  2. stooovie macrumors 6502a

    Nov 21, 2010
    That's weird, i just today noticed my AFP speeds are almost DOUBLE with 10.9.1 than ever before (45-50 MBps compared to 20-25 before).
  3. xinevil thread starter macrumors newbie

    Jul 12, 2008
    That indeed is different from what I am getting. Tonight I will try copying the other way (MBP > Mac mini) to see if this is also slow or not
  4. maflynn Moderator


    Staff Member

    May 3, 2009
    If you're using a USB drive, why are you copying with AFP or SMB or what am I missing? :confused:
  5. xinevil thread starter macrumors newbie

    Jul 12, 2008
    The USB drive is on my Mac Mini and I want to copy it from my MBP (USB drives are always connected to mac mini as I am using it as a file server)
  6. xinevil thread starter macrumors newbie

    Jul 12, 2008
    OK did some more testing and found some interesting things:

    First of all, copying back from my MBP to my Mac Mini went with speeds up to 90 MB/sec. However I copied to the SSD in my mac mini and not the USB 3.0 RAID array.
    So then I copied back from the Mac Mini SSD to my MBP and that also gave speeds of up to 90 MB/sec.

    So it seems AFP / SMB over USB 3.0 is not really working that well. I still find it strange SCP'ing the files does get higher speeds (although still not 90 MBps)
  7. freejazz-man macrumors regular

    May 12, 2010
  8. xinevil thread starter macrumors newbie

    Jul 12, 2008
    What I mean is SMB / AFP over network but like this:

    MBP -> gigabit network -> Mac mini -> usb 3.0 -> RAID 0 hard disk array
  9. Galaxie500 macrumors newbie

    Oct 12, 2011
    I'm having very similar problems with my late 2013 MBP 13". File copies over the network, whether SMB or AFP, are very slow...usually less than 15 MB/sec, even over GigE (using the Apple TBolt adapter). But, if I open a terminal window and check my network performance using iperf to the same NAS box, I get well over 900 mbits/sec--pretty close to full gigabit speeds.

    Furthermore, if I boot Windows 8.1 in Parallels, I can copy files (again over the same network connection, same server) at something like 70 MB/sec. I've also tried different servers as targets, including Solaris-based, Linux, Windows 8.1, and an Airport Time Capsule (via AFP) and all have about the same performance. I think I also tried SFTP and it was pretty poor as well.

    So as near as I can tell, the slowdown appears to be somewhere in the interface between the network stack and the higher level file copy functions of the OS. Parallels and iperf must be hooking into Mavericks at a lower level where performance is still good.
  10. snarfquest macrumors regular

    Jun 7, 2013
    I'm getting 80-82MB/sec to my OS X server which is basically the Max 1gb links will do.
  11. JWiegley macrumors newbie

    Nov 3, 2006
    That is not the fastest that Gb Ethernet will do. I am copying files over Samba using 10.9 right now to my ZFS RAID-10 file server over Gb Ethernet, and I get a constant 109 MB/s throughout the entire transfer.

    My Setup:

    1. MacBook Pro Retina (early 2013) with Thunderbolt Gb Ethernet adapter.
    2. Cat-6 cabling throughout.
    3. Netgear GS108T 8-port Ethernet switch.
    4. Intel Gb Ethernet NIC card on the file server using PCI 2.0.
    5. Server is Ubuntu 12.04 running Samba 3.

    I recommend always testing network bandwidth issues first using the utility iperf. Run "iperf -s" on your server, and "iperf -c <IP ADDR>" on your Mac client. If it's anything less than 940 Mbit/sec on Gb Ethernet, then you have other problems. I'm just using an MTU of 1500 to do these tests, since setting it to 9000 not only degrades iperf results, but causes Samba on the Mac to completely deadlock in the kernel.

    A last note: If you are using SSH to transfer files within such a local network, then using your .ssh/config file set the Cipher to arcfour256, and Compression off, between those two hosts. With that setting, I get 109 MB/s when using rsync too. If I don't change the Cipher, I get around 80 MB/s due to encryption overhead.
  12. kagharaht macrumors 6502a

    Oct 7, 2007
    I decided to test my simple setup.

    MacBook Pro - Mavericks - 1GB Cat5e to Airport Extreme 5th Gen
    iMac INTEL - 1GB Cat5e to Airport Extreme 5th Gen

    Mount a volume (USB 2) drive attached to the iMac on my MacBook Pro.

    Running test with LAN_Speedtest
    Upload/writing 57-60Mbps
    Reading/Download 765-800Mbps

    It's a huge difference between writing and reading from AFP mounted volume.
  13. Michael Rynn, Aug 12, 2014
    Last edited: Aug 12, 2014

    Michael Rynn macrumors newbie

    Aug 12, 2014
    Unbelievably slow write to CIFS server across ethernet from MacBook Mavericks

    Similar issue.
    I have just purchased a newish MacBook model 11
    Writing a large file to a server via a CIFS protocol via finder is incredibly slow.
    The souped up multicore intel i7 had nothing much else to do.

    Using Ethernet USB as network interface.

    Strange behaviour, if I open other files and folders on the destination server during the copy, the progress bar makes much faster jumps, and the minutes remaining reduce.

    Its as if the driver software is waiting back for a reply, or anything else to flush network packets through the stack.

    As the ethernet connection was used to download the entire OS, in about 1 hr 20 min, I presume the slow speed is due to OS software drivers, or file server protocol drivers.

    This indicates that Apple has not paid enough attention to testing for efficiency and performance. It doesn't crash the system, but on
    Ethernet 100-1000 at my home to a file server, I expect better. Apple should keep up its performance when it comes to other companies network protocols. The slowness would really annoy the users in a mixed corporate environment, if the PC on the next desk is doing it really fast to the same server.

    I intend to install Linux dual boot, on the same Macbook, which is what I use on my non-portable PC box, and see if its significantly faster. I was going to do this anyway.

    Update Edit :
    I did some clumsy struggle with reFind as an alternate boot, and an install of Arch Linux to leave 160 MB for the Mac.
    After success, I find the reFind boot selection screen much more appealing than the option - boot apple selection.
    I confirm the following : Copying using Cinnamon desktop and Nemo on Arch Linux , smbclient cifs mount - took less than a minute, for a 370 MB of video file. Thats sourced from a USB drive , pushed through the USB ethernet dongle.
    On booting Mac OS, the same setup copying a similar file takes forever. It hasn't even finished its "Zero bytes of 367 MB - Estimating time remaining", by the time the Linux setup would have completed. After poking to read the directorie of some other folders on the server, the copy progress finally moves, and time remaining says, "about an hour".

    I call this sort of performance comparison "Cripple-Ware".

    Well I have a long list of chores to do. I did the kitchen floor. Moved chairs , bins, cat stuff out, picked up bits, vacuumed, then a bucket of Ajax and a spongy thingo mop. Nice physical exercise for 40 minutes. Came back to the mac. Still copying. Only 4 minutes to go. While rincing the floor sponge, I had the inspiration to cut out the GUI interface by using Terminal commands, as this would test the underlying GNU based software.

    A simple cp <srcpath> <destpath> reveals that this is no faster. Looks like I need wait 40 minutes for the command prompt to return.

    With well-coded opensource implementations of smbclient being available, there is no excuse for this slackness. Its as if there is some code in the Mac OS driver implementation, that insists on reading one byte per network packet, or has a wait loop, if the server is not using "Apple Proprietory Protocol".
    This is low level bread and butter stuff, Apple. Get it right!
  14. Michael Rynn macrumors newbie

    Aug 12, 2014

Share This Page