LUKS Benchmark
Jump to navigation
Jump to search
1 Context
Hardware
- Lenovo ThinkPad X230 (laptop)
- Intel core i5-3320M @ 2.60 GHz (dual core, 2 threads/core)
- 8-GB RAM
- 128-GB Samsung MZ7TD128 SDD
Linux distribution
- CentOS 8.1
Filesystem configuration (in logical volumes)
- LUKS-encrypted 20-GiB ext4 mounted on /data1
- Unencrypted 20-GiB ext4 mounted on /data2
2 Benchmark Exercise
4.4-GB data file duplication time
Using testfile.dat, a 4.4-GB data file, perform the following commands 5 times
- rm testfile-copy.dat ; time cp testfile.dat testfile-copy.dat
and compute the average time for both
- plain ext4 (/data2), and
- encrypted ext4 (/data1) filesystems.
3 Benchmark Result
Measurement (5 runs average)
Time (s) Plain ext4 Encrypted Penalty Elapsed 31.242 42.186 +35% User 0.031 0.034 +10% System 3.760 4.175 +11%
Statistics reported
- Elapsed (or Real) time is the clock time - time from start to finish of the call. This is all elapsed time including time slices used by other processes and time the process spends blocked (for example if it is waiting for I/O to complete).
- User time is the amount of CPU time spent in user-mode code (outside the kernel) within the process. This is only actual CPU time used in executing the process. Other processes and time the process spends blocked do not count towards this figure.
- System time is the amount of CPU time spent in the kernel within the process. This means executing CPU time spent in system calls within the kernel, as opposed to library code, which is still running in user-space. Like 'user', this is only CPU time used by the process.
4 Raw Statistics
The following lists the raw output of the "time copy 4GBdatafile" commands, used to compute above table of figures averaged across the 5 runs
4.1 Plain ext4
Run#1 real 0m32.086s user 0m0.038s sys 0m3.864s Run#2 real 0m32.046s user 0m0.031s sys 0m3.839s Run#3 real 0m31.948s user 0m0.040s sys 0m3.813s Run#4 real 0m30.725s user 0m0.028s sys 0m3.683s Run#5 real 0m29.407s user 0m0.020s sys 0m3.602s
4.2 LUKS-encrypted ext4
Run#1 real 0m45.582s user 0m0.032s sys 0m4.254s Run#2 real 0m40.677s user 0m0.040s sys 0m4.196s Run#3 real 0m43.757s user 0m0.031s sys 0m4.188s Run#4 real 0m40.796s user 0m0.039s sys 0m4.136s Run#5 real 0m40.120s user 0m0.029s sys 0m4.103s