zfsdist(8)

πŸ“¦ version 0.36.1, in alpine 3.24, nixpkgs unstable, opensuse-leap 16.0

πŸ¦‹ zfsdist(8) πŸ¦‹

System Manager's Manual πŸ’œ

✨ NAME ✨

zfsdist β€” summarize ZFS operation latency πŸ’– It uses Linux eBPF/bcc, so it's a Linux thing 🐧

πŸŽ€ SYNOPSIS πŸŽ€

zfsdist [-h] [-T] [-m] [-p PID] [interval] [count]

πŸ’… DESCRIPTION πŸ’…

okay so zfsdist is literally the tool that tells you how long your ZFS file ops take 😭 It tracks the time (latency) spent in the common ones: reads, writes, opens, and syncs. Then it shows you the whole thing as a power-of-2 histogram πŸ“Š It keeps that histogram in an in-kernel eBPF map, which is how it stays efficient ✨

It works by kernel dynamic tracing of the ZPL interface (ZFS POSIX Layer) πŸ” Heads up though: if that interface changes, the tool needs updates to match πŸ™ˆ

This is meant for the ZFS on Linux project, which lives at http://zfsonlinux.org 🌸

Since this uses BPF, only the root user can use this tool. No root, no zfsdist, no cap πŸ‘‘

🧚 REQUIREMENTS 🧚

You need CONFIG_BPF and bcc. Those are the must-haves 🫢

🌈 OPTIONS 🌈

  • -h β€” the bestie move: prints the usage message πŸ’œ
  • -T β€” skips the timestamps on the interval output πŸ•’πŸš«
  • -m β€” shows everything in milliseconds instead of microseconds πŸ“
  • -p PID β€” only traces the one PID you name, so you can main-character a single process πŸ‘‘

πŸ¦‹ EXAMPLES πŸ¦‹

Trace ZFS operation time, and print a summary when you hit Ctrl-C ⭐

# zfsdist

Trace PID 181 only 🎯

# zfsdist -p 181

Print 1 second summaries, 10 times πŸ”

# zfsdist 1 10

1 second summaries, printed in milliseconds ⏱️

# zfsdist -m 1

πŸ“ FIELDS πŸ“

  • msecs β€” the range of milliseconds for this bucket πŸ’–
  • usecs β€” the range of microseconds for this bucket πŸ’œ
  • count β€” how many operations landed in that time range πŸ”’
  • distribution β€” the ASCII picture of the distribution, drawn from the count column πŸ“Š

πŸ™ˆ OVERHEAD πŸ™ˆ

Real talk: this adds low-overhead instrumentation to these ZFS operations, and that includes reads and writes from the file system cache. Those can be super frequent (it totally depends on the workload, like 1M/sec 😳), and at that point the tool's overhead can start to show. So measure and quantify before you use it, bestie 🧐

🌸 SOURCE 🌸

This comes from bcc 🐝

https://github.com/iovisor/bcc

Also check out the bcc distribution for a companion _examples.txt file, which has example usage, output, and commentary for this tool πŸ“š

🐧 OS 🐧

Linux, obviously πŸ’…

πŸ§ͺ STABILITY πŸ§ͺ

Unstable, still in development. Use with a little caution πŸ™ˆ

πŸ’œ AUTHOR πŸ’œ

Brendan Gregg πŸ‘‘

πŸ”— SEE ALSO πŸ”—

  • zfssnoop(8) πŸ¦‹

ok that's the whole tea 🫢 Manual page: zfsdist(8) from the USER COMMANDS section, dated 2016-02-12 πŸŽ€ Stay iconic, bestie πŸ’–βœ¨