writing to ecryptfs partition on SSD drive is many times slower than writing to unencrypted partition on the same drive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eCryptfs |
Fix Released
|
Medium
|
Tyler Hicks | ||
ecryptfs-utils (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Binary package hint: ecryptfs-utils
I've been using ecryptfs from the very introduction in Ubuntu. Recently I installed Maverick RC on a brand new SSD drive (120GB - OCZSSD2-2VTXE120G) with home encrypted with ecryptfs - as usual.
I felt something was wrong with the overall speed and I did some testing and it seems to me something is wrong with the performance of ecryptfs, here are some tests - the speed is quite similar to real life writing (I moved a lot of data to this partition).
The drive has been secure erased, partitions properly aligned, trim enabled in fstab
-------
test in encrypted ~
time dd if=/dev/zero of=filename bs=1024 count=1000000
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 51.601 s, 19.8 MB/s
real 0m51.605s
user 0m0.280s
sys 0m49.400s
-------
test in unencrypted /tmp (same hdd, different partition)
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 3.6165 s, 283 MB/s
real 0m3.686s
user 0m0.190s
sys 0m2.910s
-------
Clearly there is a 14 times speed difference. Please note, that I copied real-life data to this partition and speed never exceeded 33MB/s with both code repositories (lots of tiny files) and virtual machines (>2GB files)
For comparison, here is the same test done in Lucid on a 3-year old 5400RPM drive, same machine, 32-bit install.
-------
test in encrypted ~
time dd if=/dev/zero of=filename bs=1024 count=1000000
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 89.7334 s, 11.4 MB/s
real 1m29.739s
user 0m0.248s
sys 0m58.100s
-------
test in unencrypted /tmp (same hdd, different partition)
time dd if=/dev/zero of=filename bs=1024 count=1000000
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 47.7698 s, 21.4 MB/s
real 0m48.069s
user 0m0.240s
sys 0m4.444s
-------
So, my new SSD drive is 13 times faster on unencrypted partition and not even 2 times faster on encryptfs one.
I report it as bug, because it surely looks like one.
If you want me to do any other tests, I'll be happy to help
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ecryptfs-utils 83-0ubuntu3
ProcVersionSign
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Mon Oct 4 20:33:05 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20100928)
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: ecryptfs-utils
description: | updated |
Changed in ecryptfs-utils (Ubuntu): | |
status: | Confirmed → Invalid |
Hey Tyler,
Can you take a look and comment on this?