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

NAME

6       swapin - Count swapins by process. Uses bpftrace/eBPF.
7

SYNOPSIS

9       swapin
10

DESCRIPTION

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 function 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

REQUIREMENTS

24       CONFIG_BPF and bpftrace.
25

EXAMPLES

27       Count swapins by process, showing per-second summaries.
28              # swapin.bt
29

FIELDS

31       1st    The process name.
32
33       2nd    The process ID.
34
35       3rd    The count of swapins during that interval.
36

OVERHEAD

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

SOURCE

42       This  tool  originated from the book "BPF Performance Tools", published
43       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 bpftrace repository:
50
51              https://github.com/iovisor/bpftrace
52
53       Also look in the bpftrace distribution for  a  companion  _examples.txt
54       file containing example usage, output, and commentary for this tool.
55

OS

57       Linux
58

STABILITY

60       Unstable - in development.
61

AUTHOR

63       Brendan Gregg
64

SEE ALSO

66       swapon(8)
67
68
69
70USER COMMANDS                     2019-07-05                         swapin(8)
Impressum