bn_sqr8x_internal function consumes a lot of CPU time
I do not know if it is legitimate to ask this question here, but maybe
you guys can help.
We have a service running behind nginx that using HTTPS. Recently the
CPU utilization has raised to 100%, and using perf we see that nginx's
using ~69% of CPU time. Inside nginx, bn_sqr8x_internal uses 32% of
total CPU time (and mul4x_internal uses 11%).
All information I could find about bn_sqr8x_internal is that it belongs
to bignum library in libcrypto(?). There is an idea here, that tells
that they belong to handshake step, but it's BoringSSL, so I'm not sure
if it's my case.
Could anyone please tell me what is nginx/libcrypto/libssl doing with
this function, so I can find a clue to optimize the server?