Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DH_check support to perf tool #982

Merged
merged 4 commits into from
May 1, 2023

Conversation

torben-hansen
Copy link
Contributor

@torben-hansen torben-hansen commented Apr 26, 2023

Description of changes:

Makes it possible to measure performance of the function DH_check().

Call-outs:

Generating DH parameters for higher bit sizes gets pretty slow.

Testing:

$ ./tool/bssl speed -filter dhcheck -timeout 10 -primes 2048,4096
DH check speed test is very slow. Speed test works best with higher timeouts.
Did 16 DH check(s) (2048 bits) operations in 10164348us (1.574 ops/sec)
Did 3 DH check(s) (4096 bits) operations in 15465898us (0.194 ops/sec)

$ ./tool/bssl speed -filter dhcheck -timeout 2 -primes 1024 -json
[
{"description": "DH check(s)", "numCalls": 20, "microseconds": 2045047, "primeSizePerCall": 1024}
]

Checking new -chuncks and -primes parsing

$ ./tool/bssl speed -filter EVP-AES-128-GCM -chunks 20,50,56
Did 5489000 EVP-AES-128-GCM encrypt init operations in 1000135us (5488259.1 ops/sec)
Did 10318000 EVP-AES-128-GCM encrypt (20 bytes) operations in 1000012us (10317876.2 ops/sec): 206.4 MB/s
Did 9833000 EVP-AES-128-GCM encrypt (50 bytes) operations in 1000011us (9832891.8 ops/sec): 491.6 MB/s
Did 9841000 EVP-AES-128-GCM encrypt (56 bytes) operations in 1000018us (9840822.9 ops/sec): 551.1 MB/s
Did 5481000 EVP-AES-128-GCM decrypt init operations in 1000071us (5480610.9 ops/sec)
Did 10456000 EVP-AES-128-GCM decrypt (20 bytes) operations in 1000013us (10455864.1 ops/sec): 209.1 MB/s
Did 10318500 EVP-AES-128-GCM decrypt (50 bytes) operations in 1000013us (10318365.9 ops/sec): 515.9 MB/s
Did 10318500 EVP-AES-128-GCM decrypt (56 bytes) operations in 1000007us (10318427.8 ops/sec): 577.8 MB/s


$ ./tool/bssl speed -filter EVP-AES-128-GCM -chunks 20,50,56
Did 5487000 EVP-AES-128-GCM encrypt init operations in 1000077us (5486577.5 ops/sec)
Did 10589000 EVP-AES-128-GCM encrypt (20 bytes) operations in 1000083us (10588121.2 ops/sec): 211.8 MB/s
Did 10230000 EVP-AES-128-GCM encrypt (50 bytes) operations in 1000024us (10229754.5 ops/sec): 511.5 MB/s
Did 10228250 EVP-AES-128-GCM encrypt (56 bytes) operations in 1000001us (10228239.8 ops/sec): 572.8 MB/s
Did 5497250 EVP-AES-128-GCM decrypt init operations in 1000019us (5497145.6 ops/sec)
Did 11285000 EVP-AES-128-GCM decrypt (20 bytes) operations in 1000073us (11284176.3 ops/sec): 225.7 MB/s
Did 11094000 EVP-AES-128-GCM decrypt (50 bytes) operations in 1000021us (11093767.0 ops/sec): 554.7 MB/s
Did 11095000 EVP-AES-128-GCM decrypt (56 bytes) operations in 1000021us (11094767.0 ops/sec): 621.3 MB/s

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and
the ISC license.

tool/speed.cc Show resolved Hide resolved
tool/speed.cc Show resolved Hide resolved
tool/speed.cc Outdated Show resolved Hide resolved
tool/speed.cc Show resolved Hide resolved
tool/speed.cc Show resolved Hide resolved
@torben-hansen torben-hansen merged commit 413bce5 into aws:main May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants