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

NAME

6       readahead - Show performance of read-ahead cache
7

SYNOPSIS

9       readahead [-d DURATION]
10

DESCRIPTION

12       The  tool  shows  the  performance  of read-ahead caching on the system
13       under a given load to investigate any caching issues. It shows a  count
14       of  unused  pages  in the cache and also prints a histogram showing how
15       long they have remained there.
16
17       This tool traces the  __do_page_cache_readahead()  kernel  function  to
18       track  entry and exit in the readahead mechanism in the kernel and then
19       uses __page_cache_alloc() and mark_page_accessed() functions to  calcu‐
20       late  the age of the page in the cache as well as see how many are left
21       unaccessed.
22
23       Since this uses BPF, only the root user can use this tool.
24
25   NOTE ON KPROBES USAGE
26       Since the tool uses Kprobes, depending on your linux kernel's  compila‐
27       tion,  these  functions  may  be  inlined  and  hence not available for
28       Kprobes. To see whether you have the functions available, check vmlinux
29       source  and binary to confirm whether inlining is happening or not. You
30       can also check /proc/kallsyms on the host  and  verify  if  the  target
31       functions are present there before using this.
32

REQUIREMENTS

34       CONFIG_BPF, bcc
35

OPTIONS

37       -h Print usage message
38
39       -d DURATION
40              Trace the read-ahead caching system for DURATION seconds
41

EXAMPLES

43       Trace for 30 seconds and show  histogram of page age (ms) in read-ahead
44       cache along with unused page count:
45              # readahead -d 30
46

OVERHEAD

48       The kernel functions instrumented by this program  could  be  high-fre‐
49       quency depending on the profile of the application (for example sequen‐
50       tial IO). We advise the users  to  measure  and  monitor  the  overhead
51       before leaving this turned on in production environments.
52

SOURCE

54       This  originated  as  a  bpftrace  tool  from the book "BPF Performance
55       Tools", published by Addison Wesley (2019):
56
57              http://www.brendangregg.com/bpf-performance-tools-book.html
58
59       See the book for more documentation on this tool.
60
61       This version is in the BCC repository:
62
63              https://github.com/iovisor/bcc
64
65       Also look in the bcc distribution for a  companion  _examples.txt  file
66       containing example usage, output, and commentary for this tool.
67

OS

69       Linux
70

STABILITY

72       Unstable - in development.
73

AUTHOR

75       Suchakra Sharma
76

SEE ALSO

78       readahead(2), madvise(2)
79
80
81
82USER COMMANDS                     2020-08-20                      readahead(8)
Impressum