Giter VIP home page Giter VIP logo

Comments (4)

cristian-stoica avatar cristian-stoica commented on July 18, 2024

@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.

Ashok-d-attikatti avatar Ashok-d-attikatti commented on July 18, 2024

Hi @cristian-stoica

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.

cristian-stoica avatar cristian-stoica commented on July 18, 2024

@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.

Ashok-d-attikatti avatar Ashok-d-attikatti commented on July 18, 2024

Thanks for the update

from cryptodev-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.