bitesize.bt(8)

πŸ“¦
version 0.27.0 Β· 3 versions
  • 0.27.0 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.14.0 Β· ubuntu jammy
  • 0.20.2 Β· ubuntu noble
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ bitesize.bt(8) πŸŽ€

Okay bestie, this is the System Manager's Manual entry for bitesize.bt, so let's get into it ✨

πŸ’– NAME πŸ’–

bitesize.bt is a tool that shows your disk I/O sizes as a histogram. It's powered by bpftrace and eBPF πŸ¦‹

🌸 SYNOPSIS 🌸

bitesize.bt

πŸ”₯ DESCRIPTION πŸ”₯

okay so this one is for figuring out the distribution of block device (disk) I/O sizes. Like, what sizes are actually getting hit, and how often πŸ“Š If you want to go deeper into block device I/O, check out biosnoop.bt(8) πŸ‘€

It's built on the tracepoint:block:block_rq_issue tracepoint, and it's honestly a simple example of bpftrace, so it's a great one to learn from 🧚

Also, this uses BPF, so only the root user can run it. no cap πŸ™ˆ

πŸŽ€ REQUIREMENTS πŸŽ€

You'll need CONFIG_BPF and bpftrace. That's the whole list, bestie πŸ’…

πŸ“ EXAMPLES πŸ“

To trace block I/O and summarize it as a histogram by process:

# bitesize.bt

πŸ¦‹ FIELDS πŸ¦‹

  • 0th πŸ’œ β€” A process name (shown as @[...]) gets printed before each I/O histogram.
  • 1st, 2nd πŸ’œ β€” This is the range of I/O sizes, in Kbytes (shown in set notation as [...)).
  • 3rd πŸ’œ β€” A column with the count of I/O in that range.
  • 4th πŸ’œ β€” An ASCII histogram that represents the count column. it's giving visual πŸ“ˆ

⭐ OVERHEAD ⭐

Block device I/O is usually pretty low frequency (< 10,000/s), so the overhead for this tool is expected to be low or negligible ✨

For high IOPS storage systems, test and quantify before use. Don't just yolo it on a busy server πŸ’€

🌈 SOURCE 🌈

This one comes from bpftrace πŸ’–

https://github.com/bpftrace/bpftrace

Also, look in the bpftrace distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool, and it's lowkey the best way to learn it πŸ“š

This is a bpftrace version of the bcc tool of the same name:

https://github.com/iovisor/bcc

🧚 OS 🧚

Linux, obviously 🐧

🫧 STABILITY 🫧

Unstable - in development. So it might change on you, bestie πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

Brendan Gregg, the legend himself πŸ”₯

πŸ”— SEE ALSO πŸ”—


✨ Manual page for bitesize.bt, from the USER COMMANDS section, dated 2018-09-07, and the bitesize.bt(8) entry πŸ’… Stay iconic, bestie 🫢