logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

runqlen.bt - CPU scheduler run queue length as a histogram. Uses bpftrace/eBPF.

Author

       Brendan Gregg

Description

       This  program summarizes scheduler queue length as a histogram, and can also show run queue occupancy. It
       works by sampling the run queue length on all CPUs at 99 Hertz.

       This tool can be used to identify imbalances, eg, when processes are bound to CPUs causing  queueing,  or
       interrupt mappings causing the same.

       Since this uses BPF, only the root user can use this tool.

Examples

       Trace CPU run queue length system wide, printing a histogram on Ctrl-C:
              # runqlen.bt

Fields

       1st, 2nd
              The run queue length is shown in the first field (after "[").

       3rd    A column showing the count of samples in for that length.

       4th    This is an ASCII histogram representing the count column.

Name

       runqlen.bt - CPU scheduler run queue length as a histogram. Uses bpftrace/eBPF.

Os

       Linux

Overhead

       This samples scheduler structs at 99 Hertz across all CPUs. Relatively, this is a low rate of events, and
       the overhead of this tool is expected to be near zero.

Requirements

       CONFIG_BPF and bpftrace.

See Also

runqlat.bt(8), mpstat(1), pidstat(1), uptime(1)

USER COMMANDS                                      2018-10-07                                      runqlen.bt(8)

Source

       This is from bpftrace.

              https://github.com/bpftrace/bpftrace

       Also  look  in  the  bpftrace  distribution  for a companion _examples.txt file containing example usage,
       output, and commentary for this tool.

       This is a bpftrace version of the bcc tool of the same name. The bcc tool may provide  more  options  and
       customizations.

              https://github.com/iovisor/bcc

Stability

       Unstable - in development.

Synopsis

runqlen.bt

See Also