blob: 269e127052d21f5a4f02408cd84f4a18afdd90e3 [file] [log] [blame]
koder aka kdanilov3a6633e2015-03-26 18:20:00 +02001#!/bin/bash
2set -x
3
4TEST_FILE=$1
5OUT_FILE=$2
6NUM_CYCLES=7
7# TESTS_PER_CYCLE=9
8
9# COUNTER=0
10# (( NUM_TESTS=$NUM_CYCLES * $TESTS_PER_CYCLE))
11
12# function next() {
13# echo "Done $COUNTER tests from $NUM_TESTS"
14# (( COUNTER=$COUNTER + 1 ))
15# }
16
17function super_sync() {
18 sync
19 echo 3 > /proc/sys/vm/drop_caches
20}
21
22function run_tests(){
koder aka kdanilov94e3a2c2015-03-27 11:36:34 +020023
24 super_sync ; dd if=/dev/zero of=$TEST_FILE bs=1048576 count=10240
25
26 OPTS="--test-file $TEST_FILE --type fio --iodepth 1 --iosize 10G --timeout 15"
27 for cycle in $(seq 50) ; do
28 super_sync ; python io.py $OPTS -a randwrite --blocksize 4k -d --concurrency 1
29 done
30
31 echo "--------------------------------------------------------------------------------"
32
33 OPTS="--test-file $TEST_FILE --type fio --iodepth 1 --iosize 10G --timeout 30"
koder aka kdanilov3a6633e2015-03-26 18:20:00 +020034 OPERS="read write randread randwrite"
35 CONCS="1 4 8 64"
36 SIZES="4k 16k 64k 256k 1m 2m"
37
koder aka kdanilov3a6633e2015-03-26 18:20:00 +020038
39 for cycle in $(seq $NUM_CYCLES) ; do
40 for conc in $CONCS ; do
41 for bsize in $SIZES ; do
42 for operation in $OPERS ; do
43 super_sync ; python io.py $OPTS -a $operation --blocksize $bsize -d --concurrency $conc
44 done
45 done
46 done
47 done
48
49 for cycle in $(seq $NUM_CYCLES) ; do
50 for conc in $CONCS ; do
51 for operation in $OPERS ; do
52 super_sync ; python io.py $OPTS -a $operation --blocksize 4k -s --concurrency $conc
53 done
54 done
55 done
56
57 super_sync ; python io.py $OPTS -a write --blocksize 2m --concurrency 1
58 super_sync ; python io.py $OPTS -a write --blocksize 2m --concurrency 1
59 super_sync ; python io.py $OPTS -a write --blocksize 2m --concurrency 1
60
61 OPTS="--test-file $TEST_FILE --type fio --iodepth 1 --iosize 1G"
62 for cycle in $(seq $NUM_CYCLES) ; do
63 super_sync ; python io.py $OPTS -a randwrite --blocksize 4k -d --concurrency 1
64 done
65
66 OPTS="--test-file $TEST_FILE --type fio --iodepth 1 --iosize 10G"
67 # need to test different file sizes
68 # need to test different timeouts - maybe we can decrease test time
69}
70
71run_tests "$FILE_1" 2>&1 | tee "$OUT_FILE"
72
73