BoringSSL CPU Usage

296 views
Skip to first unread message

Yufeng Duan

unread,
Dec 15, 2016, 9:14:39 AM12/15/16
to QUIC Prototype Protocol Discussion group
Hello,

I have been just use profile tool to analyze the QUIC toy server. I found that the BoringSSL library functions take almost all of the CPU. Is this normal or is there a way to improve the efficiency of BoringSSL in QUIC?

Thank you

Ian Swett

unread,
Dec 15, 2016, 10:43:42 AM12/15/16
to proto...@chromium.org
Thanks for diving in and profiling.  BoringSSL does consume a large portion of the time, though I wouldn't expect it to be the majority, closer to 10%.  Are you on Intel?  If so, both ChaCha20 and AES-GCM should have fairly well tuned assembly for Intel, assuming it's compiling correctly for your platform. 

--
You received this message because you are subscribed to the Google Groups "QUIC Prototype Protocol Discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proto-quic+unsubscribe@chromium.org.
To post to this group, send email to proto...@chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Yufeng Duan

unread,
Dec 15, 2016, 11:07:17 AM12/15/16
to QUIC Prototype Protocol Discussion group
Hi Ian,

Thanks for your reply. Actually in my test, it takes more than 50% of the cpu cycles. Specifically, the function bn_sqr8x_internal contribute 45% of the cycles and mul4x_internal 16%. I have a Intel(R) Xeon(R) and used the AES for the encryption and decryption. Do you think there is something wrong that has caused such a high cpu occupation?

Thank you


On Thursday, December 15, 2016 at 4:43:42 PM UTC+1, Ian Swett wrote:
Thanks for diving in and profiling.  BoringSSL does consume a large portion of the time, though I wouldn't expect it to be the majority, closer to 10%.  Are you on Intel?  If so, both ChaCha20 and AES-GCM should have fairly well tuned assembly for Intel, assuming it's compiling correctly for your platform. 
On Thu, Dec 15, 2016 at 9:14 AM, Yufeng Duan <dyfp...@gmail.com> wrote:
Hello,

I have been just use profile tool to analyze the QUIC toy server. I found that the BoringSSL library functions take almost all of the CPU. Is this normal or is there a way to improve the efficiency of BoringSSL in QUIC?

Thank you

--
You received this message because you are subscribed to the Google Groups "QUIC Prototype Protocol Discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proto-quic+...@chromium.org.

Ian Swett

unread,
Dec 15, 2016, 1:18:53 PM12/15/16
to proto...@chromium.org
Those are used in handshakes, so it sounds like you're doing a large number of handshakes relative to the amount of data you're delivering?  ie: Simple one packet request responses with no connection re-use?  if so, then I think 50% crypto CPU is plausible.

To unsubscribe from this group and stop receiving emails from it, send an email to proto-quic+unsubscribe@chromium.org.
Reply all
Reply to author
Forward
0 new messages