Changes between Version 9 and Version 10 of linux/encryption


Ignore:
Timestamp:
05/26/2020 02:33:15 AM (2 years ago)
Author:
Bobby Jones
Comment:

Updated performance testing information

Legend:

Unmodified
Added
Removed
Modified
  • linux/encryption

    v9 v10  
    144144
    145145=== Performace Comparisons
     146These openssl speed tests were done using a v5.4.0 kernel and an out of tree cryptodev module on an Ubuntu Focal rootfs. In order to reproduce these results, you must use the config script within openssl's build directory to disable dynamic engine support. Otherwise openssl will almost always default to using the faster CPU method (software).
     147
     148{{{#!bash
     149apt install build-essential pkg-config libssl-dev
     150wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
     151tar xvf openssl-*
     152cd openssl-*
     153./config disable-engine disable-dso disable-dynamic-engine enable-devcryptoeng enable-afalgeng
     154make
     155make install
     156export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ # prioritize built shared object path for linker this boot
     157
     158# Remove cryptodev module to test afalg
     159rmmod cryptodev; modprobe af_alg algif_hash algif_aead algif_skcipher algif_rng
     160openssl speed -evp aes-256-cbc -engine afalg -elapsed
     161
     162# Remove afalg modules to test cryptodev
     163rmmod algif_hash algif_aead algif_skcipher algif_rng af_alg; modprobe cryptodev
     164openssl speed -evp aes-256-cbc -engine devcrypto -elapsed
     165
     166# Remove both to ensure pure software test
     167rmmod cryptodev; rmmod algif_hash algif_aead algif_skcipher algif_rng af_alg
     168openssl speed -evp aes-256-cbc -elapsed
     169}}}
     170 
     171* Device: GW7300-00-AA
     172* CPU Speed: 1200 MHz
     173* OpenSSL version: 1.1.1g (aes-256-cbc)
     174
     175||                ||||||||||||= '''Number of Blocks Processed in 3s / Block Size in Bytes''' =||
     176||= '''Engine''' =||'''16'''    ||'''64'''    ||'''256'''   ||'''1024'''   ||'''8192'''  ||'''16384'''||
     177||= AF_ALG       =||15.47k||61.66k||245.18k||961.12k ||6416.15k ||10759.56k||
     178||= cryptodev    =||15.75k||62.78k||250.07k||978.99k ||6572.84k||11110.23k||
     179||= software     =||125752.24k||334926.68k||564419.24k||693793.79k ||743309.31k||746651.65k||
     180
    146181* Device: GW6404-B
    147182* CPU Speed: 1500 MHz
    148 * OpenSSL version: 1.1.1c
    149 
    150 ||                ||||||||||||= '''Number of Blocks Processed in 3s / Block Size in Bytes''' =||             
    151 ||= '''Engine''' =||16    ||64    ||256   ||1024   ||8192  ||16384|| 
    152 ||= AF_ALG       =||283925||281102||254300||212132 ||75834 ||43402||
    153 ||= cryptodev    =||958747||919563||674246||450026 ||107426||55976||
    154 ||= software     =||959704||920003||673949||449422 ||107408||56336||
     183* OpenSSL version: 1.1.1g (aes-256-cbc)
     184
     185||                ||||||||||||= '''Number of Blocks Processed in 3s / Block Size in Bytes''' =||
     186||= '''Engine''' =||'''16'''    ||'''64'''    ||'''256'''   ||'''1024'''   ||'''8192'''  ||'''16384'''||
     187||= AF_ALG       =||243.96k||992.81k||3705.26k||12669.95k ||55855.79k ||75311.79k||
     188||= cryptodev    =||361.48k||1453.65k||5723.56k||20779.35k ||74918.57k||93077.50k||
     189||= software     =||33182.40k||72847.42k||102824.70k||115210.24k ||119368.36k||119581.35k||
     190
    155191
    156192Note: Performance of each engine may vary between systems. In general, most results are similar between engines but can vary at the low and high ends for block sizes and by individual ciphers/digests types. It's recommended to evaluate each engine on your system to determine their performance and choose the best combination that fits your use case.