runqlen(8)

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

πŸŽ€ runqlen(8) πŸŽ€

System Manager's Manual πŸ’…

✨ NAME ✨

runqlen β€” scheduler run queue length as a histogram πŸ“Š

πŸ’œ SYNOPSIS πŸ’œ

runqlen [-h] [-T] [-O] [-C] [interval] [count]

🌸 DESCRIPTION 🌸

okay so this program summarizes scheduler queue length as a histogram πŸ“Š, and it can also show run queue occupancy too πŸ”₯. it works by sampling the run queue length on all CPUs at 99 Hertz ⏱️, so it's literally sampling constantly like a paparazzi πŸ“Έ

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

⚠️ since this uses BPF, only the root user can use this tool. no sneaking in as a regular user, bestie 🚫

🧚 REQUIREMENTS 🧚

you'll need CONFIG_BPF and bcc ✨

πŸŽ€ OPTIONS πŸŽ€

  • -h β€” prints the usage message πŸ“
  • -T β€” adds timestamps to the output ⏰
  • -O β€” reports run queue occupancy πŸ¦‹
  • -C β€” reports for each CPU separately πŸ–₯️
  • interval β€” the output interval, in seconds ⏳
  • count β€” how many outputs you want πŸ”’

πŸ“ EXAMPLES πŸ“

summarize run queue length as a histogram:

# runqlen

print 1 second summaries, 10 times:

# runqlen 1 10

print output every second, with timestamps, and show each CPU separately:

# runqlen -CT 1

print run queue occupancy every second:

# runqlen -O 1

print run queue occupancy, with timestamps, for each CPU:

# runqlen -COT 1

πŸ¦‹ FIELDS πŸ¦‹

  • runqlen β€” the scheduler run queue length: the number of threads (tasks) waiting to run, (excluding including the currently running task) 🧡
  • count β€” the number of samples at this queue length πŸ”’
  • distribution β€” an ASCII bar chart visualizing the distribution (count column) πŸ“Š

🌈 OVERHEAD 🌈

this uses sampling at 99 Hertz (on all CPUs) plus in-kernel summaries, so the overhead should be basically negligible 🫢. it does not trace scheduler events the way runqlat does, and tracing is where the much higher overhead cost comes from πŸ’€

🧁 SOURCE 🧁

this is from bcc πŸ’–

https://github.com/iovisor/bcc

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

πŸ–₯️ OS πŸ–₯️

Linux 🐧

🚧 STABILITY 🚧

🚧 Unstable β€” still in development, so expect some drama πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

Brendan Gregg, the legend himself πŸ”₯

πŸ”— SEE ALSO πŸ”—

runqlat(8), runqslower(8), pidstat(1) πŸ’œ


that's the tea, bestie β˜•βœ¨ runqlen(8) from the USER COMMANDS section, last updated 2016-12-12 πŸ§šπŸ’–