biolatency.bt(8)
π biolatency.bt β bestie's guide to block I/O latency (manual page 8) π
okay so listen. this is the manual for biolatency.bt, and it's living in the System Manager's Manual, section 8 (that's the admin/commands girlies). come sit with me, we're gonna read this together and you're gonna get it. π«Ά
β¨ NAME β¨
biolatency.bt β block I/O latency as a histogram. and it uses bpftrace/eBPF, obviously. π
πΈ SYNOPSIS πΈ
biolatency.bt
that's it. no args. no flags. she simply is. minimal queen behavior. π
π« DESCRIPTION π«
so what this cutie does: she summarizes the time (latency) spent in block device I/O (that's disk I/O, bestie) and she hands it back to you as a power-of-2 histogram. why does that matter? because it lets you actually study the distribution β the modes, the outliers, all of it. the whole vibe check. π₯
here's the tea tho: there are often two modes. one for device cache hits and one for cache misses. and this tool will show you both, which is lowkey iconic. latency outliers show up too, so nothing is hiding from you. π
quick honest moment: this tool currently works by dynamic tracing of the blk_account*() kernel functions. that means if future kernel versions change those functions, this needs updating to match. so it's giving "in a relationship with kernel internals" energy. π
and the big one β since this uses BPF, only the root user can use this tool. no exceptions, no cap. π
π REQUIREMENTS π
CONFIG_BPFbpftrace
both. you need both. periodt.
π¦ EXAMPLES π¦
want to trace block device I/O (disk I/O, same thing bestie) and print a latency histogram on Ctrl-C? say less:
# biolatency.bt
that's the whole thing. hit it, let it vibe, then Ctrl-C and read your histogram. β¨
π FIELDS π
here's how to read the output columns, so you don't just stare at numbers like ποΈπποΈ
- 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. (the little bars. the aesthetic. we love her.)
β OVERHEAD β
good news: block device I/O usually has a relatively low frequency (that's < 10,000/s), so the overhead for this tool is expected to be negligible. slay. π«Ά
but for high IOPS storage systems? bestie, test and quantify before use. don't just rawdog it in prod. π
π SOURCE π
this is from bpftrace.
https://github.com/iovisor/bpftrace
also β look in the bpftrace distribution for a companion _examples.txt file. it's got example usage, output, and commentary for this tool. like bonus content. director's cut. π¬
oh and! this is a bpftrace version of the bcc tool of the same name. the bcc tool may provide more options and customizations, so if you want the deluxe edition:
https://github.com/iovisor/bcc
π§ OS π§
Linux. that's the one. that's the girl. π§
π STABILITY π
Unstable - in development.
so like, she's growing. she's evolving. be nice to her and don't build your whole production empire on her without knowing that. π
π AUTHOR π
Brendan Gregg
(the blueprint. the original. we stan.) π
πΈ SEE ALSO πΈ
and that's the whole page, bestie!! you ate this. now go trace something. π¦
this lil manual was brought to you by the USER COMMANDS section, dated 2018-09-13, and she lives at biolatency.bt(8). mwah. π
π¦ where this page comes from
- debian bookworm: bpftrace 0.17.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms