RoboCopy supports Copying Files over SMB with Compression on Windows Server 2019, and beyond

Reading Time: < 1 minute

Windows Server

Microsoft is working hard to add features to Windows Server vNext, but is not forgetting about the vast majority of organizations that run Windows Server 2019 and might like the same functionality.

The feature that I want to discuss with you today is SMB compression with robocopy.exe.

 

SMB Compression with Robocopy

The announcement for Windows Server vNext Insider Preview version 20206 mentions that Microsoft added the /compress command switch to robocopy.exe.

When using this switch, If the destination computer supports SMB compression and the files being copied are compressible, you should see significant performance improvements.

When the command switch is used, the SMB Compression functionality adds inline whitespace compression to file transfers, removing congestion and copy time. Depending on the (in)efficiency of file formats and the IO pattern, the performance increase in copies can be up to fourfold.

SMB Compression uses a negotiation mechanism, so multiple compression algorithms are possible, and vendors can add their own. Currently the list is XPRESS (also known as LZ77), XPRESS Huffman (LZ77+Huffman) and LZNT1.

 

Concluding

Ironically, Microsoft released Windows Server vNext Insider Preview version 20206 on September 2nd, 2020 and released KB4571748, for Windows Server 2019 on August 20th, 2020. This means that Windows Server 2019 gained the functionality even earlier than the Preview build.

Windows 10 hasn’t got the SMB Compression functionality rolled out yet, but is slated to have support for it through updates, too.

3 Responses to RoboCopy supports Copying Files over SMB with Compression on Windows Server 2019, and beyond

  1.  

    Great article, Sander. One question: You mention that KB4571748 contains the new SMB Compression functionality, but only for the Server 2019 operating system. When I open the KB4571748 url you have provided it states that it "Applies to: Windows 10, version 1809 all editions; Windows Server version 1809, Windows Server 2019 all editions". That seems to imply that the new functionality is also applicable to Windows 10.

    • Yes, the new functionality is also available on Windows 10.

      I have never used robocopy on a client device and therefore didn't include it. My data transfer projects involved duplicating data from one files server to another and not having to bother with power settings (sleep stops copying) and session limits (SMB on Windows 10 is limited to 10 concurrent sessions).

       
  2.  

    I really like your helpful info and also we can copy files over SMB with Compression in few steps via GUI alternatives to Robocopy like Securecopy, GoodSync, and Gs Richcopy 360