|45 Drives Knowledge Base
||KB450114 - Mac OSX Samba Optimization
Please refer to this article for an explanation as to why Samba and Finder are slow.
The following performance tunes have been tested with OSX High Sierra. Previous versions should benefit as well but trial and error are recommended.
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.
To verify it worked run:
Use the vfs fruit object to enhance OS X performance. See vfs_fruit man page for reference.
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.
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.
Example of smb.conf for a glusterfs volume.
Note: Bolded text are options added for enhanced OS X compatibility.
comment = For samba share of volume fileshare
vfs objects = fruit streams_xattr glusterfs
glusterfs:volume = fileshare
glusterfs:logfile = /var/log/samba/glusterfs-fileshare.%M.log
glusterfs:loglevel = 7
path = /
read only = no
guest ok = yes
kernel share modes = No
valid users = @45D,root
ea support = yes
veto files = /._*/.DS_Store/
delete veto files = yes