Comments (4)
@Ashok-d-attikatti It's been a while since I've investigated speed performance with openssl and cryptodev.
On my test system I don't see the same order of magnitude differences but they are there regardless. From what I could see, openssl is never leaving userspace even with devcrypto engine and stays most of the time in _vpaes_encrypt_core.
In any case, if the CPU (and not an accelerator) is doing the encryption hard-work you will see better performance by staying in user-space.
You may want to try flamegraph for investigating this.
Here are my numbers:
./speed
Testing AES-128-CBC cipher:
Encrypting in chunks of 512 bytes: done. 1.34 GB in 5.12 secs: 0.26 GB/sec
Encrypting in chunks of 1024 bytes: done. 1.39 GB in 5.00 secs: 0.28 GB/sec
Encrypting in chunks of 2048 bytes: done. 4.58 GB in 15.61 secs: 0.29 GB/sec
Encrypting in chunks of 4096 bytes: done. 1.51 GB in 5.14 secs: 0.29 GB/sec
Encrypting in chunks of 8192 bytes: done. 1.47 GB in 5.00 secs: 0.29 GB/sec
Encrypting in chunks of 16384 bytes: done. 1.50 GB in 5.00 secs: 0.30 GB/sec
Encrypting in chunks of 32768 bytes: done. 1.47 GB in 5.00 secs: 0.29 GB/sec
Encrypting in chunks of 65536 bytes: done. 1.48 GB in 5.00 secs: 0.30 GB/sec
openssl speed -evp aes-128-cbc -engine devcrypto
Engine "devcrypto" set.
Doing AES-128-CBC ops for 3s on 16 size blocks: 58745516 AES-128-CBC ops in 2.99s
Doing AES-128-CBC ops for 3s on 64 size blocks: 17233106 AES-128-CBC ops in 3.01s
Doing AES-128-CBC ops for 3s on 256 size blocks: 4399745 AES-128-CBC ops in 3.00s
Doing AES-128-CBC ops for 3s on 1024 size blocks: 1121926 AES-128-CBC ops in 3.00s
Doing AES-128-CBC ops for 3s on 8192 size blocks: 140707 AES-128-CBC ops in 3.00s
Doing AES-128-CBC ops for 3s on 16384 size blocks: 69739 AES-128-CBC ops in 3.00s
version: 3.2.0-alpha2
built on: Wed Oct 11 05:59:17 2023 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
CPUINFO: OPENSSL_ia32cap=0x801a2201478bffff:0x2401
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
AES-128-CBC 314357.28k 366418.20k 375444.91k 382950.74k 384223.91k 380867.93k
from cryptodev-linux.
We are trying to evaluate on Riscv platform that has support for hardware crypto accelerator and we believe this performance number from the hardware, and we expected to be similar to OpenSSL.
we would like to know on which platform you are running this test. does it support an accelerator or this data processed from the CPU (without a hardware accelerator )
Is there any way to enhance the performance of our setup/board
from cryptodev-linux.
@Ashok-d-attikatti I'm sorry, maybe I implied too much with my 'test system'. I'm simply running in Virtuabox on top of Windows in a laptop from a few years ago. No special hardware crypto acceleration (not even aesni in the CPU). You will get similar results from running directly on Linux desktop.
As for improving performance, you may want first to understand the bottlenecks and what is driving these results. You might find that your CPU is simply faster than the hardware accelerator that you are testing.
from cryptodev-linux.
Thanks for the update
from cryptodev-linux.
Related Issues (20)
- SSH with openssl "mux digest failed" HOT 5
- make fail: zc.c:80:8: error: too many arguments to function ‘get_user_pages_remote’ HOT 9
- Openembedded out of tree patches HOT 5
- OpenSSL patch website cannot be opened, where to find the patch please? HOT 3
- encrypt-then-mac in aead is more secure
- kle
- openssl_wrapper.c needs to be updated for openssl 3.0.0 HOT 3
- "possible circular locking dependency" warning HOT 3
- pgcrypto to use cryptodev HOT 2
- [OpenBMC] Kernel panic while running "openssl engine" within cryptodev-linux kernel module inserted HOT 1
- What's the supported kernel version list? HOT 2
- Unable to fetch URL from any source HOT 3
- No file to patch. Skipping patch. HOT 3
- module install HOT 1
- Cryptodev module fails to load with Unknown symbol errors HOT 1
- Cipher supports in cryptodev-linux HOT 2
- AES-GCM tag issue HOT 5
- the async mode is not truely async
- Phase 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cryptodev-linux.