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: Sergei Nikishin <nordsturm@…> 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.

Attachments (1)

ssl_accept_patch (2.2 KB ) - added by Sergei Nikishin <nordsturm@…> 8 years ago.

Download all attachments as: .zip

Change History (2)

by Sergei Nikishin <nordsturm@…>, 8 years ago

Attachment: ssl_accept_patch added

comment:1 by anonymous, 7 years ago

I confirm slowdown at 500-700RPS. Also with many threads this can issue high LA

Note: See TracTickets for help on using tickets.