Once in a while, it helps to have a reminder that computers are not magic. In particular, they are subject to various quantifiable limits, and it can avoid frustration to remember those limits, even to do a little math about them.
Recently, I had to make copies of partitions on two computers to preserve potential evidence. On one computer, I didn't think ahead clearly enough about the computer's age. I made the copy (using Helix and dd) across a USB cable to the new target drive. It took over five hours. Why so long?
The partition was about 30 gigabytes. The data transfer rate for USB 1.1 (which was all the source computer had) is 1.5 megabytes per second at best. So for 10 gigabytes, elapsed time is about (30 GB / 1.5 MB/s) * ( 1000 MB / 1 GB) = about 20,000 seconds: about 333 minutes, or five and a half hours. The math is so simple that I should have done it in advance and brought along a book to read.
On the second computer, the partition was again around 30 gigabytes. I again used Helix and dd. But this time I made the copy by connecting the target drive through the built-in IDE cable. The data transfer for the cables and drives at issue could reach up to about 30 MB/s: about 20 times as fast as USB 1.1. Instead of 333 minutes, the math comes to about 17 minutes.
Both copies were successful. Their MD5 hashes matched the original partitions'. But guess whether next time I'm going to do a little back-of-the-envelope calculation of the time options available? Yep.
Comments