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 is‐
17       sues 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       -t     Summarize cache references and misses by PID/TID
39
40       duration
41              Duration to trace, in seconds.
42

EXAMPLES

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

FIELDS

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

SOURCE

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

OS

70       Linux
71

STABILITY

73       Unstable - in development.
74

AUTHOR

76       Teng Qin
77

SEE ALSO

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