Comment 11 for bug 654764

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 654764] Re: writing to ecryptfs partition on SSD drive is many times slower than writing to unencrypted partition on the same drive

Encryption ain't free.

Here are three really rough tests on my side:

To encrypted home:

time dd if=/dev/zero of=~/dummy bs=512 count=10240
10240+0 records in
10240+0 records out
5242880 bytes (5.2 MB) copied, 0.456936 s, 11.5 MB/s

real 0m0.459s
user 0m0.010s
sys 0m0.440s

To my SSD, not encrypted:

time dd if=/dev/zero of=/local/dummy bs=512 count=10240
10240+0 records in
10240+0 records out
5242880 bytes (5.2 MB) copied, 0.0222484 s, 236 MB/s

real 0m0.024s
user 0m0.000s
sys 0m0.020s

To shared memory:

time dd if=/dev/zero of=/tmp/dummy bs=512 count=10240
10240+0 records in
10240+0 records out
5242880 bytes (5.2 MB) copied, 0.0177176 s, 296 MB/s

real 0m0.020s
user 0m0.000s
sys 0m0.010s

There is some encryption overhead, but also, the ecryptfs data is
written synchronously to the disk, whereas these other tests are
cached (as I understand it).