nfsdist(8)

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

πŸ’– nfsdist(8) πŸ’–

System Manager's Manual ✨ okay so this is the page for nfsdist, a tool that tells you how long NFS file operations take 🧚

✨ NAME ✨

nfsdist is the tool, and it's here to summarize NFS operation latency πŸ’… It runs on Linux and uses eBPF/bcc πŸ”₯

✨ SYNOPSIS ✨

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

πŸŽ€ DESCRIPTION πŸŽ€

okay so bestie, nfsdist measures how much time gets eaten up by the common NFS file operations: reads, writes, opens, and getattrs πŸ¦‹ It shows all of that as a power-of-2 histogram, and it keeps the histogram in an in-kernel eBPF map so it doesn't wreck your performance πŸ’œ

It works by tracing the nfs_file_operations interface functions, so if those functions ever change, this tool will need an update too πŸ™ˆ

⚠️ Only the root user can run this, because it uses BPF. Not me trying to sneak in as a regular user πŸ’€

🌸 REQUIREMENTS 🌸

You need CONFIG_BPF and bcc πŸ“

🫢 OPTIONS 🫢

  • -h β€” pulls up the usage message 🌈
  • -T β€” skips the timestamps on the interval output ⭐
  • -m β€” shows the output in milliseconds instead of microseconds πŸŽ€
  • -p PID β€” only traces the process with this PID, so it's giving focus πŸ‘‘

πŸ’… EXAMPLES πŸ’…

Trace NFS operation time, and print a summary when you hit Ctrl-C:

# nfsdist

Trace PID 181 only:

# nfsdist -p 181

Print 1 second summaries, 10 times:

# nfsdist 1 10

1 second summaries, printed in milliseconds:

# nfsdist -m 1

πŸ¦‹ FIELDS πŸ¦‹

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

😭 OVERHEAD 😭

nfsdist adds low-overhead instrumentation to these NFS operations, and that includes reads and writes coming from the file system cache. Those reads and writes can be super frequent depending on the workload, like 1M/sec, and at that point the tool's overhead can start to show up πŸ₯Ί Measure and quantify before you use it, bestie 🧐

🧚 SOURCE 🧚

This comes from bcc πŸ’œ

https://github.com/iovisor/bcc

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

🌈 OS 🌈

Linux 🐧

πŸ™ˆ STABILITY πŸ™ˆ

Unstable, since it's still in development 🚧

πŸ‘‘ AUTHOR πŸ‘‘

Samuel Nair 🫢

✨ SEE ALSO ✨

nfsslower(8) is the one to check out next πŸ”₯


That's the whole page, babe! 🌈 Pulled from the USER COMMANDS section, dated 2017-09-08, and it's giving nfsdist(8) all the way πŸ’–βœ¨