When it comes to file-sharing protocols, NFS is typically considered the best for its solid performance. But between its complex authentication and permission management, NFS can be rather annoying to use, which makes SMB a better option for folks who want a simple way to share files between multiple devices. Plus, its superior compatibility with different operating systems is just the cherry on top.

Better yet, modern Network-Attached Storage distributions include a handful of settings for customizing SMB shares. Whether you’re looking to bolster write speeds for multiple clients or just want to make the file transfer operations smoother for one specific device, here are some settings worth checking out when you rely on SMB shares as much as I do.

Enabling RAM caching

The easiest way to bolster SMB transfer speeds

Aside from the speed and number of network ports, I pay a lot of attention to the RAM when I go about buying (or even building) a NAS. That’s mostly because I prefer distros that support RAM caching on my storage servers, and it’s by far the easiest method for enhancing the transfer speeds of my network shares, including those running on the SMB protocol.

For the uninitiated, RAM caching uses the excess memory as a blazing-fast buffer to store frequently-accessed data. This makes read operations extremely fast – to the point where you’ll see massive improvements when accessing files stored on hard drives. The only caveat is that RAM caching can require a lot of memory investment, even more so when you’re using something as RAM-intensive as ZFS as the underlying file system. But if you’ve got memory to spare, RAM caching can work wonders for your SMB shares.

Configuring SMB Multichannel

It requires a lot of elbow grease on TrueNAS

Although RAM caching can provide some extra oomph when accessing files, it’s bound to get throttled by the max speeds supported for your network port. However, modern NAS devices tend to ship with more than one RJ45 connector, and SMB supports a neat facility that can combine them to send twice as much data between a single client-server pair. And no, I’m not talking about link aggregation, which is more about load-balancing than increasing transfer speeds for a single client.

I’m referring to SMB Multichannel, which can combine two (or even more) ports between the client device and the NAS server to make SMB shares twice as fast (provided your drives are capable of hitting those speeds). Let’s say you’ve got two 2.5G ports on your NAS as well as your PC. Enabling SMB Multichannel will let the pair transfer files as though they were on a 5GbE connection.

Unfortunately, enabling SMB Multichannel can be a royal pain on TrueNAS, as you’ll have to ensure the two LAN connections are on different subnets. Using a VLAN can help you assign each client-server connection to a separate VLAN with its own subnetwork. But considering the prices of high-speed managed network switches, you’ll have to spend quite a bit of money just to meet this requirement.

The rest of the process is simple, as all you have to do is toggle the SMB Multichannel option within the Advanced Settings section of your SMB share on TrueNAS. If you’re on a Windows client, you can run the Set-SmbServerConfiguration -EnableMultiChannel $true command inside PowerShell and enjoy the improved transfer speeds over your SMB Multichannel connection.

Disabling packet signing, .DS_Store file creation, and NetBIOS

Handy for Mac users

I’ve mostly used SMB shares for my Linux and Windows systems, so I wouldn’t call myself very proficient in the way macOS handles things. As such, I was a bit concerned when I noticed my MacBook’s transfer speeds were painfully slow, though I chalked that up to the terrible Wi-Fi speeds on my home network. Unfortunately, things were the same even after I bought a Wi-Fi 6 router, which prompted me to look into some forums.

I eventually ran into a Reddit thread, where user macmaverickk suggested a handful of tweaks. Although some of them technically lower the security of my system, I’ve got a tight firewall hosted on a local SBC, so I figured I could try running these commands. Once I’d signed in as the superuser, I ran the following command block:

echo “[default]” >> /etc/nsmb.conf; echo “signing_required=no” >> /etc/nsmb.conf; echo “streams=yes” >> /etc/nsmb.conf; echo “notify_off=yes” >> /etc/nsmb.conf; echo “port445=no_netbios” >> /etc/nsmb.conf; echo “unix extensions = no” >> /etc/nsmb.conf; echo “veto files=/._*/.DS_Store/“ >> /etc/nsmb.conf; echo “protocol_vers_map=6” >> /etc/nsmb.conf; echo “mc_prefer_wired=yes” >> /etc/nsmb.conf; defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE; exitTo my surprise, it boosted the transfer speeds considerably. Of course, using SMB over Wi-Fi instead of Ethernet made some commands (like echo “mc_prefer_wired=yes”) rather useless, so you might want to run the block after going through what each command does. Me? I’m just satisfied that I don't get abysmally low performance when using SMB shares with my MacBook.

Upgrading my network stack delivered the biggest improvements though

Although my tweaks boosted the performance of my SMB shares, upgrading my network hardware is what really spiked my transfer speeds. A 10GbE switch was easily the most expensive investment, and grabbing some 10 Gigabit NICs for my PCs and custom-built servers added to the overall upgrade cost. Not everyone needs such high-speed connectivity in their home labs, but combine 10G speeds with RAM caching and SSD pools, and you'll never have to worry about slow SMB connections again.