Skip to content

Performance deterioration with AES-GCM #6

Description

@vipinpr5991

Hi Team,

We are seeing a performance deterioration while testing AMD AOCL with the OpenSSL provider on EPYC 9745.

The system details are as follows:
Operation system is Ubuntu 24.04.4 LTS
Kernel version is 6.8.0-94-generic
AOCL provider version : 5.2.0 (OpenSSL version 3.3.6) Built with GCC 14
Note: I had also tried the performance tests with the AOCC compiler

Whilst comparing the AES performance on AOCL provider vs the Default OpenSSL provider:
With EPYC 7713 processor, we are seeing a performance boost of +40% for AES-256-GCM and +60% for AES-128-GCM.
With EPYC 9745 processor, we are seeing a performance deterioration of about -23% for AES-256-GCM and about -17% for AES-128-GCM
With EPYC 9745 processor, we are only seeing about 10% improvement in RSA-2048 Sign/s second.
These were the cmake build settings I used to build the provider..
-DCMAKE_C_COMPILER=gcc-14
-DCMAKE_CXX_COMPILER=g++-14
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_FLAGS_RELEASE="-O3 -march=znver5 -DNDEBUG"
-DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=znver5 -DNDEBUG"
-DALCP_ENABLE_TESTS=ON
-DENABLE_TESTS_OPENSSL_API=ON
-DCMAKE_C_FLAGS='-march=znver5 -O3'
-DCMAKE_CXX_FLAGS='-march=znver5 -O3'
-DCMAKE_INSTALL_PREFIX=$PWD/install
-DOPENSSL_INSTALL_DIR=/usr
-DENABLE_AOCL_UTILS=ON
-DAOCL_UTILS_INSTALL_DIR=/root/AOCL-LATEST/aocl-utils/build/install
-DALCP_ENABLE_EXAMPLES=ON
-DALCP_ENABLE_GCM_ALWAYS_COMPUTE_TABLE=OFF
-DAOCL_COMPAT_LIBS=openssl
-DALCP_ENABLE_BENCH=ON
-DALCP_ENABLE_DYNAMIC_COMPILER_PICK=ON
-DALCP_ENABLE_CIPHER_MULTI_UPDATE=ON
-DALCP_ENABLE_CCM_MULTI_UPDATE=ON
-DALCP_ENABLE_OFB_MULTI_UPDATE=ON
-DALCP_ENABLE_CBC_INPLACE_BUFFER=ON \

Thanks and Regards,
Vipin P Ramesh.

Image Image Image

Confirmed with debug logs that we are indeed taking the AOCL provider path.. confirmed with a few curl requests [note : debugs disabled for the actual SSL TPS testing]

`
[AOCL-Crypto] alcp_cipher_init KeyLen 0,IVLen 16
[AOCL-Crypto] alcp_cipher_encrypt PTLen 32
[AOCL-Crypto] alcp_cipher_init KeyLen 256,IVLen 0
[AOCL-Crypto] alcp_cipher_init KeyLen 0,IVLen 16
[AOCL-Crypto] alcp_cipher_encrypt PTLen 32
[AOCL-Crypto] alcp_cipher_init KeyLen 256,IVLen 0
[AOCL-Crypto] alcp_rsa_context_size CtxSize 224

[AOCL-Crypto] alcp_rsa_request
[AOCL-Crypto] alcp_rsa_finish
[AOCL-Crypto] alcp_cipher_init KeyLen 0,IVLen 16
[AOCL-Crypto] alcp_cipher_encrypt PTLen 32
[AOCL-Crypto] alcp_cipher_init KeyLen 256,IVLen 0
[AOCL-Crypto] alcp_rsa_context_size CtxSize 224

[AOCL-Crypto] alcp_rsa_request
[AOCL-Crypto] alcp_rsa_add_mgf
[AOCL-Crypto] alcp_rsa_get_digest_info_index
[AOCL-Crypto] alcp_rsa_get_digest_info_size DigestInfoSize 19

[AOCL-Crypto] alcp_rsa_add_digest
[AOCL-Crypto] alcp_rsa_add_mgf
[AOCL-Crypto] alcp_rsa_get_digest_info_index
[AOCL-Crypto] alcp_rsa_get_digest_info_size DigestInfoSize 19

[AOCL-Crypto] alcp_rsa_add_digest
[AOCL-Crypto] alcp_rsa_context_size CtxSize 224

[AOCL-Crypto] alcp_rsa_finish
[AOCL-Crypto] alcp_rsa_finish
[AOCL-Crypto] alcp_cipher_aead_context_size CtxSize 104
[AOCL-Crypto] alcp_cipher_aead_request_with_extState Mode 8, KeyLen 128
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 128,IVLen 0
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_decrypt DecLen 16
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_context_size CtxSize 104
[AOCL-Crypto] alcp_cipher_aead_request_with_extState Mode 8, KeyLen 128
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 128,IVLen 0
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 16
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_decrypt DecLen 77
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 314
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 3846
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 4096
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 2729
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_decrypt DecLen 2
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_finish
[AOCL-Crypto] alcp_cipher_aead_finish
[AOCL-Crypto] alcp_cipher_init KeyLen 0,IVLen 16
[AOCL-Crypto] alcp_cipher_encrypt PTLen 32
[AOCL-Crypto] alcp_cipher_init KeyLen 256,IVLen 0
[AOCL-Crypto] alcp_cipher_init KeyLen 0,IVLen 16
[AOCL-Crypto] alcp_cipher_encrypt PTLen 32
[AOCL-Crypto] alcp_cipher_init KeyLen 256,IVLen 0
[AOCL-Crypto] alcp_rsa_context_size CtxSize 224

[AOCL-Crypto] alcp_rsa_request
[AOCL-Crypto] alcp_rsa_finish
[AOCL-Crypto] alcp_cipher_init KeyLen 0,IVLen 16
[AOCL-Crypto] alcp_cipher_encrypt PTLen 32
[AOCL-Crypto] alcp_cipher_init KeyLen 256,IVLen 0
[AOCL-Crypto] alcp_rsa_context_size CtxSize 224

[AOCL-Crypto] alcp_rsa_request
[AOCL-Crypto] alcp_rsa_add_mgf
[AOCL-Crypto] alcp_rsa_get_digest_info_index
[AOCL-Crypto] alcp_rsa_get_digest_info_size DigestInfoSize 19

[AOCL-Crypto] alcp_rsa_add_digest
[AOCL-Crypto] alcp_rsa_add_mgf
[AOCL-Crypto] alcp_rsa_get_digest_info_index
[AOCL-Crypto] alcp_rsa_get_digest_info_size DigestInfoSize 19

[AOCL-Crypto] alcp_rsa_add_digest
[AOCL-Crypto] alcp_rsa_context_size CtxSize 224

[AOCL-Crypto] alcp_rsa_finish
[AOCL-Crypto] alcp_rsa_finish
[AOCL-Crypto] alcp_cipher_aead_context_size CtxSize 104
[AOCL-Crypto] alcp_cipher_aead_request_with_extState Mode 8, KeyLen 128
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 128,IVLen 0
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_decrypt DecLen 16
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_context_size CtxSize 104
[AOCL-Crypto] alcp_cipher_aead_request_with_extState Mode 8, KeyLen 128
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 128,IVLen 0
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 16
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_decrypt DecLen 77
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 314
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 3846
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 4096
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_encrypt EncLen 2729
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_init KeyLen 0,IVLen 12
[AOCL-Crypto] alcp_cipher_aead_set_aad ADLen 13
[AOCL-Crypto] alcp_cipher_aead_decrypt DecLen 2
[AOCL-Crypto] alcp_cipher_aead_get_tag TagLen 16
[AOCL-Crypto] alcp_cipher_aead_finish
[AOCL-Crypto] alcp_cipher_aead_finish
`

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions