[clug] how long to encrypt a 1T exernal disk using LUKS

Alex Satrapa grail at goldweb.com.au
Sun Jun 27 20:00:08 MDT 2010


On 28/06/2010, at 08:35 , jhock wrote:

> I have an eeepc 10HD with Ubuntu 10.0 and Western Digital 1 terabyte
> external hard disk.

Let's be optimistic and assume you're reading and writing at about 20MB/s (sustained) over USB 2.0.

Let's be even more optimistic and assume the data is only "copied" once in memory, which is between the cleartext and ciphertext versions of your data, and that this process is limited only by the processor (since it's not a simple DMA transfer). Let's be overly optimistic and assume it only takes one cycle per word to read into the processor and one cycle per word to write back out to RAM. Furthermore, let's go all out and assume the processor is reading/writing 32 bits at a time, and RAM is running on the same clock as the CPU (ie: 900MHz).

1TB would thus take 50,000 seconds to read, another 50,000 seconds to write, and another thousand seconds or so to shuffle around in RAM on that 900MHz processor. So you're looking at about 28 hours, assuming the above ideal conditions. The largest portion by far is the I/O over USB - the CPU would have to take dozens of cycles per word in order to compete in the "what's slowing down my encryption" stakes.

Now assuming that it takes a dozen cycles per word to unpack, encrypt, marshal and write each word (rather than our optimistic two cycles), you're looking at something just shy of two days.

So sit back with a good book, and relax :)
Alex



More information about the linux mailing list