Web Deploy vs. Robocopy

The Web Deployment Tool contains two providers that can be used for directory copy and file copy operations: dirPath and filePath, respectively. The dirPath provider can copy directory contents, whereas filePath can be used only on single files.

Newer versions of Windows contain the robocopy utility. Robocopy (Robust File Copy for Windows) is a much more sophisticated tool that has superseded the well-known copy and xcopy commands.

Starting in August of 2009, test results from the Web Deploy team were indicating that Web Deploy’s dirPath provider was even faster than robocopy.

Intrigued by these results, I thought that Web Deploy might be a credible alternative to robocopy, especially when copying very large files, or large numbers of files. So, I thought I would run some informal tests to see what kind of results I could get.

I decided to run two kinds of tests: local disk A to local disk B, and local disk A to remote share B. For each scenario, I wanted to test both large files and large numbers of small files.

For the local disk-to-disk copy tests, I used Web Deploy 1.1 on a Windows Server 2008 R2 64-bit computer. For the remote computer, I used a share on a Windows 7 64-bit client that also had Web Deploy 1.1 installed.

To test large files, I created single files of 1, 2, and 3 gigabytes. For the purpose of copying many small files, I created a folder that had 75,000 1 kilobyte files. Although their total size was only 21.38 megabytes, on disk they took up almost 300 megabytes. The added size on disk makes sense when you consider that the cluster size for hard disks larger than 2 gigabytes is 4kb (see The Default Cluster Size for the NTFS and FAT File Systems).

For the large single files, I used the filePath provider; for the directory with multiple small files, I used the dirPath provider.

For the local disk A to local disk B scenario, here are the results:

File Size

Tool

Time Taken (m:ss)

Command Line Used

1GB

Robocopy

0:07

D:\>robocopy testd e:\teste 1gb.rbc

1GB

Web Deploy

0:09

msdeploy -verb:sync -source:filepath=d:\test1\1gb.rbc -dest:filepath=e:\w7test\1gb.rbc

2GB

Robocopy

0:14

(similar to above)

2GB

Web Deploy

0:17

(similar)

3GB

Robocopy

0:26

(similar)

3GB

Web Deploy

0:24

(similar)

75,000 1KB Files

Robocopy

1:38

d:\>robocopy testd /s e:\teste /nfl

75,000 1KB Files

Web Deploy

1:35

d:\testd>msdeploy -verb:sync -source:dirPath=d:\testd\1kbfiles -dest:dirpath=e:\w7test\1kbfiles

As you can see, there were very few differences here.

For local disk A to remote share B, here are the results:

File Size

Tool

Time Taken

(m:ss)

Command Line Used

1GB

Robocopy

0:14

D:\>robocopy test2 \\remote1\w7test 1gb.rbc

1GB

Web Deploy

0:16

D:\test1>msdeploy -verb:sync -source:filepath=d:\test1\1gb.rbc -dest:filepath=\\remote1\w7test\1gb.rbc

2GB

Robocopy

0:24

(similar to above)

2GB

Web Deploy

0:32

(similar)

3GB

Robocopy

0:44

(similar)

3GB

Web Deploy

0:44

(similar)

75,000 1KB Files

Robocopy

8:22

D:\>robocopy testd /s \\remote1\w7test /nfl

75,000 1KB Files

Web Deploy

4:16

D:\testd>msdeploy -verb:sync -source:dirPath=D:\testd\1kbfiles -dest:dirpath=\\remote1\w7test\1kbfiles

Again, similar results, with one outstanding exception: in the remote multi-file copy scenario, Web Deploy took about half as much time as robocopy! So, if you are looking to copy many small files across a network, using Web Deploy’s dirPath provider might be a better choice for you.

For more information about the dirPath and filePath providers, see the TechNet pages Web Deploy dirPath Provider and Web Deploy filePath Provider.

1 Comment

Comments have been disabled for this content.