[dm-crypt] Performance problems
gmazyland at gmail.com
Mon Nov 19 21:02:40 CET 2012
On 11/19/2012 12:51 PM, Joakim Reinert wrote:
> I have loaded the module aesni_intel and verified that the refcnt
> changes in /proc/crypto when i open/close the encrypted partition.
How exactly the storage stack looks like? Using underlying partition?
please paste lsblk output and cryptsetup luksDump
(you can remove slot info and hash, algorithm and payload offset
is important here)
Try to add oflag=direct to your dd command (for write) or iflag=direct
Yes, AES-NI should provide more than necessary performance.
> I've already harrassed everybody at #archlinux and #crypto in IRC but
> nobody seems to know what the problem might be. I also installed
> truecrypt and did some benchmarks which show encryption and decryption
> speeds of roughly 2GB/s.
Truecrypt by default use dm-crypt (if not switched off in config),
but internal benchmarks measure non-kernel services.
> Might this have something to do with the data alignment on disk? At
> least with lvm it's suggested to define dataalignment=1m on SSD's. Is
> it possible to define data alignment for dm-crypt?
1MiB alignment is default for LUKS (and for LVM as well btw), depends
on version and if underlying partition is aligned.
Need info above to check.
More information about the dm-crypt