I am facing the problem that the same robocopy command has totally different execution times on two different computers.
The source is a Windows Server 2016 Standard. There is a directory with approx. 315,000 files (image files, each with a file size of a few KB). The directory is accessible as an SMB share.
The content of this directory needs to be checked as part of a regular backup and new or changed files need to be copied from the target. A few files are added here every hour (usually less than 100). This means that very few files are usually copied.
Copying takes place via the network.
The command I use:
robocopy [source] [destination] /e /z
/e because subdirectories should also be copied, /z because the process should be restartable.
This command is executed on the target computer.
A large part of the directory already exists on the target computer. This means that only the files need to be compared and a few files copied.
When I run the command on a remote Windows 11 computer, it takes less than a minute to check the directory and copy the missing/changed files.
However, if I run the same command on a Windows Server 2022 Standard, which is even located in the same data center as the source, it takes 30 to 40 minutes!
CPU, RAM, network and disk hardly show any activity on this server. The robocopy command itself consumes approx. 8% CPU (Intel Xeon E5-1650 v2) with approx. 90MB RAM.
I have already tested several variants of the command, but it always remains about as slow:
- without
/z /nooffload/j/r:0+/w:0- restarting both servers
If I copy a large file from the source to this server manually (simply by drag & drop), this process is very fast with a data rate of 500 megabits to 1 gigabit.
I am puzzled and cannot understand why the same command is fast on my local Windows 11 computer, but so slow on the server in the same data center.
I am very grateful for tips and help!