-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathfio_suite2.sh
executable file
·129 lines (103 loc) · 5.95 KB
/
fio_suite2.sh
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/bash
echo -e "FIO SUITE version 0.1"
echo -e " "
echo -e "WARNING: this test will run for several minutes without any progress! Please wait until it finish!"
echo -e " "
# to make sure that each write fio invokes is followed by a fdatasync, use --fdatasync=1.
echo -e "[FSYNC WRITE SEQUENTIALY]"
echo -e ""
echo -e "the 99th percentile of this metric should be less than 10ms"
mkdir -p test-data
/usr/bin/fio --rw=write --ioengine=sync --fdatasync=1 --directory=test-data --size=22m --bs=2300 --name=cleanfsynctest > cleanfsynctest.log
FSYNC=$(cat cleanfsynctest.log |grep "99.00th"|tail -1|cut -c17-|grep -oE "([0-9]+)]" -m1|cut -d ']' -f 1|head -1)
echo -e ""
cat cleanfsynctest.log
echo -e ""
if (( $FSYNC > 10000 )); then
echo -e "BAD.. 99th fsync is higher than 10ms. $FSYNC"
else
echo -e "OK.. 99th fsync is less than 10ms. $FSYNC"
fi
rm -rf test-data
# fio --name=seek1g --filename=fiotest --runtime=120 --ioengine=sync --direct=1 --ramp_time=2 --iodepth=1 --readwrite=write --blocksize=4k --size=1G --bs=2k
# echo -e "- [MAX CONCURRENT READ] ---"
# echo -e "This job is a read-heavy workload with lots of parallelism that is likely to show off the device's best throughput:"
# echo -e " "
# /usr/bin/fio --size=1G --name=maxoneg --filename=fiotest --runtime=120 --ioengine=libaio --direct=1 --ramp_time=10 --name=read1 --iodepth=16 --readwrite=randread --numjobs=16 --blocksize=64k --offset_increment=128m > best_1G_d4.log
# best_large=$(cat best_1G_d4.log |grep IOPS|tail -1)
# echo -e "$best_large"
# rm fiotest
# rm best_1G_d4.log
# /usr/bin/fio --size=200M --name=maxonemb --filename=fiotest --runtime=120 --ioengine=libaio --direct=1 --ramp_time=10 --name=read1 --iodepth=16 --readwrite=randread --numjobs=16 --blocksize=64k --offset_increment=128m > best_200M_d4.log
# best_small=$(cat best_200M_d4.log |grep IOPS|tail -1)
# echo -e "$best_small"
# rm best_200M_d4.log
# echo -e "- [REQUEST OVERHEAD AND SEEK TIMES] ---"
# echo -e "This job is a latency-sensitive workload that stresses per-request overhead and seek times. Random reads."
# echo -e " "
# fio --name=seek1g --filename=fiotest --runtime=120 --ioengine=libaio --direct=1 --ramp_time=10 --iodepth=4 --readwrite=randread --blocksize=4k --size=1G > rand_1G_d1.log
# overhead_big=$(cat rand_1G_d1.log |grep IOPS|tail -1)
# echo -e "$overhead_big"
# rm rand_1G_d1.log
# /usr/bin/fio --name=seek1mb --filename=fiotest --runtime=120 --ioengine=libaio --direct=1 --ramp_time=10 --iodepth=4 --readwrite=randread --blocksize=4k --size=200M > rand_200M_d1.log
# overhead_small=$(cat rand_200M_d1.log |grep IOPS|tail -1)
# echo -e "$overhead_small"
# rm rand_200M_d1.log
# echo -e " "
# echo -e "- [SEQUENTIAL IOPS UNDER DIFFERENT READ/WRITE LOAD] ---"
# echo -e " "
# echo -e "-- [ SINGLE JOB, 70% read, 30% write] --"
# echo -e " "
# /usr/bin/fio --name=seqread1g --filename=fiotest --runtime=120 --ioengine=sync --fdatasync=1 --direct=1 --bs=2k --readwrite=rw --rwmixread=70 --rwmixwrite=30 --iodepth=1 --blocksize=4k --size=1G --percentage_random=0 > r70_w30_1G_d4.log
# s7030big=$(cat r70_w30_1G_d4.log |grep IOPS|tail -1)
# echo -e "$s7030big"
# cat r70_w30_1G_d4.log
# #rm r70_w30_1G_d4.log
# echo -e " "
# /usr/bin/fio --name=seqread1mb --filename=fiotest --runtime=120 --ioengine=sync --fdatasync=1 --direct=1 --bs=2k --readwrite=rw --rwmixread=70 --rwmixwrite=30 --iodepth=1 --blocksize=4k --size=200M > r70_w30_200M_d4.log
# s7030small=$(cat r70_w30_200M_d4.log |grep IOPS|tail -1)
# echo -e "$s7030small"
# cat r70_w30_200M_d4.log
# #rm r70_w30_200M_d4.log
# echo -e " "
# echo -e "-- [ SINGLE JOB, 30% read, 70% write] --"
# echo -e " "
# /usr/bin/fio --name=seqwrite1G --filename=fiotest --runtime=120 --bs=2k --ioengine=sync --fdatasync=1 --direct=1 --bs=2k --readwrite=rw --rwmixread=30 --rwmixwrite=70 --iodepth=1 --blocksize=4k --size=200M > r30_w70_200M_d1.log
# so7030big=$(cat r30_w70_200M_d1.log |grep IOPS|tail -1)
# echo -e "$so7030big"
# cat r30_w70_200M_d1.log
# #rm r30_w70_200M_d1.log
# echo -e " "
# /usr/bin/fio --name=seqwrite1mb --filename=fiotest --runtime=120 --bs=2k --ioengine=sync --fdatasync=1 --direct=1 --bs=2k --readwrite=rw --rwmixread=30 --rwmixwrite=70 --iodepth=1 --blocksize=4k --size=1G > r30_w70_1G_d1.log
# so7030small=$(cat r30_w70_1G_d1.log |grep IOPS|tail -1)
# echo -e "$so7030small"
# cat r30_w70_1G_d1.log
# #rm r30_w70_1G_d1.log
# rm fiotest
# echo -e " "
# echo -e "-- [ 8 PARALLEL JOBS, 70% read, 30% write] ----"
# echo -e " "
# /usr/bin/fio --name=seqparread1g8 --filename=fiotest --runtime=120 --bs=2k --ioengine=sync --fdatasync=1 --direct=1 --numjobs=8 --readwrite=rw --rwmixread=70 --rwmixwrite=30 --iodepth=1 --blocksize=4k --size=1G --percentage_random=0 > r70_w30_1G_d4.log
# s7030big=$(cat r70_w30_1G_d4.log |grep IOPS|tail -1)
# echo -e "$s7030big"
# #rm r70_w30_1G_d4.log
# echo -e " "
# /usr/bin/fio --name=seqparread1mb8 --filename=fiotest --runtime=120 --bs=2k --ioengine=sync --fdatasync=1 --direct=1 --numjobs=8 --readwrite=rw --rwmixread=70 --rwmixwrite=30 --iodepth=1 --blocksize=4k --size=200M > r70_w30_200M_d4.log
# s7030small=$(cat r70_w30_200M_d4.log |grep IOPS|tail -1)
# echo -e "$s7030small"
# rm r70_w30_200M_d4.log
# echo -e " "
# echo -e "-- [ 8 PARALLEL JOBS, 30% read, 70% write] ----"
# echo -e " "
# /usr/bin/fio --name=seqparwrite1g8 --filename=fiotest --runtime=120 --bs=2k --ioengine=sync --fdatasync=1 --direct=1 --numjobs=8 --readwrite=rw --rwmixread=30 --rwmixwrite=70 --iodepth=1 --blocksize=4k --size=200M > r30_w70_200M_d1.log
# so7030big=$(cat r30_w70_200M_d1.log |grep IOPS|tail -1)
# echo -e "$so7030big"
# #rm r30_w70_200M_d1.log
# echo -e " "
# /usr/bin/fio --name=seqparwrite1mb8 --filename=fiotest --runtime=120 --bs=2k --ioengine=sync --fdatasync=1 --direct=1 --numjobs=8 --readwrite=rw --rwmixread=30 --rwmixwrite=70 --iodepth=1 --blocksize=4k --size=1G > r30_w70_1G_d1.log
# so7030small=$(cat r30_w70_1G_d1.log |grep IOPS|tail -1)
# echo -e "$so7030small"
# #rm r30_w70_1G_d1.log
# rm fiotest
echo -e " "
echo -e "- END -----------------------------------------"