Unexpectedly high CPU usage
zhngs opened this issue · 2 comments
zhngs commented
paulej commented
There are a few areas where this can be expensive:
- Encryption (AES -- and I see that here)
- Authentication (SHA-1 is clearly consuming time here)
- Looking up SSRCs if you have a really large list of SSRCs
Perhaps (3) has already been addressed; I cannot remember, but it used to be a problem. Regardless, it's good to always remove unused SSRC and not let those pile up. (That is, delete unused / old streams.)
(1) is just the cost of encryption, but if you linked with OpenSSL, it will offload that work onto the CPU (assuming it has AES support).
(2) is also just the cost of authentication, and even OpenSSL cannot offload that to the CPU. However, if you use GCM for authentication, rather than SHA-1, you will see that it requires less CPU processing.
zhngs commented
Thanks for the answer, it is very helpful!