Skip to main content
Skip table of contents

macOS SMB client configuration

The following changes should be made to macOS clients to ensure they get the best performance and stability from their 7fivefive NAS system.

On the client that is having the performance issue, follow the steps below. You must run these commands with an administrator account.

A reboot is required after making these changes for them to take effect.

Configuring the SMB client

Applies to macOS 10.x - macOS 12.x Monterey

If your macOS computer has a /etc/nsmb.conf file:

  1. Open the /etc/nsmb.conf file.

  2. Ensure the file contents look like the one below:

    CODE
    [default]
    signing_required=no
    aapl_off=true
    max_resp_timeout=600
  3. Save the /etc/nsmb.conf file.

  4. Disconnect and then reconnect any mounted SMB shares to make the changes take effect.

If your macOS computer doesn’t have an /etc/nsmb.conf file

  1. Open Terminal

  2. Use these commands to create an /etc/nsmb.conf file that has a signing_required value that’s set to “no”: 

    CODE
    sudo -s
    echo "[default]" >> /etc/nsmb.conf
    echo "signing_required=no" >> /etc/nsmb.conf
    echo "aapl_off=true" >> /etc/nsmb.conf
    echo "max_resp_timeout=600" >> /etc/nsmb.conf
    exit
  3. Disconnect and then reconnect any mounted SMB shares to make the changes take effect.

Optimising network kernel parameters

The values below are a good guide, but adjustments may be needed for different network environments, network drivers etc.

Applies to macOS 10.15 (Catalina) - macOS 12.x Monterey

  1. Open ‘Terminal’

  2. Run the command and enter the administrator password

    CODE
    sudo -s
  3. Paste the following commands and hit enter

    BASH
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.maxsockbuf.plist -c "add Label string com.launchd.maxsockbuf" -c "add LaunchOnlyOnce bool true" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string kern.ipc.maxsockbuf=4194304" -c "add RunAtLoad bool true"
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.sendspace.plist -c "add Label string com.launchd.sendspace" -c "add LaunchOnlyOnce bool true" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string net.inet.tcp.sendspace=2097152" -c "add RunAtLoad bool true"
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.recvspace.plist -c "add Label string com.launchd.recvspace" -c "add LaunchOnlyOnce bool true" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string net.inet.tcp.recvspace=2097152" -c "add RunAtLoad bool true"
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.delayed_ack.plist -c "add Label string com.launchd.delayed_ack" -c "add LaunchOnlyOnce bool true" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string net.inet.tcp.delayed_ack=2" -c "add RunAtLoad bool true"
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.win_scale_factor.plist -c "add Label string com.launchd.win_scale_factor" -c "add LaunchOnlyOnce bool true" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string net.inet.tcp.win_scale_factor=8" -c "add RunAtLoad bool true"
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.autorcvbufmax.plist -c "add Label string com.launchd.autorcvbufmax" -c "add LaunchOnlyOnce bool true" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string net.inet.tcp.autorcvbufmax=33554432" -c "add RunAtLoad bool true"
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.autosndbufmax.plist -c "add Label string com.launchd.autosndbufmax" -c "add LaunchOnlyOnce bool true" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string net.inet.tcp.autosndbufmax=33554432" -c "add RunAtLoad bool true"
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.smb_kern_deadtimer.plist -c "add Label string com.launchd.smb_kern_deadtimer" -c "add LaunchOnlyOnce bool false" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string net.smb.fs.kern_deadtimer=0" -c "add RunAtLoad bool true" -c "add StartInterval integer 60" -c "add StartOnMount bool true"
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.smb_kern_soft_deadtimer.plist -c "add Label string com.launchd.smb_kern_soft_deadtimer" -c "add LaunchOnlyOnce bool false" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string net.smb.fs.kern_soft_deadtimer=0" -c "add RunAtLoad bool true" -c "add StartInterval integer 60" -c "add StartOnMount bool true"
    sudo /usr/libexec/PlistBuddy /Library/LaunchDaemons/com.launchd.smb_kern_hard_deadtimer.plist -c "add Label string com.launchd.smb_kern_hard_deadtimer" -c "add LaunchOnlyOnce bool false" -c "add ProgramArguments array" -c "add ProgramArguments: string /usr/sbin/sysctl" -c "add ProgramArguments: string net.smb.fs.kern_hard_deadtimer=0" -c "add RunAtLoad bool true" -c "add StartInterval integer 60" -c "add StartOnMount bool true"
  4. Restart the machine

  5. Confirm the LaunchDaemons are working correctly by checking the values

    BASH
    sysctl -a | grep maxsockbuf # should return 4194304
    sysctl -a | grep sendspace # should return 2097152
    sysctl -a | grep recvspace # should return 2097152
    sysctl -a | grep delayed_ack # should return 2
    sysctl -a | grep win_scale_factor # should return 8
    sysctl -a | grep autorcvbufmax # should return 33554432
    sysctl -a | grep autosndbufmax # should return 33554432
    sysctl -a | grep net.smb.fs.kern # kern_deadtimer kern_hard_deadtimer and kern_soft_deadtimer should all return 0

Currently the maxsockbuf setting does not appear to apply at boot on Monterey. It can be forced manually by running

CODE
sudo launchctl start com.launchd.maxsockbuf

Applies to macOS 10.14 and below

  1. Open 'Terminal'

  2. Run the command and enter the administrator password

    CODE
    sudo -s
  3. Paste the following commands:

    CODE
    echo "kern.ipc.maxsockbuf=4194304" >> /etc/sysctl.conf
    echo "net.inet.tcp.sendspace=2097152" >> /etc/sysctl.conf
    echo "net.inet.tcp.recvspace=2097152" >> /etc/sysctl.conf
    echo "net.inet.tcp.delayed_ack=2" >> /etc/sysctl.conf
    echo "net.inet.tcp.win_scale_factor=8" >> /etc/sysctl.conf
    echo "net.inet.tcp.autorcvbufmax=33554432" >> /etc/sysctl.conf
    echo "net.inet.tcp.autosndbufmax=33554432" >> /etc/sysctl.conf

Disable icon previews and size calculation

Applies to macOS 10.x - macOS 12.x Monterey

  1. Browse to a directory on the NAS

  2. Press CMD + j

  3. Disable “Calculate all sizes”

  4. Disable “Show icon preview”

  5. Select “Use as Defaults”

Optimising browsing speed and preventing permission issues

https://support.apple.com/en-us/HT208209

It has been reported that macOS versions greater than 10.15 no longer honour the following command.

  1. Open 'Terminal'

  2. Run the command and enter the administrator password:

    CODE
    sudo defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.