tls/ssl performance regression in 7.3.x
We have a streaming service that makes frequent tls calls to different services. We are finally moving our 2.7 codebase to 3.x, and thus are testing the performance when running under pypy3 rather than pypy2.
We saw a significant regression for this service when we ran it under pypy3-7.3.4, as compared to pypy2-6.0.0. We captured vmprof runs and identified
_PySSL_errno as the culprit. It was introduced in this commit 586f7393d831
Running a simple script that just repeatedly queried a redis server, we saw the following CPU times for the same run across different versions. Our CPU time double when moving from 7.2.0 to 7.3.4 with the introduction of this function.:
There is a regression on the pypy2 side as well. Not as severe, but I have not identified an obvious source:
While these runs are short, we are seeing similar behaviours in our long running processes.