Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What would be the Read-/Write-overhead when using dm-crypt (LUKS) as full disk-encryption (including root partition) on a Linux-Desktop (Ubuntu)? I plan to stack it like so: LUKS > LVM > ext4 The CPU in use on the system would be a Core2 Duo 2.1 GHz with 4GB of RAM.

  • Would encryption of such a system create a great/noticeable overhead?
  • Are there any recent benchmarks to be found on the net? What is your personal experience?
  • Are there any settings I can make to improve performance?

Thx for your help.

share|improve this question

2 Answers 2

Ext4 may be a bad choice of filesystem if you are planning on performing LVM snapshots. I would advise doing substantial disk performance checking before going live, experiementing with block sizes on both FS and LVM. My experience was with Ext3, but the other articles I saw at the time implied that Ext4 had simular problems.

I solved it by using XFS as the filesystem.

share|improve this answer

There is no I/O-overhead involved in dm-crypt - just CPU overhead ... ;)

On a Athlon 64 2.6 GHz dual core system for example I can copy from one dm-crypt disk to another with ~ 40 MB/sec (2.6.26 Kernel, Seagate 1.5 TB SATA disks).

For performance make sure that the for your architecture optimized aes module is loaded, e.g.

$ lsmod | grep aes
aes_x86_64             12416  6 
aes_generic            32552  1 aes_x86_64

And for data-safety keep in mind that dm-crypt does not support barriers (perhaps they fixed it eventually?). Thus, a power-loss or something like that may screw your FS.

A workaround is to disable the write-caches of the underlying disks via hdparm, which of course really hurts performance.

Btw, one can argue that it does not really makes sense to encrypt the root-partition.

However, encrypting swap does make sense.

share|improve this answer
1  
One might argue as well that messing around with hdparm when you don't know what you're doing (or only think you know) can damage your hard drives. –  amphetamachine Feb 24 '12 at 23:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.