forked from brendangregg/perf-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitesize_example.txt
63 lines (47 loc) · 2.44 KB
/
bitesize_example.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Demonstrations of bitesize, the Linux perf_events version.
bitesize traces block I/O issued, and reports a histogram of I/O size. By
default five buckets are used to gather statistics on common I/O sizes:
# ./bitesize
Tracing block I/O size (bytes), until Ctrl-C...
^C
Kbytes : I/O Distribution
-> 0.9 : 0 | |
1.0 -> 7.9 : 38 |# |
8.0 -> 63.9 : 10108 |######################################|
64.0 -> 127.9 : 13 |# |
128.0 -> : 1 |# |
In this case, most of the I/O was between 8 and 63.9 Kbytes. The "63.9"
really means "less than 64".
Specifying custom buckets to examine the I/O size in more detail:
# ./bitesize -b "8 16 24 32"
Tracing block I/O size (bytes), until Ctrl-C...
^C
Kbytes : I/O Distribution
-> 7.9 : 89 |# |
8.0 -> 15.9 : 14665 |######################################|
16.0 -> 23.9 : 657 |## |
24.0 -> 31.9 : 661 |## |
32.0 -> : 376 |# |
The I/O is mostly between 8 and 15.9 Kbytes
It's probably 8 Kbytes. Checking:
# ./bitesize -b "8 9"
Tracing block I/O size (bytes), until Ctrl-C...
^C
Kbytes : I/O Distribution
-> 7.9 : 62 |# |
8.0 -> 8.9 : 11719 |######################################|
9.0 -> : 1358 |##### |
It is.
The overhead of this tool is relative to the number of buckets used, hence only
using what is necessary.
To study this I/O in more detail, I can use iosnoop(8) and capture it to a file
for post-processing.
Use -h to print the USAGE message:
# ./bitesize -h
USAGE: bitesize [-h] [-b buckets] [seconds]
-b buckets # specify histogram buckets (Kbytes)
-h # this usage message
eg,
bitesize # trace I/O size until Ctrl-C
bitesize 10 # trace I/O size for 10 seconds
bitesize -b "8 16 32" # specify custom bucket points