Using SMB Compression with Windows 11

While some SMB Compression code has been in Windows 10 for a while, it was not until Windows 11 and Windows Server 2022 it was implemented end to end. Anyway, that just had to be tested, so I quickly deployed a few Windows 11 machines and started doing some benchmarking.

In this test I'm using good old robocopy with the /compress switch, but you can also enable compress when mapping a drive letter, or when sharing a folder using PowerShell. Check out the -CompressData parameter for the the New-SmbShare and Set-SmbShare cmdlets, as well as the -CompressNetworkTraffic parameter for the New-SmbMapping cmdlet.

In between each test I rebooted both machines, to make sure nothing was cached in memory etc. messing up the benchmarking. In all tests a 16.6 GB VHD file was used and I also compared the performance on both VMs and physical machines. Here are the results:

Test 1 – Copy a large file without compression with RoboCopy on a VM

In this test, I was copying the VHD file between two VMs on the same virtual switch. Both VMs were configured with 2 vCPUs and 4 GB RAM. The virtual machine I copied the file from was smb-comp-002.

Command line: robocopy \\smb-comp-002\c$\Demo C:\Demo OSD-PC0001-Disk1.vhdx
Time: 1m 31s
Speed: 138 MB/s
Test 2 – Copy a large file with compression with RoboCopy on a VM

Same as Test 1, but with adding the /compress switch to RoboCopy.

Command line: robocopy \\smb-comp-002\c$\Demo C:\Demo OSD-PC0001-Disk1.vhdx /compress
Time: 57s
Speed: 296 MB/s
Test 3 – Copy a large file without compression with RoboCopy on a physical machine

In this test, I was copying the VHD file between two Dell machines on the same gigabit switch. The Dell machines were i7 CPU, 4 cores, and 32 GB RAM. The physical machine I copied the file from was chi-w10peer-008.

Command line: robocopy \\chi-w10peer-008\c$\Demo C:\Demo OSD-PC0001-Disk1.vhdx
Time: 2m 38s
Speed: 107 MB/s
Test 4 – Copy a large VHD file with compression with RoboCopy on a physical machine

Same as Test 3, but with adding the /compress switch to RoboCopy.

Command line: robocopy \\\chi-w10peer-008\c$\Demo C:\Demo OSD-PC0001-Disk1.vhdx /compress
Time: 2m 35s
Speed: 109 MB/s

Resources

For the Microsoft docs on the topic, check out this link: SMB Compression | Microsoft Docs

About the author

Johan Arwidmark

2.7 3 votes
Article Rating
Subscribe
Notify of
guest
4 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Randy
Randy
7 months ago

SMB compression is now supported by the backup/sync tool GS RichCopy 360, which enhances and simplifies the speed so much . this requires two things:
1) Both nodes (source and destination) must support SMB compression.
2) The shared hosting of the data must have SMB compression turned on.
GS RichCopy 360 has an option that says (SMB Compression) which you can select. If the prerequisites above are met, then SMB compression will be used.

Mac
Mac
1 year ago

FYI, forgot to add /compress switch to Test 2.


>