-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_zfs_fio_test_mach2.sh
executable file
·151 lines (145 loc) · 5.52 KB
/
run_zfs_fio_test_mach2.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/bin/sh
set -e
POOL=tank
rm_zfs_parts() {
grep -qs "$POOL" /proc/mounts \
&& echo "Destroying previous pool \"$POOL\"" \
&& zpool destroy $POOL
for x in $(ls /dev/disk/by-id/ | grep wwn-0x6000 | grep 0001000000000000 | grep -v part)
do
LUN1="/dev/disk/by-id/$x"
LUN0="$(echo $LUN1 | sed 's/0001000000000000/0000000000000000/g')"
for DISK in $LUN0 $LUN1
do
for PART in $(fdisk -l $DISK 2>/dev/null | grep Solaris | sort -r | awk '{print $1}')
do
# echo "parted $DISK rm $PART"
parted -s $DISK rm $PART
done
done
#echo "parted $LUN1 rm 1 rm 9"
done
}
mach2_zfs_raidz1() {
zpool create $POOL \
raidz1 wwn-0x6000c500ae35ff4b0000000000000000 \
wwn-0x6000c500ae33d20f0000000000000000 \
wwn-0x6000c500ae33d20f0001000000000000 \
wwn-0x6000c500ae6b2ef30000000000000000 \
raidz1 wwn-0x6000c500ae33a4b30000000000000000 \
wwn-0x6000c500ae6b2d8f0000000000000000 \
wwn-0x6000c500ae38ae830000000000000000 \
wwn-0x6000c500ae2eff9f0000000000000000 \
raidz1 wwn-0x6000c500ae2f00bf0000000000000000 \
wwn-0x6000c500ae6b2a270000000000000000 \
wwn-0x6000c500ae178ae70000000000000000 \
wwn-0x6000c500ae33b91f0000000000000000 \
raidz1 wwn-0x6000c500ae35b3030000000000000000 \
wwn-0x6000c500ae35ff4b0001000000000000 \
wwn-0x6000c500ae6b2ef30001000000000000 \
wwn-0x6000c500ae33a4b30001000000000000 \
raidz1 wwn-0x6000c500ae6b2d8f0001000000000000 \
wwn-0x6000c500ae38ae830001000000000000 \
wwn-0x6000c500ae2eff9f0001000000000000 \
wwn-0x6000c500ae2f00bf0001000000000000 \
raidz1 wwn-0x6000c500ae6b2a270001000000000000 \
wwn-0x6000c500ae178ae70001000000000000 \
wwn-0x6000c500ae33b91f0001000000000000 \
wwn-0x6000c500ae35b3030001000000000000 \
-o feature@lz4_compress=disabled
}
mach2_zfs_raidz2() {
zpool create $POOL \
raidz2 wwn-0x6000c500ae35ff4b0000000000000000 \
wwn-0x6000c500ae33d20f0000000000000000 \
wwn-0x6000c500ae33d20f0001000000000000 \
wwn-0x6000c500ae6b2ef30000000000000000 \
raidz2 wwn-0x6000c500ae33a4b30000000000000000 \
wwn-0x6000c500ae6b2d8f0000000000000000 \
wwn-0x6000c500ae38ae830000000000000000 \
wwn-0x6000c500ae2eff9f0000000000000000 \
raidz2 wwn-0x6000c500ae2f00bf0000000000000000 \
wwn-0x6000c500ae6b2a270000000000000000 \
wwn-0x6000c500ae178ae70000000000000000 \
wwn-0x6000c500ae33b91f0000000000000000 \
raidz2 wwn-0x6000c500ae35b3030000000000000000 \
wwn-0x6000c500ae35ff4b0001000000000000 \
wwn-0x6000c500ae6b2ef30001000000000000 \
wwn-0x6000c500ae33a4b30001000000000000 \
raidz2 wwn-0x6000c500ae6b2d8f0001000000000000 \
wwn-0x6000c500ae38ae830001000000000000 \
wwn-0x6000c500ae2eff9f0001000000000000 \
wwn-0x6000c500ae2f00bf0001000000000000 \
raidz2 wwn-0x6000c500ae6b2a270001000000000000 \
wwn-0x6000c500ae178ae70001000000000000 \
wwn-0x6000c500ae33b91f0001000000000000 \
wwn-0x6000c500ae35b3030001000000000000 \
-o feature@lz4_compress=disabled
}
mach2_zfs_zmirror() {
zpool create tank \
mirror wwn-0x6000c500ae35ff4b0000000000000000 \
wwn-0x6000c500ae33d20f0000000000000000 \
mirror wwn-0x6000c500ae33d20f0001000000000000 \
wwn-0x6000c500ae6b2ef30000000000000000 \
mirror wwn-0x6000c500ae33a4b30000000000000000 \
wwn-0x6000c500ae6b2d8f0000000000000000 \
mirror wwn-0x6000c500ae38ae830000000000000000 \
wwn-0x6000c500ae2eff9f0000000000000000 \
mirror wwn-0x6000c500ae2f00bf0000000000000000 \
wwn-0x6000c500ae6b2a270000000000000000 \
mirror wwn-0x6000c500ae178ae70000000000000000 \
wwn-0x6000c500ae33b91f0000000000000000 \
mirror wwn-0x6000c500ae35b3030000000000000000 \
wwn-0x6000c500ae35ff4b0001000000000000 \
mirror wwn-0x6000c500ae6b2ef30001000000000000 \
wwn-0x6000c500ae33a4b30001000000000000 \
mirror wwn-0x6000c500ae6b2d8f0001000000000000 \
wwn-0x6000c500ae38ae830001000000000000 \
mirror wwn-0x6000c500ae2eff9f0001000000000000 \
wwn-0x6000c500ae2f00bf0001000000000000 \
mirror wwn-0x6000c500ae6b2a270001000000000000 \
wwn-0x6000c500ae178ae70001000000000000 \
mirror wwn-0x6000c500ae33b91f0001000000000000 \
wwn-0x6000c500ae35b3030001000000000000 \
-o feature@lz4_compress=disabled
}
# cache wwn-0x5000c500302dc95b \
# log wwn-0x5000c500302d4333
do_test() {
if [ ! -d log ]; then
mkdir log
fi
for config in 'mach2_zfs_raidz1' 'mach2_zfs_raidz2' 'mach2_zfs_zmirror'
do
rm_zfs_parts
$config
for JOBS in 1 2 4 8; do
for PAT in 'write' 'read' 'randrw' 'randread' 'randwrite'; do
for BLK in 4k 8k 16k 32k 64k 128k 256k 512k 1024k 2048k; do
BLKNAME=$(echo "00000$BLK" | grep -o '.....$')
echo "Running $PAT with block size $BLK against zfs pool \"$POOL\" with $JOBS jobs"
# fio --name="${config}-$PAT-$BLK" \
fio --directory=/$POOL/ \
--name="${config}" \
--rw=$PAT \
--group_reporting=1 \
--bs=$BLK \
--direct=1 \
--numjobs=$JOBS \
--time_based=1 \
--runtime=180 \
--iodepth=32 \
--ioengine=libaio \
--size=64G \
--output-format=json | tee "$PWD/log/${config}-$PAT-$BLKNAME-$JOBS.fio.json"
echo "Completed"
done
done
done
done
}
# fio fio/saturate.fio | tee log/saturate-zfs1-no-cache-8files-bs128k.log
# fio fio/saturate.fio | tee log/saturate-zfs2-no-cache-8files-bs128k.log
# fio fio/saturate.fio | tee log/saturate-zfs.mirror-no-cache-8files-bs128k.log
do_test