1swapin(8) System Manager's Manual swapin(8)
2
3
4
6 swapin - Count swapins by process. Uses BCC/eBPF.
7
9 swapin
10
12 This tool counts swapins by process, to show which process is affected
13 by swapping (if swap devices are in use). This can explain a signifi‐
14 cant source of application latency, if it has began swapping due to
15 memory pressure on the system.
16
17 This works by tracing the swap_readpage() kernel funciton using dynamic
18 instrumentation. This tool may need maintenance to keep working if that
19 function changes in later kernels.
20
21 Since this uses BPF, only the root user can use this tool.
22
24 CONFIG_BPF and BCC.
25
27 Count swapins by process, showing per-second summaries.
28 # swapin
29
31 1st The process name.
32
33 2nd The process ID.
34
35 3rd The count of swapins during that interval.
36
38 The rate of swapins should be low (bounded by swapin device IOPS), such
39 that the overhead of this tool is expected to be negligible.
40
42 This originated as a bpftrace tool from the book "BPF Performance
43 Tools", published by Addison Wesley (2019):
44
45 http://www.brendangregg.com/bpf-performance-tools-book.html
46
47 See the book for more documentation on this tool.
48
49 This version is in the BCC repository:
50
51 https://github.com/iovisor/bcc
52
53 Also look in the bcc distribution for a companion _examples.txt file
54 containing example usage, output, and commentary for this tool.
55
57 Linux
58
60 Unstable - in development.
61
63 Brendan Gregg
64
66 swapon(8)
67
68
69
70USER COMMANDS 2019-07-05 swapin(8)