Samba Performance for MacOS Clients (TrueNAS Scale)

A less-technical friend of mine was looking for a NAS, so I pointed him at the TrueNAS mini and told him I would help him set it up. Set up went swell (we set up TrueNAS scale because he needed to have access to his music by SMB and over Plex, and I don’t know how to do that in Core), but he uses MacOS and we found that due to Apple “Thinking Different” about how standard protocols should work, SMB share operations are abysmally slow. It was about 10MB/s maximum over a wired connection. My linux laptop could do nearly 100MB/s over wifi.

Some searching led me to find this is apparently a known issue and that Samba has a “fruity mode” that should fix this, but I have yet been unsucessful in enabling that mode or making any other changes on his client or the server to increases speeds.

We tried using NFS, but that process is not user-friendly at all on MacOS. He dropped 2 grand to have a good NAS experience and so far this isn’t it. Does anyone have any experience making SMB tolerable for Mac Clients using TrueNAS Scale?

As you e probably seen, this is a pretty well documented problem. We use Macs at my office and this is my least favorite part of the experience.

Here are the recommendations from the Samba wiki, which I think are helpful.

There are also client-side things that can help, like disabling writing .DS_Store files to the shares. Check this out.

If you can bear it, make changes one by one and test that way you’ll know what is actually making a difference.

1 Like

Thank you so much. I’ll check out these recommendations and see if I can make some headway. I found reference to the fruity mode, but couldn’t find anything this specific, so I appreciate it.

Not that this is an acceptable excuse, but I spent many years administering airgapped datacenters, and have found that my google-fu has suffered greatly.

I maintain Samba servers for a broad mix of computer clients and, while I agree that Samba on the macOS side isn’t as easy as it can be on other OSes, it is possible to get highly performant access to that data.

In my smb.conf file, as part of the [Global] section, I include some tweaks alleged to make macOS performance better:

fruit:aapl = yes
fruit:model = MacSamba
vfs objects = catia fruit streams_xattr
fruit:nfs_aces = no
fruit:zero_file_id = yes
fruit:metadata = stream
fruit:encoding = native

And, in the definitions for each share I also include:

veto files = /._*/.DS_Store/
delete veto files = yes

(This are more for my sanity than anything else…)

I can confirm that none of these changes negatively impacted performance on Windows and Linux clients. And, I can likewise confirm that these changes did improve my SMB access from 40MB/s to closer to 65MB/s.

Recently though I made a change to my primary Mac workstation that has me rethinking my testing. All of my testing had been done via a wired connection to my M1 Pro Macbook Pro via a CalDigit ‘USB-C Pro’ dock (which is actually a Thunderbolt 3 dock, and connected to my Mac via Thunderbolt). This is the machine I saw the 33% speed bump.

I have, for unrelated reasons, upgraded my home network to 2.5Gb and bought a cheap USB-C 2.5Gb adapter, which I’ve since connected to the dock and have stopped using the network jack built into the dock.

I expected this not to impact Samba share performance, and made no attempt to even test, but in my normal activities I was transferring some files from the Samba server (Debian 12 with a ZFS ‘RAID10’ of striped mirrors) and saw reliable performance around 110Mb/s. Essentially, saturating the gigabit connection from the server.

I may find the time to do some further testing - I’m curious to know if this network adapter would perform this well when connected at gigabit speed too. I’m also wondering if my speed limits were more a function of the dock, and if I’d see similar performance with other USB connected NICs.

Just my two cents…

1 Like