[Discuss] dm-crypt overhead (was Re: TrueCrypt with SSD)
Edward Ned Harvey
blu at nedharvey.com
Mon Aug 29 23:59:45 EDT 2011
> From: Derek Atkins [mailto:warlord at MIT.EDU]
>
> This is a spinning disk, not SSD, but as you say it should be able to
> sustain 1Gb/s. It's not. I'm only getting 400Mb/s to the disk through
> dm-crypt.
Well, I only made a generalization. ;-) What does your drive mfgr publish
for specs on that drive? Nevermind. Try this...
Use dd to read from /dev/sda (or whatever) dump to /dev/null. This will
prove the sequential hardware read speed of the disk without encryption.
Then create a large file (repeat the above dd command, but read from
/dev/zero and write to a file.) If you feel like it, reboot just to ensure
nothing is cached or buffered. Read the file. Now the only thing you've
done is add filesystem overhead and encryption overhead.
That should be a pretty good test, to see if encryption is really the
bottleneck for you... At least for reading. But as you said, without any
free space on the drive, it's hard to test writing without encryption.
> The disk in this machine is the same model as the disk in the other
> machine where I was seeing full-speed data without dm-crypt. Alas I did
> change both hardware type and added dm-crypt at the same time so I don't
> know if it's the ThinkPad vs. Dell or no-encryption v. dm-crypt that's
> slowing down my disk I/O.
There are a million things it could be... firmware, drivers, etc. One thing
that's simple to check is your disk mode. ACHI vs ATA.
More information about the Discuss
mailing list