Re: Cheaper encryption?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Wed, 20 Feb 2008, morphium wrote:
Hi,

I'm new on this mailinglist and don't even know if it's the right one,
but here is my problem:
I'm running Debian Lenny and created a soft raid 5 there, with 6 Hard
disks (each 750 GB).
Now i did cryptsetup -c aes -s 128 /dev/md1 and cryptsetup luksOpen
/dev/md1 data.

I think you shouldn't use just aes but something like aes-xts-plain or some other mode. I am not exactly sure what you get when using bare aes but I suspect it is either not secure or slow (or both).

Also please ensure that you are using assembly optimized AES version for your CPU (i586 and x86-64 version are available). You need to select that version during kernel compile and un-select or un-load normal aes module because from my experience you will get the non optimized version by default.

Also upgrading to the 2.6.24.2 shouldn't hurt and may fix some problems and increase performance.


Now, if I Benchmark with hdparm -t /dev/mapper/data, I don't get more
than 80 MB/s (hdparm -t /dev/md1 gives about 280MB/s read speed).

Please don't use hdparm for any benchmarking. At least use dd or something.

Also consider that most of the time you won't have purely sequential writes only random ones so it's not very likely that the CPU will be the bottleneck. But there are some workloads where you are using disk bandwidth to the maximum (like optimized video streaming or something). On "normal" workloads with big amount of random IO CPU shouldn't be used by dm-crypt more than about 5%-10%.


My CPU utilization is at 100% on both cores (It's an AMD 4200+, I'm
running 2.6.23 amd64 kernel).
So now my Question is: Is there a cheaper encryption method? So that i
can get at least 120MB/s, 160 would be fine.

You may try other excryption algorithms and IV algorithms. But assembly optimized AES should be pretty fast. I am not sure you can get 120 or 160MB/s without using much faster CPUs, more cores or some crypto offload card.


I tried with -s 64, but it then tells me to check wether the aes-...
module is in the kernel - but obvious it is, else 128 wouldn't work.

There is no such thing as AES 64bit so it won't work. Use

	cat /proc/crypto

to get a list of all loaded crypto modules with key sizes they support.


Hope this helps,

GK


---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux