bitesize(8)

πŸ“¦
version 0.36.1 Β· 2 versions
, in centos-stream 10, centos-stream 9

πŸ’… bitesize(8) β€” System Manager's Manual πŸŽ€

Okay bestie, so this one's from the System Manager's Manual section and it's genuinely iconic β€” introducing bitesize ✨


🌸 NAME 🌸

bitesize β€” summarize block device I/O size as a histogram, Linux eBPF/bcc style. That's the whole vibe fr fr πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

bitesize

That's it. No flags, no args, no drama. Just run it, periodt πŸ‘‘


✨ DESCRIPTION ✨

Okay so what this does: it shows you the I/O distribution for requested block sizes, broken down by process name. So like, you get to see which of your little processes are asking for what sizes of I/O 🫢

How's it work under the hood? It traces block:block_rq_issue and prints out a histogram of I/O size. Lowkey elegant, highkey useful πŸ’…

Heads up bestie β€” since this uses BPF, only the root user can use this tool. No root, no histogram, no exceptions 🚫

🧚 REQUIREMENTS 🧚

  • CONFIG_BPF
  • bcc

Both. You need both. Don't skimp πŸ’œ


πŸ“ EXAMPLES πŸ“

Count I/O size per process until you hit Ctrl+C β€” that's the dream scenario:

# bitesize

🌈 FIELDS 🌈

  • Kbtes β€” size in kilobytes of range (yes, it's spelled Kbtes, that's canon, don't @ me 😭)
  • count β€” how many I/O fell into this range
  • distribution β€” an ASCII bar chart to visualize the distribution (the count column, but make it visual πŸ“Š)

πŸ”₯ OVERHEAD πŸ”₯

So here's the tea: this traces a block I/O tracepoint to update a histogram, which gets asynchronously copied to user-space. That method? Extremely efficient. The overhead for most storage I/O rates β€” and we're talking < 10k IOPS here β€” should be negligible, ngl, basically nothing πŸ¦‹

But if you're living that high-IOPS storage life? Test and quantify the overhead before use. Don't just yolo it into prod, bestie πŸ’€

πŸ‘‘ SOURCE πŸ‘‘

This is from bcc, the icon itself:

https://github.com/iovisor/bcc

Also like, peek inside the bcc distribution for a companion _examples.txt file β€” it's got example usage, output, and commentary for this tool. Free lore drop πŸ™ˆ


⭐ OS ⭐

Linux. Obviously. 🐧


πŸ’€ STABILITY πŸ’€

Unstable - in development. It's giving main character in progress, okay? Be nice to it πŸŽ€


🫢 AUTHOR 🫢

Allan McAleavy β€” shoutout, absolute legend 🌟


🧚 SEE ALSO 🧚

https://github.com/brendangregg/systemtap-lwtools/blob/master/disk/bitesize-nd.stp

And that's a wrap! ✨ This page lived under USER COMMANDS, dated 2016-02-05, filed as bitesize(8) β€” go forth and histogram, bestie πŸ’–πŸ’…πŸŽ€

πŸ“¦ where this page comes from