1runqslower(8)               System Manager's Manual              runqslower(8)
2
3
4

NAME

6       runqlat - Trace long process scheduling delays.
7

SYNOPSIS

9       runqslower [-p PID] [min_us]
10

DESCRIPTION

12       This measures the time a task spends waiting on a run queue (or equiva‐
13       lent scheduler data structure) for a turn on-CPU, and shows occurrences
14       of  time  exceeding  passed threshold. This time should be small, but a
15       task may need to wait its turn due to CPU  load.  The  higher  the  CPU
16       load, the longer a task will generally need to wait its turn.
17
18       This tool measures two types of run queue latency:
19
20       1.  The  time  from a task being enqueued on a run queue to its context
21       switch and execution. This traces ttwu_do_wakeup(),  wake_up_new_task()
22       ->  finish_task_switch()  with either raw tracepoints (if supported) or
23       kprobes and instruments the run queue latency after a voluntary context
24       switch.
25
26       2. The time from when a task was involuntary context switched and still
27       in the runnable state, to when it next executed. This  is  instrumented
28       from finish_task_switch() alone.
29
30       The  overhead  of  this tool may become significant for some workloads:
31       see the OVERHEAD section.
32
33       This works by tracing various kernel scheduler functions using  dynamic
34       tracing,  and  will  need  updating to match any changes to these func‐
35       tions.
36
37       Since this uses BPF, only the root user can use this tool.
38

REQUIREMENTS

40       CONFIG_BPF and bcc.
41

OPTIONS

43       -h     Print usage message.
44
45       -p PID Only show this PID (filtered in kernel for efficiency).
46
47       min_us Minimum scheduling delay in microseconds to output.
48

EXAMPLES

50       Show scheduling delays longer than 10ms:
51              # runqslower
52
53       Show scheduling delays longer than 1ms for process with PID 123:
54              # runqslower -p 123 1000
55

FIELDS

57       TIME   Time of when scheduling event occurred.
58
59       COMM   Process name.
60
61       PID    Process ID.
62
63       LAT(us)
64              Scheduling latency from time when task was ready to run  to  the
65              time it was assigned to a CPU to run.
66

OVERHEAD

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

SOURCE

75       This is from bcc.
76
77              https://github.com/iovisor/bcc
78
79       Also  look  in  the bcc distribution for a companion _examples.txt file
80       containing example usage, output, and commentary for this tool.
81

OS

83       Linux
84

STABILITY

86       Unstable - in development.
87

AUTHOR

89       Ivan Babrou
90

SEE ALSO

92       runqlen(8), runqlat(8), pidstat(1)
93
94
95
96USER COMMANDS                     2016-02-07                     runqslower(8)
Impressum