MSFTNEXT

How to enable or disable SMB compression in Windows 11

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

  1. Open the registry editor. Press ⊞ Win + r and enter the regedit command
  2. Expand it to this branch: HKLM\System\CurrentControlSet\Services\LanManWorkstation\parameters.
  3. 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

  1. Open the Registry editor with the ⊞ Win + r regedit command.
  2. Open the same key, HKLM\System\CurrentControlSet\Services\LanManWorkstation\parameters.
  3. Create or modify the CompressibilitySamplingSize DWORD parameter under the same registry key and set its value to 4294967295 in decimal notation.
  4. 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

  1. Open the regedit app.
  2. Open the following path HKLM\System\CurrentControlSet\Services\LanManWorkstation\parameters.
  3. Create here a new DWORD value DisableCompression.
  4. 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.

Looks like you've read the post to the end. If you enjoyed it, please share it. You would greatly help our blog to grow!
Exit mobile version