I've done more tests and updated the description. New testing script (rand_access_raw.sh) is attached.
** Summary changed: - Random access read speed from encrypted filesystem is very slow compared to other linux distributions + Random access read speed from encrypted device is very slow compared with other linux distributions ** Description changed: Binary package hint: linux-image-server - I have noticed that random-access reads from file located on encrypted filesystem performs very slow -- 2 times slower compared with CentOS 5.3 distribution. There are very high IO wait values during the test. + Ubuntu-server kernel performs very slow doing random-access reads from encrypted filesystem -- 3-8 times slower compared with CentOS 5.3 distribution and with ubuntu -generic and -rt kernels. There are very high IO wait values during the test. I have reproduced this issue on different hardware with several ubuntu server kernels: - several 8.04 kernels (last one tested is 2.6.24-23-server) - 9.04 RC kernel - I wrote a simple script that creates a 100M file and performs "random-access" reads from it. - The script is attached. + I wrote a simple script that performs "random-access" reads from device and measures the time spent reading 100M of data. + The script is attached (rand_access_raw.sh). How to reproduce the issue: 1. Create a mapping for encrypted device - cryptsetup --cipher=aes-cbc-essiv:sha256 --key-size=256 --hash=ripemd160 create cfs1 /dev/sdb - 2. Create filesystem - mkfs.ext3 /dev/mapper/cfs1 - 3. mkdir /mnt/test; mount /dev/mapper/cfs1 /mnt/test - 4. copy attached script to /mnt/test; + cryptsetup --cipher=aes-cbc-essiv:sha256 --key-size=256 --hash=ripemd160 create cfs1 /dev/sdb2 5. Run the script: - cd /mnt/test; ./random_access.sh - 6. compare results with other distributions. + ./random_access_raw.sh /dev/mapper/cfs1 + 6. compare results with other distributions and kernels. - My results are: - 1. ubuntu 2.6.24-23-server: - not encrypted fs: 20 seconds - encrypted fs: 80 seconds - 2. centos 2.6.18-128.el5PAE (similar results on several fedora kernels) - not encrypted fs: 20 seconds - encrypted fs: 40 seconds - As you see, ubuntu is two times slower :-( + My results for not encrypted (/dev/sdb1) and encrypted (/dev/mapper/cfs1) devices are: + 1. ubuntu 2.6.28-11-server: + not encrypted device: 40 seconds + encrypted device: 220 seconds + 2. ubuntu 2.6.24-23-server: + not encrypted device: 32 seconds + encrypted device: 133 seconds + 3. centos 2.6.18-128.el5PAE (similar results on several fedora kernels) + not encrypted device: 23 seconds + encrypted device: 40 seconds + 4. ubuntu 2.6.24-23-generic: + not encrypted device: 20 seconds + encrypted device: 71 seconds + 5. ubuntu 2.6.24-23-rt: + not encrypted device: 21 seconds + encrypted device: 25 seconds + + Compare results of ubuntu-server kernels (especialy 2.6.28!) with + ubuntu-rt or centos kernels. I'm ready to provide any additional info that can help to solve an issue. ** Tags added: dm-crypt ** Tags removed: dmcrypt ** Attachment added: "rand_access_raw.sh" http://launchpadlibrarian.net/26035684/rand_access_raw.sh ** Attachment removed: "rand_access.sh" http://launchpadlibrarian.net/25755426/rand_access.sh -- Random access read speed from encrypted device is very slow compared with other linux distributions https://bugs.launchpad.net/bugs/363763 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs