Skip to content

handshake: add freeze option#88

Open
npajkovsky wants to merge 1 commit intoopenssl:mainfrom
npajkovsky:handshake-freeze
Open

handshake: add freeze option#88
npajkovsky wants to merge 1 commit intoopenssl:mainfrom
npajkovsky:handshake-freeze

Conversation

@npajkovsky
Copy link

No description provided.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
@npajkovsky npajkovsky requested a review from Sashan March 18, 2026 12:42
Copy link
Contributor

@Sashan Sashan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the change.

FYI I gave it a try with openssl from Nikola's frozen branch and those the numbers:
regular run with 64 threads

Average time per handshake: 3975.056520us
Handshakes per second: 16100.400000

frozen run with 64 threads:

Average time per handshake: 2037.905034us
Handshakes per second: 31404.800000

and those are numbers with -s option which disables context sharing:

sashan@work:~/work.openssl/perftools.nikola/source/build$ ./handshake -s /home/sashan/work.openssl/openssl/test/certs 64
Average time per handshake: 7952.879191us
Handshakes per second: 8047.400000
sashan@work:~/work.openssl/perftools.nikola/source/build$ ./handshake -f -s /home/sashan/work.openssl/openssl/test/certs 64
Average time per handshake: 3232.257934us
Handshakes per second: 19800.400000

@t8m
Copy link
Member

t8m commented Mar 18, 2026

This looks like a very nice perf improvement. What would be the numbers with just a single thread runs?

@Sashan
Copy link
Contributor

Sashan commented Mar 18, 2026

This looks like a very nice perf improvement. What would be the numbers with just a single thread runs?

results for single thread:

sashan@work:~/work.openssl/perftools.nikola/source/build$ ./handshake -f /home/sashan/work.openssl/openssl/test/certs 1
Average time per handshake: 1219.512195us
Handshakes per second: 820.000000
sashan@work:~/work.openssl/perftools.nikola/source/build$ ./handshake /home/sashan/work.openssl/openssl/test/certs 1
Average time per handshake: 1216.545012us
Handshakes per second: 822.000000
sashan@work:~/work.openssl/perftools.nikola/source/build$ ./handshake -f -s /home/sashan/work.openssl/openssl/test/certs 1
Average time per handshake: 1940.240590us
Handshakes per second: 515.400000
sashan@work:~/work.openssl/perftools.nikola/source/build$ ./handshake -s /home/sashan/work.openssl/openssl/test/certs 1
Average time per handshake: 1955.416504us
Handshakes per second: 511.400000

@t8m
Copy link
Member

t8m commented Mar 18, 2026

Hmm... that's interesting.

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.

4 participants