[SOLVED!] Very slow file transfer on Mac Shares (SMB/AFP)
Once I implemented this fix I went from getting 10MB/s to getting over 500MB/s+ (both read & write) on my Mac laptop connected over Wifi.
On MacOS 10.13.x I was getting terrible network transfer speeds from my Mac laptop to the network share being served by another mac. We were only getting 10MB/s which was not even enough to stream videos at 720p but yet on the iMac this external RAID array was attached to we were getting 200MB/s+ and could stream 2160p30 (4k) videos no problem.
Server serving the network share:
MacOS High Sierra (10.13.6), External 24TB RAID array in RAID 10.
Client access the network share (SLOW):
MacOS High Sierra 10.13.4 (also happens in 10.13.5)
The fix:
Make the change temporary (without rebooting):
- Open a terminal
-
1sudo sysctl -w net.inet.tcp.delayed_ack=0
- Close and re-open Finder and see if the problem goes away. Also close and re-open your throughput testing app (in my case BlackMagic Disk Speed Test app) before testing again (required!). This setting for me was set to 3, changing it to 0 fixed it and then changing back to 3 caused it to drop back down to 10MB/s, confirming the resolution.
To make the change permanent (requires reboot):
- Create/edit the file /etc/sysctl.conf
-
1sudo vim /etc/sysctl.conf
- Add this line to the configuration file:
-
1net.inet.tcp.delayed_ack=0
- Save and close file (type “:wq” without quotes, then hit enter)
reboot computer
Open finder and your problem should be resolved. - If it is not, try the guide that shows how to enable vfs_fruit module for Samba, I believe this is only useful if the server hosting the share is NOT a Mac as it enables better Mac compatibility for Samba. You can also try installing Samba instead of the MacOS implementation of SMB.
The Mac laptop that was struggling I had tried multiple known fixes before this:
- Disabling SMB Signing (smb_signing) and it did show it as disabled in the terminal but had no impact for me. I disabled on both server and client and reconnected the share and restarted all services.
- Changing connection from SMB to AFP, reconnected share, no impact
- The final change, disabling Delayed TCP ack, fixed it.