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

NAME

6       biolatpcts - Monitor IO latency distribution of a block device.
7

SYNOPSIS

9       biolatpcts [-h] [-i INTERVAL] [-w which] [-p PCT,...] [-j] [-v] DEV
10

DESCRIPTION

12       biolatpcts  traces block device I/O (disk I/O) of the specified device,
13       and calculates and prints  the  completion  latency  distribution  per‐
14       centiles per IO type periodically. Example:
15
16        # biolatpcts /dev/nvme0n1
17        nvme0n1     p1     p5    p10   p16   p25   p50   p75   p84   p90   p95
18       p99  p100
19        read     95us 175us 305us 515us 895us 985us 995us  1.5ms  2.5ms  3.5ms
20       4.5ms  10ms
21        write      5us    5us    5us  15us  25us 135us 765us 855us 885us 895us
22       965us 1.5ms
23        discard   5us   5us   5us   5us 135us 145us 165us  205us  385us  875us
24       1.5ms 2.5ms
25        flush      5us    5us    5us   5us   5us   5us   5us   5us   5us 1.5ms
26       4.5ms 5.5ms
27        [...]
28
29       biolatpcts prints a number of pre-set latency  percentiles  in  tabular
30       form  every  three  seconds.  The  interval  can be changed with the -i
31       option.
32
33       The latency is measured between issue to the device and completion. The
34       starting point can be changed with the -w option.
35
36       Any  number  of  percentiles  can be specified using the -p option. The
37       input percentile string is used verbatim in the output to ease  machine
38       consumption.
39
40       -j  option enables json output. The result for each interval is printed
41       on a single line.
42
43       This tool works by tracing blk_account_io_done() with kprobe and  buck‐
44       eting the completion latencies into percpu arrays. It may need updating
45       to match the changes to the function.
46
47       Since this uses BPF, only the root user can use this tool.
48

REQUIREMENTS

50       CONFIG_BPF, CONFIG_KPROBES and bcc.
51

OPTIONS

53       -h Print usage message.
54
55       -i INTERVAL, --interval INTERVAL
56              Report interval. (default: 3)
57
58       -w          {from-rq-alloc,after-rq-alloc,on-device},           --which
59       {from-rq-alloc,after-rq-alloc,on-device}
60              Which latency to measure. (default: on-device)
61
62       -p PCT,..., --pcts PCT,...
63              Percentiles           to           calculate.          (default:
64              1,5,10,16,25,50,75,84,90,95,99,100)
65
66       -j, --json
67              Output in json.
68
69       -v, --verbose
70              Enable debug output.
71
72       DEV    Target block device. /dev/DEVNAME, DEVNAME or MAJ:MIN.
73

EXAMPLES

75       Print sda's I/O latency percentiles every second
76              # biolatpcts -i 1 sda
77
78       Print nvme0n1's all-9 I/O latency percentiles in json every second
79              # biolatpcts -p 99,99.9,99.99,99.999 -j -i 1 /dev/nvme0n1
80

OVERHEAD

82       This traces kernel functions and maintains  in-kernel  per-cpu  latency
83       buckets,  which are asynchronously copied to user-space. This method is
84       very efficient, and the overhead for most storage I/O rates  should  be
85       negligible. If you have an extremely high IOPS storage device, test and
86       quantify the overhead before use.
87

SOURCE

89       This is from bcc.
90
91              https://github.com/iovisor/bcc
92
93       Also look in the bcc distribution for a  companion  _examples.txt  file
94       containing example usage, output, and commentary for this tool.
95

OS

97       Linux
98

STABILITY

100       Unstable - in development.
101

AUTHOR

103       Tejun Heo
104

SEE ALSO

106       biolatency(8), biosnoop(8)
107
108
109
110USER COMMANDS                     2020-04-17                     biolatpcts(8)
Impressum