Test results show that macOS writing speeds become unstable and slow when copying files over a network



Network File System (NFS) is a system that allows you to handle files from different terminals by mounting a file system on a computer's storage via a network. YouTuber and engineer Jeff Geering has reported an issue where the file writing speed is somehow slow when using NFS on macOS.

macOS Finder is still bad at network file copies | Jeff Geerling
https://www.jeffgeerling.com/blog/2024/macos-finder-still-bad-network-file-copies

While testing a small NAS using a Raspberry Pi, Geiring found that even with the Raspberry Pi's internal storage speed and PCIe-based storage with over 800MB/s, he was frustrated that he could not get speeds of more than 100MB/s when writing files over the network from macOS via NFS or Samba .

With NFS, the write speed was around 82MB/s.



With Samba, I could reach a maximum of 115MB/s, but it was very unstable, with an average write speed of around 70MB/s.



Mr. Gilling tried to solve the problem by changing settings and using tools, but he couldn't identify where the bottleneck on the macOS side was. So, Mr. Gilling ran some tests.

First, I checked the network connection using

iperf3 , which can measure network bandwidth, and found that the line speed for the 1Gbps connection was 940Mbps, and the line speed for the 2.5Gbps connection was approximately 2Gbps.

Next, we ran a test using IOzone , which checks disk input/output, and confirmed that we were able to write a 50GB test file in 1M chunks to four SSDs (SATA connection) in a raidz1 configuration at a speed of 800MB/s.

The '/etc/nsmb.conf' file does not exist by default in macOS Sonoma, but in past macOS, adding 'signing_required=no' to this file would disable Samba packet signing and improve speed. Mr. Giering forcibly disabled signing, but the problem of slow write speeds was not resolved.

I then tried using cp and rsync to see if the issue was specific to Finder, and both showed stable write speeds to the share, but overall slower.

Next, I launched Transmit , an SFTP client, and used the scp command to copy a directory, which resulted in a stable copying speed of 112MB/s.

So, Geering ran the same test on a Windows 11 PC, and found that the write speed was about 100MB/s on a 1Gbps connection and 150MB/s on a 2.5Gbps connection, while the read speed was the same on both macOS and Windows.




Testing showed that Windows offers faster and more consistent write speeds to network shares than macOS. Geering said that monitoring with Activity Monitor and htop did not reveal any indications of a bottleneck. macOS does not have a tool like Linux's atop that can monitor interrupts and other resources, so Geering reported that he could not determine where the bottleneck on the macOS side was.

'I think we should be happy that network shares are even working,' said Gilling.

in Software, Posted by log1i_yk