All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] Improving performance?
@ 2010-11-11 10:49 Lasse Jensen
  2010-11-11 11:30 ` Arno Wagner
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Lasse Jensen @ 2010-11-11 10:49 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]

Hi. I have a RAID 5 array with 3 (soon upgrading to 4 + hotspare = 5)
encrypted drives connected to a system with a Core 2 Duo @ 2.5 ghz  running
Debian Squeeze.
Each drive has been formatted with

cryptsetup luksFormat /path/to/device

And put together in a array with

mdamd -C /dev/md0 --raid-level=5 /path/to/first-device /path/to/third-device
/path/to/third-device

It works great, and encrypting the devices separately allows me to run more
than one instance of kcryptd, thus using both cores in my server. It
compensates for the overhead of encrypting the checksumming data seperately,
compared to raw devices -> RAID -> encryption and still give me improved
speed.

At the moment, i get 70 mb/s sequential read speed locally. I would like to
boost it to at least 100 or even more, as 1) the raw drives support way more
and 2) i would like to fill my gigabit ethernet when copying files over the
network.

Now, what are my options?

A quadcore CPU like the Q6600 would double the number of cores and
theoretically double the throughput, but at cost of idle power. Note that
the server is idle most of the time.
A core i5. They have AES support in hardware, but it's an expensive solution
and i'm not even sure it has Linux support.
A PCI or PCIe based card, like the HiFN cards, but what card should i look
for and what speed should i expect?
Using the CUDA cores of my nVidia card, but no driver seems to exists for
that.

The first option is pretty straight forward, but what about the rest? Or are
there any other options i havent thought of?

-- 
Lasse Jensen (fafler at gmail dot com)

[-- Attachment #2: Type: text/html, Size: 1707 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [dm-crypt] Improving performance?
@ 2010-11-11 18:56 Markus Krainz
  2010-11-12  1:21 ` Arno Wagner
  0 siblings, 1 reply; 16+ messages in thread
From: Markus Krainz @ 2010-11-11 18:56 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 1903 bytes --]


On 2010-11-11 19:26, Lasse Jensen wrote:
> I havent tested my current setup this way, but my old setup, RAID 
> first, then encryption worked fine.

RAID first, den ecryption works for me, too.
But testing the ecrypting drives seperately, then RAID approach failed.
What good is fast performance if the RAID 5 does not work? :D

>     dmcrypt/luks is used on top of the raid. The performance of the i5
>     is not great, despite hardware aes. Should not be this numbers a
>     bit higher than 158 MB/sec?
>
>     ~/httptunnel-3.3/ hdparm -t --direct /dev/md1
>
>     /dev/md1:
>      Timing O_DIRECT disk reads:  936 MB in  3.00 seconds = 311.67 MB/sec
>
>     ~/httptunnel-3.3/ hdparm -t --direct /dev/mapper/evol
>
>     /dev/mapper/evol:
>      Timing O_DIRECT disk reads:  476 MB in  3.01 seconds = 158.30 MB/sec
>
>     cat /proc/cpuinfo | grep -E (model name|aes)
>     model name      : Intel(R) Core(TM) i5 CPU         660  @ 3.33GHz
>     flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
>     pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
>     pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts
>     rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64
>     monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2
>     popcnt aes lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
>
>
> Well, it's still a lot better than my setup. Have you got any idea how 
> much power your system uses idle and under load?
>

I am afraid I cannot unplug the server right now and I do not have an 
ampere meter lying around.
But I went for a 32nm dual-core-CPU, a small motherboard with lots of 
sata plugs and an efficient power supply, so I figured you can not get 
much better power
consumption wise.

Forgot to mention, the above hdparam -t result is for cipher mode: 
xts-plain64 and AES-256.

Regards,

Markus Krainz


[-- Attachment #2: Type: text/html, Size: 3663 bytes --]

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

end of thread, other threads:[~2010-11-12  7:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-11 10:49 [dm-crypt] Improving performance? Lasse Jensen
2010-11-11 11:30 ` Arno Wagner
2010-11-11 18:16   ` Lasse Jensen
2010-11-11 17:03 ` Heinz Diehl
2010-11-11 17:06   ` Rick Moritz
2010-11-11 20:59     ` Heinz Diehl
2010-11-11 21:25       ` Rick Moritz
2010-11-11 18:19   ` Lasse Jensen
2010-11-11 17:40 ` Zdenek Kaspar
2010-11-11 17:59 ` Markus Krainz
2010-11-11 19:10   ` epvdm
2010-11-11 21:24 ` Richard Zidlicky
  -- strict thread matches above, loose matches on Subject: below --
2010-11-11 18:56 Markus Krainz
2010-11-12  1:21 ` Arno Wagner
2010-11-12  5:00   ` dave b
2010-11-12  7:10     ` Heinz Diehl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.