Cryptography Performance of Ubuntu Server versions

Sahan Sanathana 0 Reputation points
2024-07-24T04:03:57.4166667+00:00

I appreciate your help with this issue. I'm running a .NET 6.0 powered web and API application behind an Apache reverse proxy. These applications use some self-signed certificates for certain operations. Here's the situation:

  • Operating Systems: The application runs much faster on Ubuntu 20.04 LTS compared to Ubuntu 22.04 LTS and Ubuntu 24.04 LTS.
  • Performance Investigation: We have identified that the cryptography operations in the application are slower on Ubuntu 22.04 LTS and Ubuntu 24.04 LTS.
  • Expectation: Given that Ubuntu 22.04 LTS is a newer version, we expected it to be faster than Ubuntu 20.04 LTS.
  • Hardware and Software Consistency: We are using the same hardware and software specifications across all versions (vCPU, RAM, HDD, etc.). There are no other background processes or applications running—just a fresh OS installation.

Any insights or suggestions on why cryptography operations might be slower on newer versions of Ubuntu would be greatly appreciated. we use SHA 256 hashed self sign certificates

  • Below report is generated by a .net tool that i created to check certificate signing and encryption speed

--- Ubuntu 20.04 LTS ---

Program Started!!!

Time taken to read the app config - 00:00:00.0000342

Time taken to deserialize app settings - 00:00:00.1070378

Time taken to generate random string - 00:00:00.0003254

Short Length Data Signing Started

Short Length Data Private Key to Object - 00:00:00.0301827

Short Length Data Public Key to Object - 00:00:00.0002089

Chain Info - True

Short Length Data Chain Build - 00:00:00.0530501

Short Length Data Base64 Conversion - 00:00:00.0006128

Short Length Data Chain creation - 00:00:00.0000382

Short Length Data Sign - 00:00:00.0351575

Short Length Data Time taken to sign - 00:00:00.1339372

Short Length Data Encryption Started

Short Length Data Time taken to encrypt - 00:00:00.0161288

Short Length Data Time taken to sign and encrypt - 00:00:00.0161288

-- Ubuntu 22.04 LTS ---

Program Started!!!

Time taken to read the app config - 00:00:00.0000395

Time taken to deserialize app settings - 00:00:00.1430425

Time taken to generate random string - 00:00:00.0004680

Short Length Data Signing Started

Short Length Data Private Key to Object - 00:00:00.1012312

Short Length Data Public Key to Object - 00:00:00.0006185

Chain Info - True

Short Length Data Chain Build - 00:00:00.2273847

Short Length Data Base64 Conversion - 00:00:00.0008246

Short Length Data Chain creation - 00:00:00.0000530

Short Length Data Sign - 00:00:00.0455311

Short Length Data Time taken to sign - 00:00:00.3932579

Short Length Data Encryption Started

Short Length Data Time taken to encrypt - 00:00:00.0196338

Short Length Data Time taken to sign and encrypt - 00:00:00.0196338

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
0 comments No comments
{count} votes