runqlen.bt(8)

πŸ“¦
version 0.27.0 Β· 3 versions
  • 0.27.0 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.14.0 Β· ubuntu jammy
  • 0.20.2 Β· ubuntu noble
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… NAME πŸ’…

runqlen.bt is the tool for seeing CPU scheduler run queue length as a histogram, and it runs on bpftrace/eBPF πŸ”₯ ✨

πŸŽ€ SYNOPSIS πŸŽ€

runqlen.bt

🌸 DESCRIPTION 🌸

okay so this program summarizes scheduler queue length as a histogram, and it can also show you run queue occupancy πŸ“Š It works by sampling the run queue length on all CPUs at 99 Hertz πŸ’–

this is lowkey perfect for spotting imbalances πŸ‘€ like when processes are bound to CPUs and cause queueing, or when interrupt mappings cause the same mess πŸ™ˆ

bestie, since this uses BPF, only the root user can use this tool. no cap πŸ”’

πŸ¦‹ REQUIREMENTS πŸ¦‹

you'll need CONFIG_BPF and bpftrace ✨

πŸ’œ EXAMPLES πŸ’œ

Trace CPU run queue length system wide, and print a histogram when you hit Ctrl-C πŸ“

# runqlen.bt

🧚 FIELDS 🧚

  • 1st, 2nd β€” the run queue length shows up in the first field, right after the [ 🫢
  • 3rd β€” a column with the count of samples for that length πŸ”’
  • 4th β€” an ASCII histogram that draws out the count column πŸ“ˆ

🌈 OVERHEAD 🌈

this samples scheduler structs at 99 Hertz across all CPUs. compared to other stuff, that's a low rate of events, so the overhead of this tool is expected to be near zero πŸ’…βœ¨

πŸ”₯ SOURCE πŸ”₯

this one comes straight from bpftrace πŸ’–

https://github.com/bpftrace/bpftrace

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

this is the bpftrace version of the bcc tool with the same name ✨ the bcc tool may give you more options and customizations, so go peek at it too πŸ‘€

https://github.com/iovisor/bcc

🌷 OS 🌷

Linux 🐧

🫧 STABILITY 🫧

Unstable, since it's still in development πŸ™ˆ expect things to shift around a bit πŸ’€

πŸ‘‘ AUTHOR πŸ‘‘

Brendan Gregg 🫢

🦒 SEE ALSO 🦒

runqlat.bt(8), mpstat(1), pidstat(1), uptime(1) πŸ’œ


ok that's the whole tea, bestie 🌈 this is the bpftrace-style runqlen.bt(8) page from the USER COMMANDS section, dated 2018-10-07. ily, go trace some run queues πŸ«ΆπŸ’–βœ¨