forked from mchad1/fio-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfio-run.ksh
executable file
·120 lines (117 loc) · 3.5 KB
/
fio-run.ksh
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
#!/usr/bin/ksh
#Change the diredtory=< > to your directory where in I/O is written
#When you run, ./fio-run /mnt/cvs/output 64 <-- outstanding I/O
#for try in {1..6}; do for depth in 200 100 64 32 16 8 4 2 1; do ./fio-run /mnt/cvs/output/point$try $depth ; done; done
if [[ -z $1 ]]; then
echo "Please enter a base directory for output and config files"
exit
else
base_dir=$1
fi
workingset=1TBWorkingset
size=crap
iodepth=crap
bs=crap
rw=crap
rwmixread=crap
max=crap
job=crap
#./ip-collect $1
#for count in 32 16 8 4 2 1; do
#for count in 32 1 ; do
#for count in 5 1 ; do
for count in 1 ; do
#Create Directories, exit on error"
dir=${base_dir}/${count}vms/$workingset
config_dir=${dir}/config
output_dir=${dir}/output
mkdir -p $config_dir >/dev/null 2>&1
mkdir -p $output_dir >/dev/null 2>&1
if [[ -z `ls $dir` ]]; then
echo "The specified directory either does not exist or could not be accessed/created: $base_dir"
echo "exiting"
exit
fi
if [[ $count == 64 ]]; then
#max=15
size=1G
elif [[ $count == 32 ]]; then
size=8G
elif [[ $count == 16 ]]; then
#size=10M
size=16G
elif [[ $count == 6 ]]; then
#size=10M
size=42G
elif [[ $count == 5 ]]; then
#size=10M
size=52G
elif [[ $count == 4 ]]; then
#size=10M
size=64G
elif [[ $count == 2 ]]; then
#size=10M
size=128G
elif [[ $count == 1 ]]; then
#size=10M
size=256G
fi
for iosize in 64 4; do
if [[ $iosize -le 16 ]]; then
rw=randrw
else
rw=randrw
fi
for mix in 100 0; do
if [[ $mix == 0 ]]; then
#max= 15
max=64
elif [[ $mix = 100 ]]; then
if [[ $rw == "randrw" ]]; then
#max=40
max=64
else
#max=15
max=64
fi
else
#max=15
#max=10
max=64
fi
max=$2
i=$max
min=0
(( min = max - 1 ))
while [[ $i -gt $min ]]; do
echo "[global]" > config-$count
echo "name=fio-test" >> config-$count
echo "directory=/mnt/fio" >> config-$count
echo "ioengine=libaio" >> config-$count
echo "direct=1" >> config-$count
echo "numjobs=4" >> config-$count
echo "nrfiles=100" >> config-$count
echo "runtime=600" >> config-$count
echo "group_reporting=1" >> config-$count
echo "time_based" >> config-$count
echo "stonewall" >> config-$count
echo "bs=${iosize}K" >> config-$count
echo "rw=${rw}" >> config-$count
echo "rwmixread=${mix}" >> config-$count
echo "iodepth=${i}" >> config-$count
echo "size=${size}" >> config-$count
echo "ramp_time=20" >> config-$count
echo "[rw]" >> config-$count
echo "[randrw]" >> config-$count
file="vm$count-iodepth$i-filesize$size-bs$iosize-rwmix$mix"
#Run Stuff Here
echo fio --client=/mnt/fio/fio-hosts-$count --output-format=normal --output=../output/output-${file} --group_reporting --section=$rw config-${file} > ${config_dir}/command-${file}
cat config-$count > ${config_dir}/config-${file}
fio --client=/mnt/fio/fio-hosts-$count --output-format=normal --output=${output_dir}/output-$file --group_reporting --section=$rw config-$count
(( i = i - 1 ))
done
done
done
#/mnt/fio/fio-shutdown-post-$count
#/mnt/fio/fio-stop
done