File Copy Performance to USB Drive Oscillating Between Fast and Slow

I just had the “pleasure” of having to copy the contents of a terabyte USB disk to another similar USB drive. At first, I did not give this simple task much thought. I plugged the USB cables in and made my faithful Total Commander do the work. It did not take me long, though, to notice a strange phenomenon: the copy speed would oscillate between 8 and 24 MB/s.

For 10-20 seconds it would copy quickly at around 24 MB/s, only to drop to around 8 MB/s for a while. Then it would be fast again. And slow. You get the picture. Things like this make me really unhappy…

Who’s the Bad Guy?

My first suspect was the virus scanner. I deactivated it, checked Total Commander’s copy speed indicator, and found … no change. Too bad. It is disappointing to realize your enemy is not always the culprit.

Then I played around with the power settings. The system was on the “balanced” power plan, which allows the OS to reduce the CPU frequency and do other things to reduce energy consumption. As you may have guessed, messing with the power plan did not change a thing.

Finally, after googling around fruitlessly, I checked the external hard disks’ properties in device manager. Interestingly, the write cache was disabled. This is on the “Policies” tab, where I changed the setting from “Optimize for quick removal” to “Optimize for performance”. A reboot later the oscillations were gone. With the write cache enabled, the transfer rate settled at about 16 MB/s.

Lessons Learned

What can we learn from this? Obviously, Windows disables the write cache for external hard drives in order to reduce the impact of users unplugging their disks without notifying the OS first by clicking on the “Safely Remove Hardware” icon. While it is easy to mark this as another stupid idea from Redmond (after all, performance is king to many of us), I find it more interesting to ask whether copy performance is affected at all. A write cache can speed up writes significantly, but only if a substantial amount of the data to be written fits into the cache. As soon as the cache is filled, the transfer rate is reduced to the actual write performance of the disk again (in this case: to the rate the USB chip in the drive enclosure can cope with). So when looking at a large copy job, the write cache mainly levels the transfer rate curve. That conveys the impression of a nice steady transfer, but it does not change the overall transfer rate. This conclusion is consistent with my empirical findings - turning the write cache on did not substantially change the overall time for the copy job to complete.

Side Notes

I made my observations on Windows 7 RC. They may or may not apply to other versions of Windows.

Another small thing I learned: you do not want your system to go to sleep in the middle of the copy job. This can easily prevented by activating presentation mode: press Win+X to switch it on.

Comments

Related Posts

DiskLED - A Flexible Hard Disk and General System Activity Indicator System Tray Applet

DiskLED - A Flexible Hard Disk and General System Activity Indicator System Tray Applet
What do you do when your computer reacts sluggishly to even the simplest commands? You probably look at its hard disk LED to determine if the disk is busy, because if it is, the only thing that really helps is waiting (apart from buying a faster disk or SSD). Problem solved - if you are sitting right next to the machine. But what if you are using a protocol like RDP or ICA to connect to a remote computer or VM? No HDD LED, no quick and simple way to check for hard drive activity. This has been bugging me enough to write a software replacement: DiskLED.
Helge's Tools

Total Commander: Getting Started

Total Commander: Getting Started
This article explains how to get started with Total Commander, one of those few magical tools that can boost your productivity as an IT pro significantly. It not only replaces File Explorer; it does so in a way that makes you wonder how you suffered Explorer for such a long time. It has keyboard shortcuts for everything and is super-configurable, fast and efficient. On top of that, it can probably replace half a dozen tools in addition to File Explorer.
Tips and Tools

Latest Posts

Fast & Silent 5 Watt PC: Minimizing Idle Power Usage

Fast & Silent 5 Watt PC: Minimizing Idle Power Usage
This micro-series explains how to turn the Lenovo ThinkCentre M90t Gen 6 into a smart workstation that consumes only 5 Watts when idle but reaches top Cinebench scores while staying almost imperceptibly silent. In the first post, I showed how to silence the machine by replacing and adding to Lenovo’s CPU cooler. In this second post, I’m listing the exact configuration that achieves the lofty goal of combining minimal idle power consumption with top Cinebench scores.
Hardware

Fast & Silent 5 Watt PC: Lenovo ThinkCentre M90t Modding

Fast & Silent 5 Watt PC: Lenovo ThinkCentre M90t Modding
This micro-series explains how to turn the Lenovo ThinkCentre M90t Gen 6 into a smart workstation that consumes only 5 Watts when idle but reaches top Cinebench scores while staying almost imperceptibly silent. In this first post, I’m showing how to silence the machine by replacing and adding to Lenovo’s CPU cooler. In a second post, I’m listing the exact configuration that achieves the lofty goal of combining minimal idle power consumption with top Cinebench scores.
Hardware