-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbiostat_example.txt
More file actions
83 lines (59 loc) · 3.44 KB
/
biostat_example.txt
File metadata and controls
83 lines (59 loc) · 3.44 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Example file for biostat.py
# ./biostat.py
Device r/s w/s rkb wkb rsz wsz
sdb 0 13 0.00 52.00 0 4096
sdb 0 87 0.00 43.50 0 512
We can see that above we have the count of reads & writes, we also have the read & write blocks. We also show each type of i/o size
for each count.
iostat -xkz 1 |grep sd
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdb 0.00 0.00 0.00 100.00 0.00 95.50 1.91 0.04 0.44 0.00 0.44 0.44 4.40
so (13 * 4096) + ( 87 * 512 ) - 97792 / 1024 = 95.5
This matches with iostat , the formatting needs fixed.
Looking at biosnoop to compare.
iostat data
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdb 0.00 0.00 0.00 100.00 0.00 95.50 1.91 0.04 0.40 0.00 0.40 0.40 4.00
biosnoop.py > b1.log
s# awk '/dd/{print $7}' b.log |sort -u
4096
512
root@vm000826:/var/tmp/git/bcc/tools# awk '/dd/{print $7}' b.log |grep -wc 512
87
root@vm000826:/var/tmp/git/bcc/tools# awk '/dd/{print $7}' b.log |grep -wc 4096
13
Checking reads
# echo 1 > /proc/sys/vm/drop_caches
root@vm000826:/mnt# dd if=tfile of=/dev/null count=100
100+0 records in
100+0 records out
51200 bytes (51 kB) copied, 0.00393662 s, 13.0 MB/s
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.00 0.00 8.00 0.00 200.00 0.00 50.00 0.00 0.50 0.50 0.00 0.50 0.40
sdb 0.00 0.00 4.00 0.00 240.00 0.00 120.00 0.00 0.00 0.00 0.00 0.00 0.00
We are interested in sdb as thats where we have our data
sda 1 0 28.00 0.00 28672 0
sda 1 0 80.00 0.00 81920 0
sdb 1 0 32.00 0.00 32768 0
sda 1 0 44.00 0.00 45056 0
sda 1 0 8.00 0.00 8192 0
sdb 1 0 128.00 0.00 131072 0
sdb 1 0 64.00 0.00 65536 0
sdb 1 0 16.00 0.00 16384 0
sda 2 0 8.00 0.00 4096 0
sda 2 0 32.00 0.00 16384 0
When we sum the 32 + 128 + 64 + 16 = 240kb which also matches iostat data. ( looking at iosnoop)
# grep dd b2.log |grep sdb
0.480600000 dd 29591 sdb R 3555328 16384 0.34
0.481165000 dd 29591 sdb R 3555360 32768 0.52
0.481539000 dd 29591 sdb R 3555424 65536 0.78
0.482431000 dd 29591 sdb R 3555552 131072 1.13
This also matches our biostat counts.
---- Latency
Device r/s w/s r/Kb w/Kb rsz wsz r_ms w_ms
sda 0 1 0.00 4.00 0 4096 0.00 0.00
sda 0 1 0.00 56.00 0 57344 0.00 1.00
sdb 0 1 0.00 8.00 0 8192 0.00 2.00
sdb 0 999 0.00 7992.00 0 8192 0.00 0.00
sdb 0 1 0.00 4.00 0 4096 0.00 0.00
sdb 0 1 0.00 24.00 0 24576 0.00 0.00