Advertisement

SMB compression in Windows 11 has got a new default behavior

As you may already know, one of new features in Windows 11 and the appropriate Server product is SMB compression. It allows an administrator, user, or application to request compression of files as they transfer over the network.

Advertisеment

For reference: The Server Message Block (SMB) Protocol is the network file sharing protocol of Microsoft Windows. The set of message packets defining a particular version of the protocol is called a dialect. The Common Internet File System (CIFS) is a dialect of SMB. Both SMB and CIFS are also available on VMS. It is worth mentioning that both SMB and CIFS are also available on other operating systems like Linux and Android via alternate implementations from third parties. For reference, see the following MSDN article. Microsoft's implementation has 3 versions with a different set of extensions that may or may not work in third-party apps and operating systems.

Cloud Network Banner

The compression feature removes the need to first deflate a file manually with an application, copy it, then inflate on the destination PC. Compressed files will consume less network bandwidth and take less time to transfer, at the cost of slightly increased CPU usage during transfers. This feature was first introduced in Windows 11 build 22449.

Based on the telemetry data, Microsoft decided to change the default behavior of compression. Previously, the SMB compression decision algorithm would attempt to compress the first 524,288,000 bytes (500MiB) of a file during transfer and track that at least 104,857,600 bytes (100MiB) compressed within that 500-MB range. If fewer than 100 MiB were compressible, SMB compression stopped trying to compress the rest of the file. If at least 100 MiB compressed, SMB compression attempted to compress the rest of the file. This meant that very large files with compressible data – for instance, a multi-gigabyte virtual machine disk – were likely to compress but a relatively small file – even a very compressible one – would not compress.

Now, if the compression feature is enabled in the OS, Windows 11 will always compress all files. The user can manage the behavior as follows.

Enable SMB compression with the decision algorithm

  1. Open the Registry editor.
  2. Navigate toHKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\parameters.
  3. Create a new REG_DWORD value EnableCompressedTraffic
  4. Set its value data to 1.

Make SMB always compress all files

  1. Open the Registry editor.
  2. Navigate toHKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\parameters.
  3. Create a new REG_DWORD value name named CompressibilitySamplingSize.
  4. Set its value (In decimal) to 4294967295.
  5. Create a new DWORD value CompressibleThreshold.
  6. Leave it as 0.

Disable SMB compression

  1. Open the Registry editor.
  2. Navigate toHKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\parameters.
  3. Create a new 32-bit DWORD value DisableCompression.
  4. Set its value data to 1.
  5. Now, open the keyHKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\parameters
  6. Create a new 32-bit DWORD value DisableCompression and set to 1.

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Advertisеment

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

Leave a Reply

Your email address will not be published.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.