bitesize(8)
π 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, runperf, then add any additional packages it requests. - This also requires the
block:block_rq_issuetracepoint, which should already be available in recent kernels. No cap. β¨
π OPTIONS π
-hβ Usage message. Short, sweet, iconic. π-bbuckets β 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 π¦β¨
π¦ where this page comes from
- debian bookworm: perf-tools-unstable 1.0.1~20200130+git49b8cdf-1 Β· GPL-2.0-or-later
- debian trixie: perf-tools-unstable 1.0.1~20200130+git49b8cdf-1 Β· GPL-2.0-or-later
- ubuntu jammy: perf-tools-unstable 1.0.1~20200130+git49b8cdf-1ubuntu1 Β· GPL-2.0-or-later
- ubuntu noble: perf-tools-unstable 1.0.1~20200130+git49b8cdf-1ubuntu1 Β· GPL-2.0-or-later
- ubuntu resolute: perf-tools-unstable 1.0.1~20200130+git49b8cdf-1ubuntu2 Β· GPL-2.0-or-later
- ubuntu stonking: perf-tools-unstable 1.0.1~20200130+git49b8cdf-1ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms