Here’s some optimal Samba and NFS settings for the best macOS ↔ Linux file-sharing performance.

Linux server — Samba

/etc/samba/smb.conf

[global]
    server min protocol = SMB3_00
    server multi channel support = yes
    smb encrypt = off
    server signing = disabled
    ea support = yes
    vfs objects = catia fruit streams_xattr
    fruit:aapl = yes
    fruit:metadata = stream
    fruit:model = MacSamba
    fruit:copyfile = yes
    fruit:posix_rename = yes
    fruit:zero_file_id = yes
    fruit:veto_apple_double = no
    fruit:wipe_intentionally_left_blank_rfork = yes
    fruit:delete_empty_adfiles = yes
    readdir_attr:aapl_max_access = no
    use sendfile = yes
    aio read size = 1
    aio write size = 1
    strict sync = no
    kernel oplocks = no

[share]
    path = /srv/share
    read only = no
    fruit:time machine = no

ZFS

xattr=sa
atime=off

XFS mount option

noatime

macOS — SMB client

/etc/nsmb.conf

[default]
protocol_vers_map=4
signing_required=no
mc_prefer_wired=yes
notify_off=yes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

Linux server — NFS

/etc/nfs.conf

[nfsd]
threads=32
vers3=n
vers4.0=y
vers4.1=y
vers4.2=y

/etc/exports

/srv/scratch  192.168.1.0/24(rw,async,no_subtree_check,fsid=1,sec=sys)

/etc/idmapd.conf

[General]
Domain = yourdomain

macOS — NFS client

/etc/nfs.conf

nfs.client.mount.options = vers=4,tcp,rsize=1048576,wsize=1048576,readahead=128,nfc,async
nfs.client.allow_async = 1
nfs.client.default_nfs4domain = yourdomain
nfs://server/srv/scratch

Network

10GbE
MTU 9000
Wired Ethernet
NIC offloads enabled
ethtool -S eth0