zfs: backport AES-GCM performance accelleration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zfs-linux (Ubuntu) |
Fix Released
|
Medium
|
Colin Ian King | ||
Focal |
Fix Released
|
Medium
|
Colin Ian King | ||
Groovy |
Fix Released
|
Medium
|
Colin Ian King |
Bug Description
== SRU Justification ==
Upstream commit 31b160f0a6c673c
Tests on a memory backed pool show performance improvements of ~15-22% for AES-CCM writes, ~17-20% AES-CCM reads, 34-36% AES-GCM writes and ~79-80% AES-GCM reads on a Sandybridge x86-64 CPU, so this looks like a promising optimization that will benefit a lot of users.
== The fix ==
Backport of upstream 31b160f0a6c673c
== Test case ==
Run ZFS performance tests from ubuntu_
Also test with the 4 types of ZFS ubuntu autotests, should not fail any of these.
== Regression Potential ==
This fix alters the crypto engine and adds in new optimizations for CPUs that have capable instruction sets. There is a risk that this new crypto code is erroneous.
Changed in zfs-linux (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Colin Ian King (colin-king) |
Changed in zfs-linux (Ubuntu Focal): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Colin Ian King (colin-king) |
Changed in zfs-linux (Ubuntu Groovy): | |
status: | In Progress → Fix Released |
benchmarked on Haswell Intel 8 thread CPU:
Benchmarks: original
15:29:15 INFO | zfs_encryption_ aes_128_ ccm_wr_ rate_mbytes_ per_second_ average 79.6500 aes_128_ ccm_rd_ rate_mbytes_ per_second_ average 68.9800 aes_192_ ccm_wr_ rate_mbytes_ per_second_ average 79.4400 aes_192_ ccm_rd_ rate_mbytes_ per_second_ average 67.0700 aes_256_ ccm_wr_ rate_mbytes_ per_second_ average 78.2600 aes_256_ ccm_rd_ rate_mbytes_ per_second_ average 64.2200 aes_128_ gcm_wr_ rate_mbytes_ per_second_ average 79.2000 aes_128_ gcm_rd_ rate_mbytes_ per_second_ average 79.4600 aes_192_ gcm_wr_ rate_mbytes_ per_second_ average 78.9500 aes_192_ gcm_rd_ rate_mbytes_ per_second_ average 77.5500 aes_256_ gcm_wr_ rate_mbytes_ per_second_ average 78.3500 aes_256_ gcm_rd_ rate_mbytes_ per_second_ average 76.0900
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
15:29:15 INFO | zfs_encryption_
Benchmarks: optimized
15:13:33 INFO | zfs_encryption_ aes_128_ ccm_wr_ rate_mbytes_ per_second_ average 89.2900 aes_128_ ccm_rd_ rate_mbytes_ per_second_ average 73.2800 aes_192_ ccm_wr_ rate_mbytes_ per_second_ average 88.9800 aes_192_ ccm_rd_ rate_mbytes_ per_second_ average 70.9100 aes_256_ ccm_wr_ rate_mbytes_ per_second_ average 88.3000 aes_256_ ccm_rd_ rate_mbytes_ per_second_ average 68.4500 aes_128_ gcm_wr_ rate_mbytes_ per_second_ average 113.1000 aes_128_ gcm_rd_ rate_mbytes_ per_second_ average 353.2000 aes_192_ gcm_wr_ rate_mbytes_ per_second_ average 112.7000 aes_192_ gcm_rd_ rate_mbytes_ per_second_ average 349.7000 aes_256_ gcm_wr_ rate_mbytes_ per_second_ average 111.6000 aes_256_ gcm_rd_ rate_mbytes_ per_second_ average 344.6000
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_
15:13:33 INFO | zfs_encryption_