Permanently enable SMB compression
In this blog post, I will show you how to permanently enable SMB compression on Windows 10 y Windows Server 2019. SMB compression is a feature that allows you to compress data before sending it over the network, reducing bandwidth usage and improving performance.
SMB compression is especially useful for transferring large files or folders that contain a large amount of redundant or compressible data.
SMB compression is available starting with Windows 10 version 2004 and Windows Server version 2004, and can be enabled on a per-share or per-file basis using PowerShell cmdlets or the File Explorer user interface. However, if you want to enable SMB compression for all SMB transfers by default, you must modify the registry settings on both the client and server sides.
To enable SMB compression permanently on the client side, follow these steps:
1. Open Registry Editor by typing regedit in the Run dialog box or Start menu.
2. Navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
3. Right-click the Parameters key and select New > DWORD (32-bit) Value.
4. Name the new value EnableCompression and set its data to 1.
5. Close Registry Editor and restart your computer.
To enable SMB compression permanently on the server side, follow these steps:
1. Open Registry Editor by typing regedit in the Run dialog box or Start menu.
2. Navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
3. Right-click the Parameters key and select New > DWORD (32-bit) Value.
4. Name the new value CompressionEnabled and set its data to 1.
5. Close Registry Editor and restart your computer.
After permanently enabling SMB compression on both sides, you should see a significant improvement in file transfer speed and network efficiency. You can also use the Get-SmbCompression cmdlet to check the compression status of any SMB file or share.
Please note that SMB compression does not support SMB encryption, SMB signing, or SMB multichannel. If you enable any of these features, SMB compression will be automatically disabled. You can also disable SMB compression manually by setting the registry values to 0 or by using the Disable-SmbCompression cmdlet.
I hope this blog post was helpful to you. If you have any questions or comments, please leave a comment below.
If you want to speed up file transfer over a network, you can use SMB compression. This is a feature that compresses data before sending it over the network, reducing bandwidth usage and improving performance. However, SMB compression is not enabled by default. You must activate it manually, either for each connection or for all connections. This is how you can do it.
First, you need to configure the SMB server. This is the computer that hosts the shared folder. To enable SMB compression on the server, you must edit the Windows registry. You can do this by typing regedit in the taskbar search box and clicking Registry Editor. Then, navigate to the following key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters. In the right pane, right-click and select New –› DWORD (32-bit) Value. Name the new value EnableCompressedTraffic and double-click it to open it. Set its value to 1 and click OK. Then restart your computer for the changes to take effect.
Next, you must configure SMB clients. These are the computers that access the shared folder. To enable SMB compression on clients, you must also edit the Windows registry. You can do this by following the same steps above, but navigating to this key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters. Create a new DWORD (32-bit) value called EnableCompressedTraffic and set its value to 1. Then restart the computer for the changes to take effect.
Alternatively, you can enable SMB compression for a specific connection without editing the registry. You can do this by using the NET USE command with the /REQUESTCOMPRESSION:YES parameter. For example, if you want to connect to a shared folder named Release on a server named Server, you can type this command: NET USE * \\Server\Release /REQUESTCOMPRESSION:YES. This will create a compressed connection to the shared folder.
SMB compression can help you save bandwidth and speed up file transfer over a network. However, it can also increase CPU usage on both the server and client, so you should test it before using it in production environments.