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.
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
- Open the Registry editor.
- Navigate to
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\parameters
. - Create a new REG_DWORD value
EnableCompressedTraffic
- Set its value data to
1
.
Make SMB always compress all files
- Open the Registry editor.
- Navigate to
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\parameters
. - Create a new REG_DWORD value name named
CompressibilitySamplingSize
. - Set its value (In decimal) to 4294967295.
- Create a new DWORD value
CompressibleThreshold
. - Leave it as 0.
Disable SMB compression
- Open the Registry editor.
- Navigate to
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\parameters
. - Create a new 32-bit DWORD value
DisableCompression
. - Set its value data to
1
. - Now, open the key
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\parameters
. - 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