23

I am migrating 20TB of files between two servers. Both systems are Windows 2012R2 with latest updates installed. Both using gigabit network.

Using robocopy on the new server with the command line robocopy /S /ZB /MOVE /J /DCOPY:A /V /FP \\oldserver\shared\folder X:\folder

That copies at about 5-10MB/s.

Drag and drop the files between servers using explorer yields around 110MB/s, which is the speed I expected.

I can't figure out why robocopy is going so slowly, when the file shares and network are clearly capable of faster speeds.

Things I've tried:

  • Connect servers directly with an ethernet cable to eliminate any switch issues. No change.
  • The /MT switch, with values 1, 4, 8 and 16. All copied at around the same speed.
  • Copying instead of moving files. No change.
  • Using a log files instead of printing to the screen. No change.
  • Pushing files from the old server vs pulling from the new server. No change.

Any ideas?

Grant
  • 17,671
  • 14
  • 69
  • 101

1 Answers1

34

In my case, it turned out to be the /Z switch, for restartable mode.

Removing that switch brought the copy up to 105-110MB/s, just like the explorer copies.

I still don't know why it causes such a massive performance hit.

Grant
  • 17,671
  • 14
  • 69
  • 101
  • 1
    Thanks for posting. This helped me out. I was seeing ~65Mbps. Removing the flag pushed speeds up to ~875Mbps for me! – Aaron D Mar 09 '18 at 02:39
  • 6
    @AaronD The `/Z` switch writes a header block to the file to track how far it has gotten in the copy. It has to update this header after every write, which is slow. Without restarts the header doesn't have to be written, thus the copy is much faster. – Corey Mar 22 '19 at 05:18
  • 1
    Could someone explain the implication of not using /Z when copying over a network? If the network connection gets dropped and a file copy is left incomplete, will it be updated correctly if the robocopy is run again after restoring the network? Will there be temp files left lying around? Thanks! – Dave Apr 04 '19 at 02:51
  • 2
    Removing /Z gave me a performance improvement of 20MB/s to 600MB/s on a 10Gbit/s link! Massive difference! – user643011 Jun 12 '19 at 06:40
  • 2
    @Dave, read this answer: https://stackoverflow.com/questions/20982968/what-is-robocopys-restartable-option I don't know why this answer has not been accepted. This fixed my problem. – Martin Oct 01 '19 at 07:53