Windows 11 de Microsoft

Windows 11 and Networks, Microsoft speeds up file transfers – GinjFo

Microsoft is making an important change around Windows 11’s SMB. It affects the compression function. It becomes more efficient, which reduces the size of the files and consequently the times required to transfer the data.

Windows 11 and Windows Server 2022 use an SMB compression feature. SMB is the abbreviation for Server Message Block. It is a communication protocol that supports data and printer sharing. We also find it when browsing networks.

This compression reduces the file size during a transfer. It avoids manual intervention. There is no need to compress the data first, perform the transfer, and then decompress everything on the destination drive. The advantage of reducing the size of the data to be transmitted is that it saves bandwidth. This is particularly useful on networks with limited speeds such as WiFi or 1 Gbps Ethernet when processing files of several GB.

Unfortunately, this feature respects certain rules that limit its actions and possibilities. For example, Microsoft implemented a 100MB threshold compressible in the first 500MB of a file. Therefore, small files do not benefit from this compression. Similarly large file transfers can suffer if the first 500MB doesn’t offer this level of compression.

This rule no longer applies. SMB compression ignores data size. Of course, all files benefit from a compression request during a transfer. However, Microsoft says that not all files are “equal” when it comes to compression. Already compressed files such as images in JPG format or archives in ZIP and RAR format do not benefit from this advancement.

Windows 11 and SMB compression details

Users, administrators and applications can request compression. It is possible to use new policies and PowerShell commands to control this feature.

Microsoft details

Group Policy

\Computer Configuration\Administrative Templates\Network\Lanman Workstation

  • Disable SMB compression
  • Use SMB compression by default

\Computer Configuration\Administrative Templates\Network\Lanman Server

  • Disable SMB compression
  • Require traffic compression for all shares

These all write to the following location, overriding the “native” registry settings as usual with Group Policy:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LanmanWorkstation\parameters

PowerShell for SMB Client

Set-SMBClientConfiguration [-EnableCompressibilitySampling ] [-CompressibilitySamplingSize ] [-CompressibleThreshold ] [-DisableCompression ] [-RequestCompression

  • -Disable compression $true or $false – never compress, even if the server or application asks for it
  • -Request compression $true or $false – Always request compression, even if the server or application hasn’t specified it
  • -EnableCompressibilitySampling $true or $false – Controlling legacy sampling behavior
  • – CompressibilitySamplingSize 1- 9.007.199.254.740.992 – Size in bytes of the area to sample in a file looking for compressibility
  • – Compressible Threshold – 1- 9.007.199.254.740.992 – Size in bytes of compressible data to be found within this range

You shouldn’t have to touch the sampling settings without a good reason. Maybe write me in the comments first if you feel the urge to touch these. 🙂 A careful reader might notice that a range of 9.007.199.254.740.992 is not the uint64 in PowerShell. That’s because the actual limit in the code is 9PiB, not the 184,467,440,737,095,551,615 bytes of a UInt64 value that we had to set in Posh. If you have individual files larger than 9 petabytes, I’d still love to hear your story!

These values ​​are stored in the registry under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\LanmanWorkstation\parameters

Surname Kind default limits PS Interface (Set-SmbClientConfiguration)
EnableCompressedTraffic REG_DWORD 0 0 or 1 Request Compression
Disable compression REG_DWORD 0 0 or 1 Disable compression
Enable compressibility sampling REG_DWORD 0 0 or 1 Enable compressibility sampling
CompressibilitySamplingSize REG_QWORD 0 0 to 8 GDP CompressibilitySamplingSize
CompressibleThreshold REG_QWORD 0 0 to 8 GDP CompressibleThreshold

PowerShell for SMB Server

Set-SmbServerConfiguration [-DisableCompression ] [-RequestCompression ]

  • -Disable compression $true or $false – never compress, even if the client asks for it
  • -Request compression $true or $false – Always request compression even if the client didn’t specify it

These values ​​are stored in the registry under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\LanmanServer\parameters

Surname Kind default limits PS Interface (Set-SmbServerConfiguration)
EnableCompressedTraffic REG_DWORD 0 0 or 1 Request Compression
Disable compression REG_DWORD 0 0 or 1 Disable compression

This change will be deployed on Patch Tuesday in September 2022. If you want to take advantage of it now, you can manually trigger the download of the latest optional updates released by Microsoft. These are KB5016693 for Windows Server 2022 and KB5016691 for Windows 11.

Windows 11, optional update KB5016691 is available, what’s new?


#Windows #Networks #Microsoft #speeds #file #transfers #GinjFo

Leave a Comment

Your email address will not be published.