How to set up SMB compression on Windows Server and clients – Guide

SMB compression allows an administrator, user, or application to request compression of files as they are transmitted over the network. This eliminates the need to manually dump a file with an application first, copy it, and then inflate it to the target computer. Compressed files use less network bandwidth and take less time to transfer, at the expense of slightly higher CPU usage during transfer. SMB compression is most effective on lower bandwidth networks, such as a customer’s 1Gbps Ethernet or Wi-Fi network. A file transfer over an uncongested 100 Gbs Ethernet network between two servers with flash memory can be just as fast in practice without SMB compression, but leads to less congestion for other applications.

Windows Server 2022 introduces a new compression feature which allows administrators, users or applications to request compressed files as they are transmitted over the network. Compressed files use less network bandwidth and take less time to transfer, at the expense of slightly higher CPU usage during transfer. Read on to learn how Windows Server 2022 automatically compresses SMB files. They allow you to configure file shares or drive mappings so that compression works independently of these utilities. THE feature supports SMB signing and encryption, SMB over QUIC, and multichannel SMB. However, it cannot be used with SMB Direct. ..

The biggest impact on slow networks

When transferring large Office documents over a slow network, SMB compression is the best option. However, saving these files to a LAN file share will not provide much benefit. First of all, most of the files are very small; moreover, DOCX and PPTX files are already compressed.

Microsoft initially used an algorithm by default that compressed the first 500 MiB of very large files and only continued if it could be reduced by at least 100 MiB significantly. It is designed to avoid wasting computing power while the amount of data is hardly reduced.

Adjust SMB compression behavior

If you don’t like the new default behavior of SMB compression, you can change it in the registry under “System > Current Control Settings > Services > LanManWorkstation > HKEY_LOCAL_MACHINE Parameter > using two entries. The compressibility sample size obviously represents the compressed block size when testing large files. In our example, the value 52488000 corresponds to 500 MB, so the original behavior is enabled. The compressible limit specifies the size of files that should be skipped. 104857600 corresponds to 100 MB. The new settings take effect immediately; no reboot is required.

Enable compression on the server

Windows Admin Center (WAC) or PowerShell can be used to enable SMB compression. If you prefer the GUI, go to “File and File Sharing” in WAC and then go to the “File Sharing” tab. When creating a new share or editing an existing share, you will find the “Compress data” checkbox in the corresponding form. Older versions of Windows Server will disable this option because compression is not supported there. ..

Final note

Setting up SMB compression on Windows Server and clients can help save bandwidth and improve performance. If you have any questions about this guide, feel free to ask us in the comments section. You can also share this article with your friends to help spread the word about how compression can benefit your network. ..