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

NAME

6       llcstat  -  Summarize  CPU cache references and misses by process. Uses
7       Linux eBPF/bcc.
8

SYNOPSIS

10       llcstat [-h] [-c SAMPLE_PERIOD] [duration]
11

DESCRIPTION

13       llcstat instruments CPU cache references and cache misses  system-side,
14       and  summarizes  them by PID and CPU. These events have different mean‐
15       ings on different architecture. For x86-64, they mean misses and refer‐
16       ences  to  LLC.   This  can  be  useful to locate and debug performance
17       issues caused by cache hit rate.
18
19       This   works   by   sampling   corresponding    events    defined    in
20       uapi/linux/perf_event.h,   namely   PERF_COUNT_HW_CACHE_REFERENCES  and
21       PERF_COUNT_HW_CACHE_MISSES, using BPF perf  event  tracing.  Upon  each
22       sampled  event,  the attached BPF program records the PID and CPU ID on
23       which the event happened, and stores it in table.
24
25       This makes use of a Linux 4.9 feature (BPF_PROG_TYPE_PERF_EVENT).
26
27       Since this uses BPF, only the root user can use this tool.
28

REQUIREMENTS

30       CONFIG_BPF and bcc.
31

OPTIONS

33       -h     Print usage message.
34
35       -c SAMPLE_PERIOD
36              Sample one in this many cache reference and cache miss events.
37
38       duration
39              Duration to trace, in seconds.
40

EXAMPLES

42       Sample one in 100 events, trace for 20 seconds:
43              # llcstat -c 100 20
44

FIELDS

46       PID    Process ID
47
48       NAME   Process name
49
50       CPU    CPU ID
51
52       REFERENCE
53              Number of cache reference events
54
55       MISS   Number of cache miss events
56
57       HIT%   Cache hit ratio
58

SOURCE

60       This is from bcc.
61
62              https://github.com/iovisor/bcc
63
64       Also look in the bcc distribution for a  companion  _examples.txt  file
65       containing example usage, output, and commentary for this tool.
66

OS

68       Linux
69

STABILITY

71       Unstable - in development.
72

AUTHOR

74       Teng Qin
75

SEE ALSO

77       Perf can be used as a generic event counter tool. An example for LLC:
78              #   perf   top   -e  cache-misses  -e  cache-references  -a  -ns
79              pid,cpu,comm
80
81
82
83USER COMMANDS                     2015-08-18                        llcstat(8)
Impressum