On 2016-06-29 21:09, John Andersen wrote:
By the way, I haven't been able to discern any performance penalty for LUKS. I'm sure there must be some, but it seems unmeasurably small.
Easy. Write a big file to the encrypted device, another to the clear device, and time both operations, measuring also the CPU load. Telcontar:~ # time dd if=/dev/zero of=/home1/test count=1000 bs=1M 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 2.12433 s, 494 MB/s real 0m2.126s user 0m0.004s sys 0m0.777s Telcontar:~ # time dd if=/dev/zero of=/data/cripta/test count=1000 bs=1M 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 3.14988 s, 333 MB/s real 0m3.151s user 0m0.004s sys 0m0.734s Telcontar:~ # Without cache: Telcontar:~ # time dd if=/dev/zero of=/data/cripta/test count=1000 bs=1M oflag=direct 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 11.2671 s, 93.1 MB/s real 0m11.863s user 0m0.006s sys 0m0.825s Telcontar:~ # time dd if=/dev/zero of=/home1/test count=1000 bs=1M oflag=direct 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 6.36797 s, 165 MB/s real 0m6.370s user 0m0.001s sys 0m0.366s Telcontar:~ # Bigger file: Telcontar:~ # time dd if=/dev/zero of=/data/cripta/test count=5000 bs=1M oflag=direct 5000+0 records in 5000+0 records out 5242880000 bytes (5.2 GB) copied, 56.4765 s, 92.8 MB/s real 0m56.478s user 0m0.006s sys 0m1.188s Telcontar:~ # time dd if=/dev/zero of=/home1/test count=5000 bs=1M oflag=direct 5000+0 records in 5000+0 records out 5242880000 bytes (5.2 GB) copied, 30.2719 s, 173 MB/s real 0m30.274s user 0m0.007s sys 0m2.102s Telcontar:~ # Speed is about half. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)