bitesize.bt(8)

πŸ“¦ version 0.17.0, in debian bookworm

πŸ’… bitesize.bt β€” the disk I/O size histogram bestie

okay so this is bitesize.bt, a little tool from the System Manager's Manual (section 8, we love a sysadmin moment), and it shows your disk I/O sizes as a histogram. yes. a whole vibe chart for your block device. uses bpftrace/eBPF, obviously. πŸ¦‹


✨ NAME ✨

bitesize.bt β€” show disk I/O size as a histogram. uses bpftrace/eBPF. no cap.


🌸 SYNOPSIS 🌸

bitesize.bt

that's it. that's the whole thing. no flags, no args, just run it and let it cook. πŸ’…


πŸ’– DESCRIPTION πŸ’–

so like, you can use this to characterize the distribution of block device (disk) I/O sizes. if you wanna study block device I/O in more detail (main character behaviour), go look at biosnoop.bt(8) instead, she's right there in SEE ALSO. πŸŽ€

this tool uses the tracepoint:block:block_rq_issue tracepoint, and honestly it's just a simple little example of bpftrace. a starter pack, if you will. ✨

since this uses BPF, only the root user can use this tool. periodt. root or nothing, bestie. πŸ‘‘

🧚 REQUIREMENTS 🧚

  • CONFIG_BPF
  • bpftrace

you need both. no skipping. πŸ™ˆ


πŸ”₯ EXAMPLES πŸ”₯

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

# bitesize.bt

one line. iconic. 🌈


πŸŽ€ FIELDS πŸŽ€

okay so the output has columns and here's what each one is giving:

  • 0th β€” a process name (shown in "@[...]") is printed before each I/O histogram. so you know who is being noisy. πŸ’…
  • 1st, 2nd β€” this is a range of I/O sizes, in Kbytes (shown in "[...)" set notation). maths notation but make it cute.
  • 3rd β€” a column showing the count of I/O in this range. how many times did this size show up. πŸ”’
  • 4th β€” this is an ASCII histogram representing the count column. bars!! in your terminal!! πŸ“

πŸ’œ OVERHEAD πŸ’œ

since block device I/O usually has a relatively low frequency (< 10,000/s), the overhead for this tool is expected to be low or negligible. we're chillin. 😌

but fr fr, for high IOPS storage systems, test and quantify before use. don't just yolo it on prod, bestie. πŸ’€

⭐ SOURCE ⭐

this is from bpftrace.

https://github.com/iovisor/bpftrace

also, look in the bpftrace distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool. it's like the director's commentary track but for a script. 🎬

this is a bpftrace version of the bcc tool of the same name. twin sisters, different ecosystems. 🫢

https://github.com/iovisor/bcc

🌸 OS 🌸

Linux. as always. 🐧


πŸ’… STABILITY πŸ’…

Unstable - in development.

she's still growing, okay?? give her time. it's giving wip. πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Brendan Gregg

the legend herself/himself. we stan. πŸ™Œ


🌈 SEE ALSO 🌈

go read that one next, bestie, iykyk. πŸ’–


and that's the whole page!! this was the USER COMMANDS manual, dated 2018-09-07, and it's literally called bitesize.bt(8) β€” remember the name, she's iconic. mwah, bye!! πŸ’‹βœ¨

πŸ“¦ where this page comes from