RoboCopy Insights

After doing some research on Microsofts RoboCopy, the build-in Windows mass file copy tool, it appears that there is too much misinformation about RoboCopy on the internet. So in an attempt to correct this… 😉

RoboCopy has a restartable mode (parameter /Z). This means it can continue a failed copy from the last successful file position. It has its uses. Many people advise just to throw that switch always in. DON’T! If you’re copying files and folders within your local network you should not use the restartable mode. It will severely slow down file copy operations. Restartable mode should only be used when your network link really is unstable.

Then there’s the /IPG switch… Inter Package Gap. A kind of black magic… not at all user friendly. It’s a delay in milliseconds inserted between packets (the packet size differs between normal and restartable mode). It seems only useful in severely limited bandwidth conditions like transmitting files over slow internet connections. In internal networks its use immediately causes a giant drop in speed (even a setting of 1).

The multithreading switch (/MT) can make copying many smaller files in a local network quite faster. It’s incompatible with the /IPG switch.

I’ve done some testing in a 1 GB local area test network copying 1 big file from local computer to a NAS both connected to a GB switch. The computer runs Windows 10.

Normal Mode: 950 Mbps (megabit per second)
Normal Mode with IPG:1: 16.8 Mbps
Normal Mode with IPG:10 16.8 Mbps
Normal Mode with IPG:100 2.4 Mbps

Restartable Mode: 270 Mbps
Restartable Mode with IPG 1: 33.2 Mbps
Restartable Mode with IPG 10: 32.2 Mbps
Restartable Mode with IPG 100: 4.8 Mbps
Restartable Mode with IPG 200: 2.3 Mbps
Restartable Mode with IPG 300: 1.6 Mbps
Restartable Mode with IPG 400: 1.2 Mbps
Restartable Mode with IPG 500: 1.1 Mbps
Restartable Mode with IPG 1000: 528 Kbps

Tested it also with a 100mbit switch. Comparable results except of course for full speed:
Normal Mode: 95 Mbps
Restartable Mode: 66 Mbps

A snippet of the test script:

fsutil file createnew "C:\Temp\1GB\1GB.dat" 1073741824
fsutil file createnew "C:\Temp\100MB\100MB.dat" 104857600
fsutil file createnew "C:\Temp\10MB\10MB.dat" 10240
echo 1
robocopy "C:\Temp\1GB" "N:\Temp" /z /np /log:"C:\Temp\1.txt"
del "N:\Temp\1GB.dat"

Transferring one big file most times isn’t a real word scenario, but it does show the difference between normal and restartable mode by minimising other influences. When copying thousands of files of varying sizes the transfer speed goes down a lot and varies greatly and so you don’t have to worry about using up all your internal network capacity.



About Stoomkracht

Scripter, programmer, Windows administrator, network/wifi engineer, thinker

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: