Monday, September 15, 2008

According to Mark Russinovich, the copy operations have been significantly improved for copying files of all sizes in Vista, and then improved again in SP1.

I was curious about this program though and thought I should give an investigation. With TeraCopy's latest version, 2.0a4, I copied a 3.2GB file (email archive -- not in use) and see the results. Using Process Monitor, I monitored the file copy operation as it will give me detailed information as to what is going on in addition to giving me detailed timing information.

Here we can see TeraCopy reads the file at 10MB sizes at 3 intervals then writes out the data the same 10MB per 3 intervals. The read and write are non-cached. This method results in a copy that takes 01:43.5 seconds.

When we examine the copy done by explorer we see that explorer reads the file at a length of 1MB then writes it out in 64kB chunks (cached). This method results in a copy that takes 01:15.5. Almost 30 seconds faster than TeraCopy!

Explorer memory usage.TeraCopy memory usage.

Reading comments on the Vista copy using memory and pushing out data to disk via the page file I put some performance counters on memory usage and then redid the copy. Doing this we see that explorer.exe does consume more memory during the copy then teracopy.exe (~50MB vs. ~400MB). Teracopy is correct and uses less RAM during copy and Vista could have a detrimental effect during times of low available memory usage. To test this theory I set my Maximum RAM to be about 1.5GB which should cause lots of paging (according to the available memory graph).

The results are: Teracopy.exe continues to use 50MB of RAM while executing and takes a little bit longer (01:46.5 vs. 01:43.5). Explorer actually reduces its memory consumption to 50MB as well during the copy, but instead of it being flat you can see it caching in reads then clearing the cache as it finishes the write as evidenced by the "waves". Explorer finished the copy in 01:28.2.

Seeing Explorer gracefully degrade it's memory usage as it was getting tight is encouraging, but maybe TeraCopy has it right, and if there is absolutely no available memory then maybe it's faster then explorer. To test this I further reduced my available memory to 512MB.

The results are: Explorer.exe continues to use it's reduced amount of RAM (50MB) and the copy time goes up to 01:38.2 (explorer-really-low-memory.jpg). Lastly, TeraCopy.exe's time increased almost a full second to 01:47.2 under the low memory conditions.

*********************************************

IN SUMMARY:

I don't think TeraCopy provides any real value and actually appears to degrade performance under all scenario's compared to using Explorer's native file copy processes. It is quite evident that Microsoft will gracefully degrade the caching algorithm Explorer uses to not consume all RAM while maintaining maximum file copy speed. Using a non-cached copy mode is a huge performance penalty as caching hard drives reads in RAM significantly increases performance for reads and writes as the hard disk has to do less physical movement. Since the hard drive is slowest link in the chain of read and write performance the less you actually need to go to it the better. Paging out data for Explorer appears to be a non-issue as Explorer will instead reduce it's cache to avoid paging during read/writes.