ssllatency.bt(8)

πŸ“¦
version 0.27.0 Β· 2 versions
  • 0.27.0 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.20.2 Β· ubuntu noble
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ssllatency.bt(8) πŸ’–

okay so this is the System Manager's Manual page for ssllatency.bt, and it's giving main character energy πŸ¦‹βœ¨

🌸 NAME 🌸

ssllatency.bt is a bpftrace/eBPF tool that shows a histogram of SSL/TLS handshake latency πŸ“ŠπŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

ssllatency.bt

✨ DESCRIPTION ✨

okay so ssllatency shows you the latency distribution for OpenSSL handshake functions πŸ₯Ί this is lowkey so useful for performance analysis when you're comparing different crypto cipher suites, or async SSL acceleration by CPU or offload device, etc πŸ’œ

it works by dynamically tracing the uprobes in OpenSSL and related crypto libs πŸ” but heads up, it might need updating to keep up with future changes to those functions πŸ™ˆ

Root only! Since this uses BPF, only the root user can run this tool πŸ”

🧚 REQUIREMENTS 🧚

you'll need CONFIG_BPF and bpftrace πŸ› οΈ

πŸ“ EXAMPLES πŸ“

trace SSL/TLS handshake latency, and print a histogram when you hit Ctrl-C 🎯

# ssllatency.bt

πŸ“Š FIELDS πŸ“Š

okay so here's how to read the output, bestie 🫢

  • 0th β€” a function name shows up in @hist[...] followed by its latency histogram, and then @stat[...] followed by the total call count, the average, and the total latency in microseconds πŸ“ˆ non-zero failed calls get 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 that range πŸ”’
  • 4th β€” an ASCII histogram representing the count column 🎨

πŸ¦‹ OVERHEAD πŸ¦‹

ngl the overhead is basically nothing πŸ’… SSL/TLS handshakes already include network latency, and the crypto functions being traced are CPU intensive, so the call frequency should be low and the overhead of this tool is expected to be negligible ✨

🌈 SOURCE 🌈

this comes from bpftrace 🫧

https://github.com/bpftrace/bpftrace

also check out the bpftrace distribution for a companion _examples.txt file πŸ“š it has example usage, output, and commentary for this tool πŸ’–

there's also a bcc tool called sslsniff that can show SSL/TLS handshake event latency before sniffing the plaintext in SSL_read/write πŸ‘€ this tool gives you more detailed crypto latency distribution during the handshake event πŸ”₯

https://github.com/iovisor/bcc

🐧 OS 🐧

Linux only, bestie 🐧

🚧 STABILITY 🚧

this is Unstable β€” still in development πŸ› οΈπŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

written by Tao Xu πŸ’œ

πŸ”— SEE ALSO πŸ”—

sslsnoop.bt(8) 🫢


and that's the whole page πŸ’… the footer says it's from the USER COMMANDS section, dated 2021-12-28 πŸ“… stay iconic, bestie βœ¨πŸ¦‹