EXT4 Encryption Linux 4.18 Git Tests for a future article on Phoronix. EXT4 fscrypt: Processor: 2 x Intel Xeon Gold 6138 @ 3.70GHz (40 Cores / 80 Threads), Motherboard: TYAN S7106 (V1.00 BIOS), Chipset: Intel Sky Lake-E DMI3 Registers, Memory: 12 x 8192 MB DDR4-2666MT/s Micron 9ASF1G72PZ-2G6B1, Disk: 256GB Samsung SSD 850 + 2000GB Seagate ST2000DM006-2DM1 + 2 x 120GB TOSHIBA-TR150, Graphics: ASPEED ASPEED Family, Monitor: VE228, Network: Intel I210 Gigabit Connection OS: Ubuntu 18.04, Kernel: 4.17.0-999-generic (x86_64) 20180614, Desktop: GNOME Shell 3.28.1, Compiler: GCC 7.3.0, File-System: ext4, Screen Resolution: 1920x1080 No Encryption: Processor: 2 x Intel Xeon Gold 6138 @ 3.70GHz (40 Cores / 80 Threads), Motherboard: TYAN S7106 (V1.00 BIOS), Chipset: Intel Sky Lake-E DMI3 Registers, Memory: 12 x 8192 MB DDR4-2666MT/s Micron 9ASF1G72PZ-2G6B1, Disk: 256GB Samsung SSD 850 + 2000GB Seagate ST2000DM006-2DM1 + 2 x 120GB TOSHIBA-TR150, Graphics: ASPEED ASPEED Family, Monitor: VE228, Network: Intel I210 Gigabit Connection OS: Ubuntu 18.04, Kernel: 4.17.0-999-generic (x86_64) 20180614, Desktop: GNOME Shell 3.28.1, Compiler: GCC 7.3.0, File-System: ext4, Screen Resolution: 1920x1080 eCryptfs: Processor: 2 x Intel Xeon Gold 6138 @ 3.70GHz (40 Cores / 80 Threads), Motherboard: TYAN S7106 (V1.00 BIOS), Chipset: Intel Sky Lake-E DMI3 Registers, Memory: 12 x 8192 MB DDR4-2666MT/s Micron 9ASF1G72PZ-2G6B1, Disk: 256GB Samsung SSD 850 + 2000GB Seagate ST2000DM006-2DM1 + 2 x 120GB TOSHIBA-TR150, Graphics: ASPEED ASPEED Family, Monitor: VE228, Network: Intel I210 Gigabit Connection OS: Ubuntu 18.04, Kernel: 4.17.0-999-generic (x86_64) 20180614, Desktop: GNOME Shell 3.28.1, Compiler: GCC 7.3.0, File-System: ext4 (ecryptfs), Screen Resolution: 1920x1080 LUKS dm-crypt: Processor: 2 x Intel Xeon Gold 6138 @ 3.70GHz (40 Cores / 80 Threads), Motherboard: TYAN S7106 (V1.00 BIOS), Chipset: Intel Sky Lake-E DMI3 Registers, Memory: 12 x 8192 MB DDR4-2666MT/s Micron 9ASF1G72PZ-2G6B1, Disk: 256GB Samsung SSD 850 + 2000GB Seagate ST2000DM006-2DM1 + 2 x 120GB TOSHIBA-TR150, Graphics: ASPEED ASPEED Family, Monitor: VE228, Network: Intel I210 Gigabit Connection OS: Ubuntu 18.04, Kernel: 4.17.0-999-generic (x86_64) 20180614, Desktop: GNOME Shell 3.28.1, Compiler: GCC 7.3.0, File-System: ext4, Screen Resolution: 1920x1080 CPU Usage (Summary) Monitor Phoronix Test Suite System Monitoring Percent EXT4 fscrypt .. MIN: 0 AVG: 9 MAX: 100 No Encryption . MIN: 0 AVG: 6 MAX: 100 eCryptfs ...... MIN: 0 AVG: 7 MAX: 100 LUKS dm-crypt . MIN: 0 AVG: 6 MAX: 100 FS-Mark 3.3 Test: 1000 Files, 1MB Size Files/s > Higher Is Better EXT4 fscrypt .. 62.87 |================================================ No Encryption . 74.10 |======================================================== eCryptfs ...... 50.33 |====================================== LUKS dm-crypt . 60.50 |============================================== FS-Mark 3.3 Test: 5000 Files, 1MB Size, 4 Threads Files/s > Higher Is Better EXT4 fscrypt .. 47.73 |==================================================== No Encryption . 50.93 |======================================================== eCryptfs ...... 48.13 |===================================================== LUKS dm-crypt . 49.33 |====================================================== FS-Mark 3.3 Test: 4000 Files, 32 Sub Dirs, 1MB Size Files/s > Higher Is Better EXT4 fscrypt .. 38.70 |================================================= No Encryption . 44.60 |======================================================== eCryptfs ...... 36.30 |============================================== LUKS dm-crypt . 40.67 |=================================================== Flexible IO Tester 3.1 Type: Random Write - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory IOPS > Higher Is Better EXT4 fscrypt .. 24300 |================================================= No Encryption . 27700 |======================================================== LUKS dm-crypt . 14733 |============================== Flexible IO Tester 3.1 Type: Sequential Read - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory IOPS > Higher Is Better EXT4 fscrypt .. 392000 |======================================================= No Encryption . 43400 |====== LUKS dm-crypt . 22100 |=== Flexible IO Tester 3.1 Type: Sequential Write - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory IOPS > Higher Is Better EXT4 fscrypt .. 25400 |================================================ No Encryption . 29667 |======================================================== LUKS dm-crypt . 15767 |============================== Compile Bench 0.6 Test: Initial Create MB/s > Higher Is Better EXT4 fscrypt .. 355.03 |====================================== No Encryption . 505.65 |======================================================= eCryptfs ...... 201.47 |====================== LUKS dm-crypt . 509.85 |======================================================= Flexible IO Tester 3.1 Type: Random Read - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory MB/s > Higher Is Better EXT4 fscrypt .. 26.70 |================================================ No Encryption . 31.23 |======================================================== LUKS dm-crypt . 21.53 |======================================= Flexible IO Tester 3.1 Type: Random Read - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4MB - Disk Target: Default Test Directory MB/s > Higher Is Better EXT4 fscrypt .. 4283 |========================================================= No Encryption . 507 |======= LUKS dm-crypt . 310 |==== Flexible IO Tester 3.1 Type: Random Write - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory MB/s > Higher Is Better EXT4 fscrypt .. 94.70 |================================================ No Encryption . 108.00 |======================================================= LUKS dm-crypt . 57.57 |============================= Flexible IO Tester 3.1 Type: Random Write - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4MB - Disk Target: Default Test Directory MB/s > Higher Is Better EXT4 fscrypt .. 330 |======================================== No Encryption . 474 |========================================================== LUKS dm-crypt . 263 |================================ Flexible IO Tester 3.1 Type: Sequential Read - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory MB/s > Higher Is Better EXT4 fscrypt .. 1532.00 |====================================================== No Encryption . 169.00 |====== LUKS dm-crypt . 86.30 |=== Flexible IO Tester 3.1 Type: Sequential Read - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4MB - Disk Target: Default Test Directory MB/s > Higher Is Better EXT4 fscrypt .. 4447 |========================================================= No Encryption . 506 |====== LUKS dm-crypt . 310 |==== Flexible IO Tester 3.1 Type: Sequential Write - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory MB/s > Higher Is Better EXT4 fscrypt .. 98.93 |=============================================== No Encryption . 116.00 |======================================================= LUKS dm-crypt . 61.50 |============================= Flexible IO Tester 3.1 Type: Sequential Write - IO Engine: POSIX AIO - Buffered: No - Direct: Yes - Block Size: 4MB - Disk Target: Default Test Directory MB/s > Higher Is Better EXT4 fscrypt .. 332 |======================================== No Encryption . 477 |========================================================== LUKS dm-crypt . 302 |===================================== NGINX Benchmark 1.9.9 Static Web Page Serving Requests Per Second > Higher Is Better EXT4 fscrypt .. 29783.06 |===================================================== No Encryption . 29708.93 |===================================================== eCryptfs ...... 25722.02 |============================================== LUKS dm-crypt . 29831.02 |===================================================== PostgreSQL pgbench 10.3 Scaling: Buffer Test - Test: Normal Load - Mode: Read Write TPS > Higher Is Better EXT4 fscrypt .. 2184.25 |================================================= No Encryption . 2382.99 |====================================================== eCryptfs ...... 1832.18 |========================================== LUKS dm-crypt . 2321.62 |===================================================== PostgreSQL pgbench 10.3 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 3.1 MAX: 18.4 No Encryption . MIN: 0.0 AVG: 2.8 MAX: 21.3 eCryptfs ...... MIN: 0.0 AVG: 2.4 MAX: 20.4 LUKS dm-crypt . MIN: 0.0 AVG: 3.3 MAX: 18.5 PostgreSQL pgbench 10.3 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt . MIN: 0.0 AVG: 1.6 MAX: 3.8 SQLite 3.22 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 0.5 MAX: 1.3 No Encryption . MIN: 0.0 AVG: 0.4 MAX: 1.3 eCryptfs ...... MIN: 0.0 AVG: 0.5 MAX: 1.3 LUKS dm-crypt . MIN: 0.0 AVG: 0.5 MAX: 1.3 FS-Mark 3.3 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 0.8 MAX: 1.3 No Encryption . MIN: 0.0 AVG: 0.8 MAX: 1.3 eCryptfs ...... MIN: 0.0 AVG: 0.9 MAX: 1.3 LUKS dm-crypt . MIN: 0.0 AVG: 0.9 MAX: 1.3 FS-Mark 3.3 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.4 MAX: 5.0 No Encryption . MIN: 0.0 AVG: 1.3 MAX: 2.4 eCryptfs ...... MIN: 0.0 AVG: 1.7 MAX: 5.0 LUKS dm-crypt . MIN: 0.0 AVG: 1.5 MAX: 5.0 FS-Mark 3.3 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.0 MAX: 1.3 No Encryption . MIN: 0.0 AVG: 0.9 MAX: 1.5 eCryptfs ...... MIN: 0.0 AVG: 1.0 MAX: 1.3 LUKS dm-crypt . MIN: 0.0 AVG: 1.2 MAX: 1.4 Compile Bench 0.6 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.0 MAX: 2.5 No Encryption . MIN: 0.0 AVG: 0.9 MAX: 2.5 eCryptfs ...... MIN: 0.0 AVG: 1.0 MAX: 2.5 LUKS dm-crypt . MIN: 0.0 AVG: 2.7 MAX: 8.3 Timed GCC Compilation 7.2 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0 AVG: 19 MAX: 100 No Encryption . MIN: 0 AVG: 13 MAX: 100 eCryptfs ...... MIN: 0 AVG: 15 MAX: 100 LUKS dm-crypt . MIN: 0 AVG: 13 MAX: 100 NGINX Benchmark 1.9.9 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 2.2 MAX: 2.6 No Encryption . MIN: 0.0 AVG: 2.3 MAX: 3.6 eCryptfs ...... MIN: 0.0 AVG: 2.2 MAX: 2.6 LUKS dm-crypt . MIN: 0.0 AVG: 2.3 MAX: 2.8 Flexible IO Tester 3.1 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 0.5 MAX: 6.3 No Encryption . MIN: 0.0 AVG: 0.5 MAX: 6.7 eCryptfs ...... MIN: 0.0 AVG: 0.7 MAX: 6.2 LUKS dm-crypt . MIN: 0.0 AVG: 1.4 MAX: 6.1 Flexible IO Tester 3.1 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.0 MAX: 1.5 No Encryption . MIN: 0.0 AVG: 0.1 MAX: 0.5 eCryptfs ...... MIN: 0.0 AVG: 0.8 MAX: 6.3 LUKS dm-crypt . MIN: 0.0 AVG: 1.4 MAX: 1.9 Flexible IO Tester 3.1 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.0 MAX: 2.5 No Encryption . MIN: 0.0 AVG: 0.7 MAX: 1.4 eCryptfs ...... MIN: 0.0 AVG: 0.0 MAX: 0.1 LUKS dm-crypt . MIN: 0.0 AVG: 0.9 MAX: 2.4 Flexible IO Tester 3.1 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.1 MAX: 6.4 No Encryption . MIN: 0.0 AVG: 0.7 MAX: 1.5 eCryptfs ...... MIN: 0.0 AVG: 0.1 MAX: 0.7 LUKS dm-crypt . MIN: 0.0 AVG: 1.0 MAX: 5.7 Flexible IO Tester 3.1 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.6 MAX: 2.4 No Encryption . MIN: 0.0 AVG: 0.8 MAX: 1.4 eCryptfs ...... MIN: 0.0 AVG: 0.6 MAX: 5.1 LUKS dm-crypt . MIN: 0.0 AVG: 1.1 MAX: 1.5 Flexible IO Tester 3.1 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.2 MAX: 6.0 No Encryption . MIN: 0.0 AVG: 0.1 MAX: 0.4 eCryptfs ...... MIN: 0.0 AVG: 0.8 MAX: 6.4 LUKS dm-crypt . MIN: 0.0 AVG: 1.6 MAX: 5.8 Flexible IO Tester 3.1 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.0 MAX: 5.0 No Encryption . MIN: 0.0 AVG: 0.7 MAX: 1.4 eCryptfs ...... MIN: 0.0 AVG: 0.0 MAX: 0.2 LUKS dm-crypt . MIN: 0.0 AVG: 0.8 MAX: 4.0 Flexible IO Tester 3.1 CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.0 MAX: 6.1 No Encryption . MIN: 0.0 AVG: 0.9 MAX: 6.3 eCryptfs ...... MIN: 0.0 AVG: 0.0 MAX: 0.3 LUKS dm-crypt . MIN: 0.0 AVG: 0.9 MAX: 1.2 OSBench CPU Usage (Summary) Monitor Percent < Lower Is Better EXT4 fscrypt .. MIN: 0.0 AVG: 1.2 MAX: 1.4 No Encryption . MIN: 0.0 AVG: 1.0 MAX: 1.4 eCryptfs ...... MIN: 0.1 AVG: 1.0 MAX: 1.4 LUKS dm-crypt . MIN: 0.0 AVG: 1.2 MAX: 1.8 SQLite 3.22 Timed SQLite Insertions Seconds < Lower Is Better EXT4 fscrypt .. 46.07 |======================================================== No Encryption . 40.90 |================================================== eCryptfs ...... 42.71 |==================================================== LUKS dm-crypt . 45.50 |======================================================= Timed GCC Compilation 7.2 Time To Compile Seconds < Lower Is Better EXT4 fscrypt .. 1029.01 |====================================================== No Encryption . 852.35 |============================================= eCryptfs ...... 964.24 |=================================================== LUKS dm-crypt . 854.03 |============================================= OSBench Test: Create Files us Per Event < Lower Is Better EXT4 fscrypt .. 23.81 |================================== No Encryption . 15.60 |====================== eCryptfs ...... 39.58 |======================================================== LUKS dm-crypt . 15.82 |======================