biolatency(8)

πŸ“¦ version 0.36.1, in alpine 3.24, nixpkgs unstable, opensuse-leap 16.0

✨ 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 ✨🫢πŸ’