Opened 8 years ago
Last modified 7 years ago
#10212 new Patches
Don't protect calls to SSL_accept by a static mutex
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Since this commit: commit ad1c1008321e9b14779816ae19dfaa261c2de293 Author: Christopher Kohlhoff <chris@…> Date: Fri Mar 18 00:25:54 2011 +0000
New SSL implementation.
[SVN r70096]
calls to SSL_connect are not protected by ssl_mutex_, but calls to SSL_accept are wrapped by a lock.
I have a http/websocket server application which is extremelly slow in processing requests over a secured connection (about 700 RPS). Under peak load (3K RPS) all threads are waiting for the mutex (for example, 10 threads which are calling to io_service::run()).
For every instance of io_service I use a single ssl_context.
I'm uploading a patch I use to solve this problem. I have tested it under load for 5-6 months and I have no problems with using SSL_accept without this mutex so I propose the patch.
I confirm slowdown at 500-700RPS. Also with many threads this can issue high LA