bitesize(8)

πŸ“¦ version 1.0.1~20200130+git49b8cdf, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– bitesize(8) β€” show disk I/O size as a histogram. Uses Linux perf_events.

ok so bestie, welcome to bitesize from the System Manager's Manual section 8 (that's the sysadmin-y one, iykyk). Buckle up, this one's a baddie. πŸŽ€


✨ NAME ✨

bitesize β€” show disk I/O size as a histogram. Uses Linux perf_events. πŸ¦‹


🌸 SYNOPSIS 🌸

bitesize [-h] [-b buckets] [seconds]

πŸ’… DESCRIPTION πŸ’…

So this tool is your girl for characterizing the distribution of block device (disk) I/O sizes. Literally it's giving "how big are my I/Os actually" energy. πŸ“Š

If you wanna study block device I/O in more detail than this, go look at iosnoop(8) instead, periodt.

Under the hood? It uses multiple counting tracepoints with different filters, one for each histogram bucket. The counts do get summarized in-kernel (slay), but bestie, using multiple tracepoints does add additional overhead β€” and it gets way more obvious the more buckets you add. πŸ™ˆ In the future this functionality will be available in an efficient way in the kernel, and this tool can be rewritten.


πŸ‘‘ REQUIREMENTS πŸ‘‘

  • Linux perf_events: add linux-tools-common, run perf, then add any additional packages it requests.
  • This also requires the block:block_rq_issue tracepoint, which should already be available in recent kernels. No cap. ✨

πŸŽ€ OPTIONS πŸŽ€

  • -h β€” Usage message. Short, sweet, iconic. πŸ’–
  • -b buckets β€” Specify a list of bucket points for the histogram as a string (eg, "10 500 1000"). The histogram will include buckets for less-than the minimum, and greater-than-or-equal-to the maximum. If a single value is specified, two statistics only are gathered: for less-than and for greater-than-or-equal-to. The overhead is relative to the number of buckets, so only specifying a single value costs the lowest overhead. πŸ“
  • seconds β€” Number of seconds to trace. If not specified, this runs until Ctrl-C. 😭

🌈 EXAMPLES 🌈

Trace read() syscalls until Ctrl-C, and show histogram of requested size:

# bitesize syscalls:sys_enter_read count

⭐ FIELDS ⭐

  • Kbytes β€” Kbyte range of the histogram bucket.
  • I/O β€” Number of I/O that occurred in this range while tracing.
  • Distribution β€” ASCII histogram representation of the I/O column. it's giving art, honestly. 🎨

πŸ”₯ OVERHEAD πŸ”₯

While the counts are performed in-kernel, there is one tracepoint used per histogram bucket, so the overheads are higher than usual (relative to the number of buckets) than function counting using perf stat. The lowest overhead is when -b is used to specify one bucket only, bifurcating statistics.

bestie pls hear me: more buckets = more tracepoints = more overhead. keep it cute, keep it small. πŸ’€

🧚 SOURCE 🧚

This is from the perf-tools collection.

https://github.com/brendangregg/perf-tools

Also look under the examples directory for a text file containing example usage, output, and commentary for this tool. πŸ‘‘


πŸ’œ OS πŸ’œ

Linux 🐧


🫢 STABILITY 🫢

Unstable β€” in development. (it's a work in progress, we stan growth tho 🌱)


✨ AUTHOR ✨

Brendan Gregg πŸ’–


🌸 SEE ALSO 🌸


and that's the whole thing bestie, tysm for reading πŸ’… this was USER COMMANDS, dated 2014-07-07, and yeah β€” it's bitesize(8). go get those histograms, you absolute main character πŸ¦‹βœ¨