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

NAME

6       btrfsdist - Summarize btrfs operation latency. Uses Linux eBPF/bcc.
7

SYNOPSIS

9       btrfsdist [-h] [-T] [-N] [-d] [interval] [count]
10

DESCRIPTION

12       This  tool  summarizes time (latency) spent in common btrfs file opera‐
13       tions: reads, writes, opens, and syncs, and presents it as a power-of-2
14       histogram.  It  uses  an  in-kernel eBPF map to store the histogram for
15       efficiency.
16
17       Since this works by tracing the btrfs_file_operations  interface  func‐
18       tions, it will need updating to match any changes to these functions.
19
20       Since this uses BPF, only the root user can use this tool.
21

REQUIREMENTS

23       CONFIG_BPF and bcc.
24

OPTIONS

26       -h     Print usage message.
27
28       -T     Don't include timestamps on interval output.
29
30       -m     Output in milliseconds.
31
32       -p PID Trace this PID only.
33

EXAMPLES

35       Trace btrfs operation time, and print a summary on Ctrl-C:
36              # btrfsdist
37
38       Trace PID 181 only:
39              # btrfsdist -p 181
40
41       Print 1 second summaries, 10 times:
42              # btrfsdist 1 10
43
44       1 second summaries, printed in milliseconds
45              # btrfsdist -m 1
46

FIELDS

48       msecs  Range of milliseconds for this bucket.
49
50       usecs  Range of microseconds for this bucket.
51
52       count  Number of operations in this time range.
53
54       distribution
55              ASCII representation of the distribution (the count column).
56

OVERHEAD

58       This  adds  low-overhead instrumentation to btrfs writes and fsyncs, as
59       well as all system reads and opens (due to the  current  implementation
60       of  the  btrfs_file_operations  interface). Particularly, all reads and
61       writes from the file system cache will incur extra overhead while trac‐
62       ing. Such reads and writes can be very frequent (depending on the work‐
63       load; eg, 1M/sec), at which point the overhead of this tool may  become
64       noticeable.  Measure and quantify before use.
65

SOURCE

67       This is from bcc.
68
69              https://github.com/iovisor/bcc
70
71       Also  look  in  the bcc distribution for a companion _examples.txt file
72       containing example usage, output, and commentary for this tool.
73

OS

75       Linux
76

STABILITY

78       Unstable - in development.
79

AUTHOR

81       Brendan Gregg
82

SEE ALSO

84       btrfsslower(8)
85
86
87
88USER COMMANDS                     2016-02-15                      btrfsdist(8)
Impressum