Boost Windows Server File Sharing Performance

article #1419, updated 1252 days ago

Spotted these recently. All of these are to be run in administrative Powershell. On one Server 2019 machine, these boosted overall throughput from 7-25M to 600-700M.

File server ( Microsoft docs here )

Set-SmbServerConfiguration -EnableMultiChannel $true -force
Set-SmbServerConfiguration -EnableOplocks $true -force
Set-SmbServerConfiguration -ServerHidden $true -force
Set-SmbServerConfiguration -IrpStackSize 20 -force
Set-SmbServerConfiguration -MaxMpxCount 4096 -force
Set-SmbServerConfiguration -MaxWorkItems 16384 -force
Set-SmbServerConfiguration -MaxSessionPerConnection 16384 -force
Set-SmbServerConfiguration -TreatHostAsStableStorage $true -force

Clients ( Microsoft docs here )

Set-SmbClientConfiguration -EnableBandwidthThrottling $false -force
Set-SmbClientConfiguration -EnableLargeMtu $true -force
Set-SmbClientConfiguration -EnableLoadBalanceScaleOut $true -force
Set-SmbClientConfiguration -EnableMultiChannel $true -force
Set-SmbClientConfiguration -EnableSecuritySignature $false -force
Set-SmbClientConfiguration -MaxCmds 16384 -force
Set-SmbClientConfiguration -MaximumConnectionCountPerServer 32 -force
Set-SmbClientConfiguration -OplocksDisabled $false -force
Set-SmbClientConfiguration -RequireSecuritySignature $false -force
Set-SmbClientConfiguration -UseOpportunisticLocking $true -force
Set-SmbClientConfiguration -WindowSizeThreshold 2 -force

-WindowSizeThreshold may be good to set to 4 or 8.

To set server back to default:
Set-SmbServerConfiguration -IrpStackSize 15 -force
Set-SmbServerConfiguration -MaxMpxCount 50 -force
Set-SmbServerConfiguration -MaxWorkItems 1 -force
Set-SmbServerConfiguration -TreatAsStableStorage $false -force
To set client back to default:
Set-SmbServerConfiguration -EnableBandwidthThrottling $true -force
Set-SmbServerConfiguration -MaxCmds 50 -force
Set-SmbServerConfiguration -WindowSizeThreshold 1 -force

Categories: