Windows 11 allows you to enable or disable SMB compression. Its most recent changes include the updated behavior of the SMB protocol compression feature. It allows you to reduce the size of the files transferred by the user, administrator, or applications over the network and thereby speed up the transfer of data. SMB compression has been used in the operating system before, but only files of a certain size were compressed.
When sending a file over the network, the algorithm compressed the first 524,288,000 bytes and then checked to see if 104,857,600 bytes were compressed within the 500MB range. If so, the compression continued, if not, the algorithm stopped working. Starting with Windows 11 22449, all files will be compressed with the SMB function enabled, without exception. To enable SMB compression in Windows 11 right now, you need to apply a registry tweak.
Enable SMB compression in Windows 11
- Open the registry editor. Press ⊞ Win + r and enter the
regedit
command - Expand it to this branch:
HKLM\System\CurrentControlSet\Services\LanManWorkstation\parameters
. - In the right column, create a new DWORD parameter. Name it
EnableCompressedTraffic
and set its value to 1.
This tweak enables SMB compression with a decision algorithm, which means that the SMB component will always make a try for compression.
If you want all files to be compressed by default, you need to create two more values.
Always compress all files transferred over the network
- Open the Registry editor with the ⊞ Win + r
regedit
command. - Open the same key,
HKLM\System\CurrentControlSet\Services\LanManWorkstation\parameters
. - Create or modify the
CompressibilitySamplingSize
DWORD parameter under the same registry key and set its value to4294967295
in decimal notation. - Finally, create or change the
CompressibleThreshold
DWORD value to 0.
Finally, it is easy to disable SMB Compression. Microsoft provides Registry values for that.
Disable SMB Compression
- Open the
regedit
app. - Open the following path
HKLM\System\CurrentControlSet\Services\LanManWorkstation\parameters
. - Create here a new DWORD value
DisableCompression
. - Set its value data to 1.
This is how you disable SMB compression on Windows 11.
It is also worth noting that Microsoft allows disabling SMB compression with PowerShell. The command is
Set-SMbClientConfiguration -DisableCompression $true
Execute is from a PowerShell window running as Administrator.