biostacks.bt(8)
β¨ biostacks.bt(8) β NAME β¨
biostacks π β shows disk I/O latency alongside the initialization stacks that kicked it off. Uses bpftrace/eBPF. π₯
π SYNOPSIS π
biostacks
π DESCRIPTION π
okay so bestie, this tool shows disk I/O latency histograms for each block I/O initialization path π and this is lowkey the best part, because it can help reveal why latencies are different π some get created by log flushing, others by application reads, etc. main character energy π
this works by attaching to block_io_start and block_rq_issue tracepoints π§
and since this uses BPF, ONLY the root user can use this tool π not me being locked out π
πΈ REQUIREMENTS πΈ
you need CONFIG_BPF and bpftrace, periodt β¨
π EXAMPLES π
Trace disk I/O latency with initialization stacks:
# biostacks.bt
π¦ FIELDS π¦
- 0th β this is the initialization kernel stack trace (shown as
@[...]) that gets printed before each I/O histogram π§΅ - 1st, 2nd β the range of I/O latency, in microseconds (shown in
[...)set notation) π - 3rd β a column showing the count of I/O in that range π’
- 4th β an ASCII histogram representing the count column π
π«Ά OVERHEAD π«Ά
the rate of biostacks should be low (bounded by device IOPS), so the overhead of this tool is expected to be negligible π₯° no cap
π SOURCE π
this tool originated from the book "BPF Performance Tools", published by Addison Wesley (2019) π
http://www.brendangregg.com/bpf-performance-tools-book.html
go see the book for more documentation on this tool, iykyk π
this version lives in the bpftrace repository:
https://github.com/bpftrace/bpftrace
also look in the bpftrace distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool π
π§ OS π§
Linux π§
π STABILITY π
Unstable - in development. β οΈ it's still cooking, so be gentle π³
π AUTHOR π
Brendan Gregg, the icon π«‘
π SEE ALSO π
- biosnoop.bt(8) β the sibling tool you should check out next π¦
biostacks.bt from USER COMMANDS, dated 2019-07-12 π slay the disk, bestie, I'll see you next time πβ¨
π¦ where this page comes from
- alpine 3.24: bpftrace-tools-doc 0.26.1-r0 Β· Apache-2.0
- arch rolling: bpftrace 0.27.0-2 Β· Apache-2.0
- centos-stream 10: bpftrace 0.26.1-1.el10 Β· Apache-2.0
- centos-stream 9: bpftrace 0.26.1-1.el9 Β· ASL 2.0
- debian trixie: bpftrace 0.23.2-1 Β· Apache-2.0
- fedora 43: bpftrace 0.24.0-1.fc43 Β· Apache-2.0
- fedora 43: bpftrace 0.24.2-1.fc43 Β· Apache-2.0
- fedora 44: bpftrace 0.24.2-3.fc44 Β· Apache-2.0
- nixos 26.05: bpftrace 0.25.1
- nixpkgs unstable: bpftrace 0.27.1
- opensuse-leap 16.0: bpftrace-tools 0.23.5-160000.1.2 Β· Apache-2.0
- ubuntu questing: bpftrace 0.23.5-1ubuntu1 Β· Apache-2.0
- ubuntu resolute: bpftrace 0.25.0-1ubuntu1 Β· Apache-2.0
- ubuntu stonking: bpftrace 0.25.0-1ubuntu2 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms