-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_md_aio
executable file
·129 lines (100 loc) · 3.47 KB
/
test_md_aio
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
. ./disable-power-saving.sh
DEVS="/dev/sdd /dev/sde /dev/sdf /dev/sdg"
DEVS_NUM=4
MDDEV=md0
function stop_md() {
mdadm --stop /dev/$MDDEV
}
function clear_devs() {
stop_md
for dev in $DEVS ; do
wipefs -a $dev >/dev/null
done
}
function create_md() { # $1 chunk
clear_devs
echo "Creating RAID over $DEVS with $1 chunk size."
mdadm -C -f -l 5 -n $DEVS_NUM -c $1 --assume-clean /dev/$MDDEV $DEVS
# mdadm -C -l 5 -n $DEVS_NUM -c $1 /dev/$MDDEV $DEVS
echo 1024 >/sys/block/$MDDEV/md/stripe_cache_size
sleep 2
udevadm settle
#cat /proc/mdstat
}
function reload_module() {
rmmod dm-crypt
insmod modules/$1/dm-crypt.ko || exit 1
}
function usage() {
echo "$0 <randseed> </absolute/path/to/fio/binary>" >&2
}
test $# -gt 1 || {
usage
exit 1
}
test -b /dev/$MDDEV && {
echo "Block dev exists"
usage
exit 1
}
BSIZE_LIST="512 4k 8k 16k 32k 64k 128k"
ITERATIONS=10
SIZE=1G
IOD_LIST="1 8 32 128 256"
PREFIX_DIR=/root/okozina
LOG_DIR=$PREFIX_DIR/logs/test_md_aio_okozina+
#job=0004_job_iodepth_thread
job=0005_job_iodept_thread_time_based
BDEV_SIZE="90%"
disable_cpu_throttling
for prefix in no_patch no_percpu use_per_bio_data dont_alloc_to_remove_io_pending unbound offload sort ; do
reload_module $prefix
cd 1
numj=1
for chunk in 64 512 ; do
for iodepth in $IOD_LIST ; do
modelist="write"
for bsize in $BSIZE_LIST; do
create_md $chunk
./test-disk.sh --dev /dev/$MDDEV --debug --randseed $1 --iterations $ITERATIONS --job $job \
--jobdir $PREFIX_DIR/dmcrypt-tests/1/jobs \
--log $LOG_DIR/numj_$numj/md_$chunk/iodepth_$iodepth/${modelist/ /_}_seq/bsize_$bsize/log_"$prefix" \
--modelist "$modelist" --ioengine libaio --fio $2 --ramp_time 1 --numjobs $numj \
--size $BDEV_SIZE --io_limit $SIZE --bsize $bsize --iodepth $iodepth --iodepth_batch_complete 0
done
modelist="randwrite"
for bsize in $BSIZE_LIST; do
create_md $chunk
./test-disk.sh --dev /dev/$MDDEV --debug --randseed $1 --iterations $ITERATIONS --job $job \
--jobdir $PREFIX_DIR/dmcrypt-tests/1/jobs \
--log $LOG_DIR/numj_$numj/md_$chunk/iodepth_$iodepth/${modelist/ /_}_seq/bsize_$bsize/log_"$prefix" \
--modelist "$modelist" --ioengine libaio --fio $2 --ramp_time 1 --numjobs $numj \
--size $BDEV_SIZE --io_limit $SIZE --bsize $bsize --balign $bsize --iodepth $iodepth \
--iodepth_batch_complete 0
done
modelist="read"
for bsize in $BSIZE_LIST; do
create_md $chunk
./test-disk.sh --dev /dev/$MDDEV --debug --randseed $1 --iterations $ITERATIONS --job $job \
--jobdir $PREFIX_DIR/dmcrypt-tests/1/jobs \
--log $LOG_DIR/numj_$numj/md_$chunk/iodepth_$iodepth/${modelist/ /_}_seq/bsize_$bsize/log_"$prefix" \
--modelist "$modelist" --ioengine libaio --fio $2 --ramp_time 1 --numjobs $numj \
--size $BDEV_SIZE --io_limit $SIZE --bsize $bsize --iodepth $iodepth --iodepth_batch_complete 0
done
modelist="randread"
for bsize in $BSIZE_LIST; do
create_md $chunk
./test-disk.sh --dev /dev/$MDDEV --debug --randseed $1 --iterations $ITERATIONS --job $job \
--jobdir $PREFIX_DIR/dmcrypt-tests/1/jobs \
--log $LOG_DIR/numj_$numj/md_$chunk/iodepth_$iodepth/${modelist/ /_}_seq/bsize_$bsize/log_"$prefix" \
--modelist "$modelist" --ioengine libaio --fio $2 --ramp_time 1 --numjobs $numj \
--size $BDEV_SIZE --io_limit $SIZE --bsize $bsize --balign $bsize --iodepth $iodepth \
--iodepth_batch_complete 0
done
done
done
cd ..
done
clear_devs
enable_cpu_throttling