Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently have the following setup on my laptop - harddrive is divided in 3 parts, first one is a /boot for my ubuntu, third one is a windows installation, and one in the middle is a encrypted partition, which has lvm with 3 partitions - / and /home with btfs and /swap. On those i have Ubuntu 10.10 installed.

I do encryption with cryptsetup/luks.

Unfortunately I have a very poor performance in this setup - boot takes almost 3 minutes and after boot system "warms up" to normal performance for a minute/two. I suspect that disk i/o is a problem, as stuff like apt-get is sometimes very slow on i/o intensive operations ("reading database"). I wonder why my i/o performance could be slow. I have 3 ideas - either lvm behaves bad over luks encrypted partition, or btrfs behaves badly for some reason or ubuntu installation for some reason is screwed up (which I doubt).

I wonder if any of those suggestions are possible and if not what else could so drastically affect performance.

PS: Before this installation performance was okay with luks-on-lvm setup (3 lvm partitions encrypted by luks) and ext4 fs setup, so it's this installation, not laptop.

PPS: Encryption is aes-xts-plain 512 bits.

share|improve this question
What hardware are you using and what encryption options did you pick? My 10.10 install on a netbook using luks and ext4 boots at normal speed so it's probably related to your hardware or encryption choices. – Cry Havok Oct 21 '10 at 19:19
Hardware shouldn't be relevant, as I had different setup on same hardware and it worked fine. – freiksenet Oct 21 '10 at 19:23
That's your assumption, but it may not be valid hence why I asked. Remember that the encryption/decryption adds an overhead so that it runs fine unencrypted means nothing. – Cry Havok Oct 21 '10 at 20:11
It ran fine encrypted, but with different setup - it was lvm, which partitions was encrypted, not encrypted partition on lvm. Post mentions that. – freiksenet Oct 22 '10 at 20:15
Might just by fluke be a bad install or the different configuration has it on a bad/slower part of the disk drive. – wag2639 Oct 28 '10 at 6:16
up vote 2 down vote accepted

Hi i think you have chosen a too strong encryption, which is causing the performance problems. 512 bits is a little overkill, 256 should be enougth, since it is still secure and probably will be for a lot of years to come.

share|improve this answer
Ok, that sounds reasonable. I didn't think encryption can so drastically decrease performance. I'll try to reencrypt everything with lower bitrate. – freiksenet Oct 31 '10 at 7:44
If the chosen encryption scheme (or your partitioning setup) happens to line up poorly with the native disk drive geometry, you can see performance (especially for small random IO like apt) plumet as the disk reads 2 blocks where before (in a properly aligned setup) it only read one. – Paul McMillan Feb 8 '11 at 0:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .