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

NAME

6       xfsslower - Trace slow xfs file operations, with per-event details.
7

SYNOPSIS

9       xfsslower [-h] [-j] [-p PID] [min_ms]
10

DESCRIPTION

12       This  tool traces common XFS file operations: reads, writes, opens, and
13       syncs. It measures the time  spent  in  these  operations,  and  prints
14       details for each that exceeded a threshold.
15
16       WARNING: See the OVERHEAD section.
17
18       By default, a minimum millisecond threshold of 10 is used. If a thresh‐
19       old of 0 is used, all events are printed (warning: verbose).
20
21       Since this works by tracing  the  xfs_file_operations  interface  func‐
22       tions, it will need updating to match any changes to these functions.
23
24       Since this uses BPF, only the root user can use this tool.
25

REQUIREMENTS

27       CONFIG_BPF and bcc.
28

OPTIONS

30       -p PID Trace this PID only.
31
32       min_ms Minimum  I/O  latency  (duration)  to  trace,  in  milliseconds.
33              Default is 10 ms.
34

EXAMPLES

36       Trace synchronous file reads and writes slower than 10 ms:
37              # xfsslower
38
39       Trace slower than 1 ms:
40              # xfsslower 1
41
42       Trace slower than 1 ms, and output just the fields in  parsable  format
43       (csv):
44              # xfsslower -j 1
45
46       Trace all file reads and writes (warning: the output will be verbose):
47              # xfsslower 0
48
49       Trace slower than 1 ms, for PID 181 only:
50              # xfsslower -p 181 1
51

FIELDS

53       TIME(s)
54              Time of I/O completion since the first I/O seen, in seconds.
55
56       COMM   Process name.
57
58       PID    Process ID.
59
60       T      Type of operation. R == read, W == write, O == open, S == fsync.
61
62       OFF_KB File offset for the I/O, in Kbytes.
63
64       BYTES  Size of I/O, in bytes.
65
66       LAT(ms)
67              Latency  (duration)  of I/O, measured from when it was issued by
68              VFS to the filesystem, to when it completed. This time is inclu‐
69              sive  of  block  device I/O, file system CPU cycles, file system
70              locks, run queue latency, etc. It's a more accurate  measure  of
71              the latency suffered by applications performing file system I/O,
72              than to measure this down at the block device interface.
73
74       FILENAME
75              A cached kernel file name (comes from dentry->d_name.name).
76
77       ENDTIME_us
78              Completion timestamp, microseconds (-j only).
79
80       OFFSET_b
81              File offset, bytes (-j only).
82
83       LATENCY_us
84              Latency (duration) of the I/O, in microseconds (-j only).
85

OVERHEAD

87       This adds low-overhead instrumentation to these XFS operations, includ‐
88       ing  reads and writes from the file system cache. Such reads and writes
89       can be very frequent (depending on the workload; eg, 1M/sec), at  which
90       point  the overhead of this tool (even if it prints no "slower" events)
91       can begin to become significant. Measure and quantify  before  use.  If
92       this  continues  to  be  a  problem,  consider switching to a tool that
93       prints in-kernel summaries only.
94
95       Note that the overhead of this tool should be less than  fileslower(8),
96       as  this  tool  targets xfs functions only, and not all file read/write
97       paths (which can include socket I/O).
98

SOURCE

100       This is from bcc.
101
102              https://github.com/iovisor/bcc
103
104       Also look in the bcc distribution for a  companion  _examples.txt  file
105       containing example usage, output, and commentary for this tool.
106

OS

108       Linux
109

STABILITY

111       Unstable - in development.
112

AUTHOR

114       Brendan Gregg
115

SEE ALSO

117       biosnoop(8), funccount(8), fileslower(8)
118
119
120
121USER COMMANDS                     2016-02-11                      xfsslower(8)
Impressum