Ivan Babrou | 5c48a3f | 2018-05-08 17:24:19 -0700 | [diff] [blame] | 1 | Demonstrations of runqslower, the Linux eBPF/bcc version. |
| 2 | |
| 3 | |
| 4 | runqslower shows high latency scheduling times between tasks being |
| 5 | ready to run and them running on CPU after that. For example: |
| 6 | |
| 7 | # runqslower |
| 8 | Tracing run queue latency higher than 10000 us |
| 9 | TIME COMM PID LAT(us) |
| 10 | 04:16:32 cc1 12924 12739 |
| 11 | 04:16:32 sh 13640 12118 |
| 12 | 04:16:32 make 13639 12730 |
| 13 | 04:16:32 bash 13655 12047 |
| 14 | 04:16:32 bash 13657 12744 |
| 15 | 04:16:32 bash 13656 12880 |
| 16 | 04:16:32 sh 13660 10846 |
| 17 | 04:16:32 gcc 13663 12681 |
| 18 | 04:16:32 make 13668 10814 |
| 19 | 04:16:32 make 13670 12988 |
| 20 | 04:16:32 gcc 13677 11770 |
| 21 | 04:16:32 gcc 13678 23519 |
| 22 | 04:16:32 as 12999 20541 |
| 23 | [...] |
| 24 | |
| 25 | This shows various processes waiting for available CPU during a Linux kernel |
| 26 | build. By default the output contains delays for more than 10ms. |
| 27 | |
Dmitry Dolgov | 97aeee9 | 2018-06-05 21:27:06 +0200 | [diff] [blame] | 28 | These delays can be analyzed in depth with "perf sched" tool, see: |
Ivan Babrou | 5c48a3f | 2018-05-08 17:24:19 -0700 | [diff] [blame] | 29 | |
| 30 | * http://www.brendangregg.com/blog/2017-03-16/perf-sched.html |
| 31 | |
| 32 | USAGE message: |
| 33 | |
| 34 | # ./runqslower -h |
| 35 | usage: runqslower.py [-h] [-p PID] [min_us] |
| 36 | |
| 37 | Trace high run queue latency |
| 38 | |
| 39 | positional arguments: |
| 40 | min_us minimum run queue latecy to trace, in ms (default 10000) |
| 41 | |
| 42 | optional arguments: |
| 43 | -h, --help show this help message and exit |
| 44 | -p PID, --pid PID trace this PID only |
| 45 | |
| 46 | examples: |
| 47 | ./runqslower # trace run queue latency higher than 10000 us (default) |
| 48 | ./runqslower 1000 # trace run queue latency higher than 1000 us |
| 49 | ./runqslower -p 123 # trace pid 123 only |