ssllatency.bt(8)

πŸ“¦ version 0.17.0, in debian bookworm

✨ ssllatency.bt(8) ✨

okay bestie, we're doing a manual page from the System Manager's Manual and honestly? it's giving performance-analysis main character energy πŸŽ€


πŸ’– NAME πŸ’–

ssllatency.bt β€” shows you an SSL/TLS handshake latency histogram. It uses bpftrace/eBPF, no cap.


🌸 SYNOPSIS 🌸

ssllatency.bt

πŸ¦‹ DESCRIPTION πŸ¦‹

ssllatency literally shows the latency distribution for OpenSSL handshake functions. Obsessed. It's lowkey perfect for performance analysis when you're messing with different crypto cipher suites, or doing async SSL acceleration via CPU or an offload device, etc.

The way this tool works is it dynamically traces the uprobes in OpenSSL and related crypto libs. Heads up though: it may need updating to match future changes to these functions. iykyk 😭

And since this uses BPF, only the root user can use this tool. Periodt.


πŸŽ€ REQUIREMENTS πŸŽ€

  • CONFIG_BPF
  • bpftrace

🌈 EXAMPLES 🌈

Trace SSL/TLS handshake latency, and print a histogram on Ctrl-C:

# ssllatency.bt

πŸ‘‘ FIELDS πŸ‘‘

  • 0th β€” a function name is shown in "@hist[...]", followed by the latency histogram, and "@stat[...]", followed by total call count, average, total latency in microseconds. Non-zero failed calls are traced separately (in "@histF[]" and "@statF[]") for some functions.
  • 1st, 2nd β€” this is a range of latency, in microseconds (shown in "[...)" set notation).
  • 3rd β€” a column showing the count of operations in this range.
  • 4th β€” this is an ASCII histogram representing the count column.

πŸ”₯ OVERHEAD πŸ”₯

SSL/TLS handshake usually contains network latency, and the traced crypto functions are CPU intensive tasks, so call frequency should be low and the overhead of this tool is expected to be negligible. slay πŸ’…


πŸ’œ SOURCE πŸ’œ

This is from bpftrace.

https://github.com/iovisor/bpftrace

Also look in the bpftrace distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool. 🫢

There's a bcc tool sslsniff that can show SSL/TLS handshake event latency before sniffing the plaintext in SSL_read/write. This tool provides more detailed crypto latency distribution during the handshake event. πŸ’–

https://github.com/iovisor/bcc

🧚 OS 🧚

Linux


⭐ STABILITY ⭐

Unstable β€” in development. (it's a work in progress bestie, we love a growth arc 🌱)


🌸 AUTHOR 🌸

Tao Xu


πŸ’« SEE ALSO πŸ’«

sslsnoop.bt(8)


and that's the whole page, bestie!! this one came out of USER COMMANDS on 2021-12-28 and we're just out here stanning a latency histogram. go run it (as root!!) and hydrate while you wait for that Ctrl-C. mwah πŸ’‹πŸ¦‹

πŸ“¦ where this page comes from