Gert Corthout
2015-09-28 08:11:16 UTC
Hello
all,
I am currently working on a asio-service
server that will be accepting SSL connections. I currently have the service
running on 4 threads and configured OpenSSL to be threadsafe
(CRYPTO_set_id_callback and CRYPTO_set_locking_callback).
The main load on this server is the RSA
encryption/decryption during the SSL handshake. However it looks like this load
is not distributed in parallel over the different threads, the OpenSSL calls
seem to be serialized.
I found this thread about it for an old asio
version:
http://boost.2283326.n4.nabble.com/ASIO-async-SSL-operations-unnecessary-serialized-td4635792.html
But it looks like since then the asio code
was rewritten (the fixes suggested in the thread also dont work as they dont
impact the calling of the handshake code in OpenSSL).
Is this normal behaviour as this is a huge
hit for the performance of the server (and a waste of resources). How can I get
asio to perform the handshakes in parallel?
Thanks for reading,Gert
all,
I am currently working on a asio-service
server that will be accepting SSL connections. I currently have the service
running on 4 threads and configured OpenSSL to be threadsafe
(CRYPTO_set_id_callback and CRYPTO_set_locking_callback).
The main load on this server is the RSA
encryption/decryption during the SSL handshake. However it looks like this load
is not distributed in parallel over the different threads, the OpenSSL calls
seem to be serialized.
I found this thread about it for an old asio
version:
http://boost.2283326.n4.nabble.com/ASIO-async-SSL-operations-unnecessary-serialized-td4635792.html
But it looks like since then the asio code
was rewritten (the fixes suggested in the thread also dont work as they dont
impact the calling of the handshake code in OpenSSL).
Is this normal behaviour as this is a huge
hit for the performance of the server (and a waste of resources). How can I get
asio to perform the handshakes in parallel?
Thanks for reading,Gert