biolatency(8)
β¨ biolatency(8) Β· System Manager's Manual β¨
biolatency is the manual page for biolatency, which summarizes block device I/O latency as a histogram π
π NAME π
biolatency - Summarize block device I/O latency as a histogram. π
π SYNOPSIS π
biolatency [-h] [-F] [-T] [-Q] [-m] [-D] [-F] [-e] [-j] [-d DISK]
[interval [count]]
π¦ DESCRIPTION π¦
okay so biolatency traces block device I/O (aka disk I/O) and records how the latency (time) is spread out across all those operations π The result gets printed as a histogram either when you hit Ctrl-C or after every interval you set, in seconds β±οΈ
The latency of disk I/O is measured from the moment requests get issued to the device, all the way up to completion. If you want the time spent queued in the kernel counted too, that's what the -Q option is for π«Ά
This tool keeps its timestamps and histogram in in-kernel eBPF maps, which is why it's so efficient π§
It works by tracing a bunch of kernel blk_*() functions using dynamic tracing. Heads up, though: if those functions ever change, the tool will need updating to match π
Since this uses BPF, only the root user can use this tool. No exceptions, bestie π
πΈ REQUIREMENTS πΈ
CONFIG_BPF and bcc are needed π
β¨ OPTIONS β¨
-hβ Pulls up the usage message π-Tβ Adds timestamps to the output β°-mβ Shows the histogram in milliseconds instead π-Dβ Prints a separate histogram for each disk device π-Fβ Prints a separate histogram for each set of I/O flags π³οΈβπ-jβ Prints the histogram as a dictionary π§-eβ Shows an extension summary with the total and the average π₯-d DISKβ Only traces this one disk π―- interval β How often to output, in seconds β±οΈ
- count β How many outputs you want π’
π EXAMPLES π
Summarize block device I/O latency as a histogram:
# biolatency
Print 1 second summaries, 10 times:
# biolatency 1 10
Print 1 second summaries, using milliseconds as units for the histogram, and include timestamps on output:
# biolatency -mT 1
Include OS queued time in I/O time:
# biolatency -Q
Show a latency histogram for each disk device separately:
# biolatency -D
Show a latency histogram in a dictionary format:
# biolatency -j
Also show extension summary (total, average):
# biolatency -e
π FIELDS π
usecsβ The microsecond range πmsecsβ The millisecond range πcountβ How many I/O fell into this range π’distributionβ An ASCII bar chart that visualizes the distribution, based on the count column π
π§ OVERHEAD π§
This tool traces kernel functions and keeps in-kernel timestamps and a histogram. Those get asynchronously copied over to user-space. It's super efficient, and for most storage I/O rates (under 10k IOPS) the overhead should be negligible π· If you're in a higher IOPS storage environment, test and quantify the overhead before you use it, ngl π
π« SOURCE π«
This is from bcc π«§
https://github.com/iovisor/bcc
Also look in the bcc distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool π
π₯οΈ OS π₯οΈ
Linux π§
π§ STABILITY π§
Unstable - in development. Still cooking π³
π AUTHOR π
Brendan Gregg, Rocky Xing π«Ά
π¦ SEE ALSO π¦
biosnoop(8) π
Bestie, that's the whole page π It's the USER COMMANDS manual, dated 2020-12-30, and it's biolatency(8) forever β¨π«Άπ
π¦ where this page comes from
- alpine 3.24: bcc-doc 0.36.1-r1 Β· Apache-2.0
- nixpkgs unstable: bcc 0.37.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms