Boost logo

Boost :

Subject: [boost] [ASIO] async SSL operations unnecessary serialized?
From: Micha³ Madziar (michoo_at_[hidden])
Date: 2012-09-14 17:06:43


Hello all.
It looks like all openssl_operation handlers are synchronized on
io_service allowing only one connection to be processed at the a time.
As I understand this orginated from the time when libopenSSL didn't
support multi-threaded applications, but it slows down everything a lot.

Adding locking function, and getting rid of strand_->wrap in lines 320,
385 in file boost/asio/ssl/detail/openssl_operation.hpp allows SSL
connections to be used in multiple threads simultaneously solving the
problem. Or do I miss something?

I've attached simple line-based echo server which demonstrates the problem:
openssl s_client -connect localhost:10001 #x 2
telnet localhost 10000 #x 2
After sending something in each connection TCP and one SSL work in
parallel, second SSL waits with receiving until first one finishes it's
write. After patching all connections work in parallel.

-- 
Pozdrawiam
Micha³ 'michoo' Madziar







Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk