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

runqlat.bt - CPU scheduler run queue latency as a histogram. Uses bpftrace/eBPF.

Author

       Brendan Gregg

Description

       This  traces  time  spent waiting in the CPU scheduler for a turn on-CPU. This metric is often called run
       queue latency, or scheduler  latency.  This  tool  shows  this  latency  as  a  power-of-2  histogram  in
       nanoseconds, allowing multimodal distributions to be studied, as well as latency outliers.

       This tool uses the sched tracepoints.

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

Examples

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

Fields

       1st, 2nd
              This is a range of latency, in microseconds (shown in "[...)" set notation).

       3rd    A column showing the count of scheduler events in this range.

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

Name

       runqlat.bt - CPU scheduler run queue latency as a histogram. Uses bpftrace/eBPF.

Os

       Linux

Overhead

       This  traces  scheduler  functions, which can become very frequent. While eBPF has very low overhead, and
       this tool uses in-kernel maps for efficiency, the frequency of scheduler events for some workloads may be
       high enough that the overhead of this tool becomes significant. Measure in a lab environment to  quantify
       the overhead before use.

Requirements

       CONFIG_BPF and bpftrace.

See Also

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

USER COMMANDS                                      2018-09-17                                      runqlat.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

runqlat.bt

See Also