1biostacks(8) System Manager's Manual biostacks(8)
2
3
4
6 biostacks - Show disk I/O latency with initialization stacks. Uses bpf‐
7 trace/eBPF.
8
10 biostacks
11
13 This tool shows disk I/O latency histograms for each block I/O initial‐
14 ization path. This can help reveal the reason for different latencies,
15 as some may be created by log flushing, others by application reads,
16 etc.
17
18 This works by tracing the blk_account_io_start() and the blk_start_re‐
19 quest() or blk_mq_start_request() functions using dynamic instrumenta‐
20 tion. Linux 5.0 removed the classic I/O scheduler, so the
21 blk_start_request() probe can be removed from the tool (just delete
22 it). This tool may need other maintenance to keep working if these
23 functions change in later kernels.
24
25 Since this uses BPF, only the root user can use this tool.
26
28 CONFIG_BPF and bpftrace.
29
31 Trace disk I/O latency with initialization stacks:
32 # biostacks.bt
33
35 0th An initialization kernel stack trace (shown in "@[...]") is
36 printed before each I/O histogram.
37
38 1st, 2nd
39 This is a range of I/O latency, in microseconds (shown in
40 "[...)" set notation).
41
42 3rd A column showing the count of I/O in this range.
43
44 4th This is an ASCII histogram representing the count column.
45
47 The rate of biostacks should be low (bounded by device IOPS), such that
48 the overhead of this tool is expected to be negligible.
49
51 This tool originated from the book "BPF Performance Tools", published
52 by Addison Wesley (2019):
53
54 http://www.brendangregg.com/bpf-performance-tools-book.html
55
56 See the book for more documentation on this tool.
57
58 This version is in the bpftrace repository:
59
60 https://github.com/iovisor/bpftrace
61
62 Also look in the bpftrace distribution for a companion _examples.txt
63 file containing example usage, output, and commentary for this tool.
64
66 Linux
67
69 Unstable - in development.
70
72 Brendan Gregg
73
75 biosnoop(8)
76
77
78
79USER COMMANDS 2019-07-12 biostacks(8)