DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] AES-XTS performance
@ 2010-11-15 12:36 Igor Novgorodov
  2010-11-15 14:25 ` Milan Broz
  2010-11-15 14:38 ` Arno Wagner
  0 siblings, 2 replies; 10+ messages in thread
From: Igor Novgorodov @ 2010-11-15 12:36 UTC (permalink / raw)
  To: dm-crypt

Hello!
I've   got   a   question   regarding   encryption   performance  with
XTS mode  in  dm-crypt,  which is too low for what i
get.

Test system:
- Supermicro X8DTH-6F
- 1 x 4-Core Xeon E5620 with HyperThreading & AES-NI
- 12Gb RAM DDR3 Reg ECC

Preparation:
# mount -t tmpfs tmpfs -o size=4G /mnt/tmpfs
# dd if=/dev/zero of=/mnt/tmpfs/image
# losetup /dev/loop0 /mnt/tmpfs/image

AES-XTS-ESSIV:SHA256 + 512bit key
READ: 220 MB/s
WRITE: 79.6 MB/s

AES-XTS-ESSIV:SHA256 + 256bit key
READ: 259 MB/s
WRITE: 86.6 MB/s

And with CBC mode we get reasonable read performance (for AES-NI), but
writing is as almost slow as before:

AES-CBC-ESSIV:SHA256
READ: 495 MB/s
WRITE: 107 MB/s

AES-XTS-PLAIN64
READ: 271 MB/s
WRTITE: 90.2 MB/s

What is the problem here?
With aes-cbc-plain64 i get ~560Mb read, and another slow write ~110Mb.

Is that a limitation of a benchmark with loopback devices & tmpfs?
Write speed is very slow, as i want to saturate a very fast RAID
array (24 x 1Tb RAID6), which can deliver up to 800Mb/sec read:
# echo 3 > /proc/sys/vm/drop_caches
# dd if=/dev/sda of=/dev/null bs=1M count=20480
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 27.3376 s, 786 MB/s

Any suggestions? Why write speed is so low?
And why with XTS i get 50% speed drop, is that normal?
Thank you!

P.S.
In Windows with Trucrypt internal benchmark i get 1.6Gb/s
AES encryption speed with AES-NI even on low-end Core i5-620.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-11-17 23:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-15 12:36 [dm-crypt] AES-XTS performance Igor Novgorodov
2010-11-15 14:25 ` Milan Broz
2010-11-16  6:53   ` Igor Novgorodov
2010-11-16  7:31   ` Igor Novgorodov
2010-11-16  9:25     ` Milan Broz
2010-11-16 11:32       ` Igor Novgorodov
2010-11-16 12:00         ` Milan Broz
2010-11-17 10:03           ` Igor Novgorodov
2010-11-17 23:39   ` Jakob-Tobias Winter
2010-11-15 14:38 ` Arno Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox