KB450114 – macOS Samba Optimization

Last modified: May 4, 2021
You are here:
Estimated reading time: 1 min

macOS Samba Optimization


This article will guide how to configure a samba share to optimize performance and compatibility with macOS

The following performance tunes have been tested with macOS Big Sur (11.2.3). Previous/Future versions will benefit as well but trial and error are recommended.


Required steps:

These will always give benefit, they should always be configured.

  • Disabling SMB Signing on the macOS clients
  • Using VFS_FRUIT in samba share

Additional Steps:

These may provide some benefit, but at the cost of possible functionality loss. Testing with end user workflow recommended.

  • Veto AppleDouble Files


SMB Signing

Since the release of OS X 10.11.5, Apple’s SMB Signing has been enabled by default.

SMB Signing digitally signs at the packet level of the SMB communication. This enables the receiver of the packets to confirm the point of origin and it’s authenticity. This security mechanism helps avoid issues like tampering and “man in the middle” attacks – as long as you’re on a secure network.  However, this causes poor performance –  to disable this option see below.

  1. On each Mac OSX client:
    • echo “[default]” » /etc/nsmb.conf
    • echo “[default]” » /etc/nsmb.conf
  2. Reboot client

To verify it worked run:

  • smbutil statshares -a
    • If “SIGNING_ON TRUE” is not present, then signing is disabled


Use the vfs fruit object to enhance OS X performance. See vfs_fruit man page for reference.

Catia and Fruit in combination with streams_xattr significantly enhances performance/compatibility of samba network shares and OSX. This should always be used whenever the environment contains OSX clients. This is safe to use with mixed environment of windows and OSX clients.

  • Add to smb.conf [SHARE] definitions that will be used by macOS clients
vfs objects = catia fruit streams_xattr
fruit:encoding = native
fruit:metadata = stream

Additional Steps

Veto AppleDouble Files

Veto the creation of ._ and .DS_Store files on the network fileshare to increase directory performance.

NOTE that certain OSX applications require these files to function correctly.
Test workflow with these disabled to verify.

  • Add to smb.conf [SHARE] definitions that will be used by osx clients
    • veto files = /._*/.DS_Store/
    • delete veto files = yes
  • Delete existing ._ and .DS_Store files on the share
    • cd /FILE/SHARE ; find \( -name “.DS_Store” -or -name “.Trashes” -or -name “._*” -or -name “.TemporaryItems” \) -delete
  • On each OSX client, disable the creation of .DS_Store and ._ on network shares
    • defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Was this article helpful?
Dislike 0
Views: 2942
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access