koder aka kdanilov | 3a6633e | 2015-03-26 18:20:00 +0200 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | set -x |
| 3 | |
| 4 | TEST_FILE=$1 |
| 5 | OUT_FILE=$2 |
| 6 | NUM_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 | |
| 17 | function super_sync() { |
| 18 | sync |
| 19 | echo 3 > /proc/sys/vm/drop_caches |
| 20 | } |
| 21 | |
| 22 | function run_tests(){ |
| 23 | OPTS="--test-file $TEST_FILE --type fio --iodepth 1 --iosize 10G" |
| 24 | OPERS="read write randread randwrite" |
| 25 | CONCS="1 4 8 64" |
| 26 | SIZES="4k 16k 64k 256k 1m 2m" |
| 27 | |
| 28 | # num cycles = 6 * 4 * 7 * 4 + 7 * 4 * 4 == 784 == 13 hours |
| 29 | |
| 30 | super_sync ; dd if=/dev/zero of=$TEST_FILE bs=1048576 count=10240 |
| 31 | |
| 32 | for cycle in $(seq $NUM_CYCLES) ; do |
| 33 | for conc in $CONCS ; do |
| 34 | for bsize in $SIZES ; do |
| 35 | for operation in $OPERS ; do |
| 36 | super_sync ; python io.py $OPTS -a $operation --blocksize $bsize -d --concurrency $conc |
| 37 | done |
| 38 | done |
| 39 | done |
| 40 | done |
| 41 | |
| 42 | for cycle in $(seq $NUM_CYCLES) ; do |
| 43 | for conc in $CONCS ; do |
| 44 | for operation in $OPERS ; do |
| 45 | super_sync ; python io.py $OPTS -a $operation --blocksize 4k -s --concurrency $conc |
| 46 | done |
| 47 | done |
| 48 | done |
| 49 | |
| 50 | super_sync ; python io.py $OPTS -a write --blocksize 2m --concurrency 1 |
| 51 | super_sync ; python io.py $OPTS -a write --blocksize 2m --concurrency 1 |
| 52 | super_sync ; python io.py $OPTS -a write --blocksize 2m --concurrency 1 |
| 53 | |
| 54 | OPTS="--test-file $TEST_FILE --type fio --iodepth 1 --iosize 1G" |
| 55 | for cycle in $(seq $NUM_CYCLES) ; do |
| 56 | super_sync ; python io.py $OPTS -a randwrite --blocksize 4k -d --concurrency 1 |
| 57 | done |
| 58 | |
| 59 | OPTS="--test-file $TEST_FILE --type fio --iodepth 1 --iosize 10G" |
| 60 | # need to test different file sizes |
| 61 | # need to test different timeouts - maybe we can decrease test time |
| 62 | } |
| 63 | |
| 64 | run_tests "$FILE_1" 2>&1 | tee "$OUT_FILE" |
| 65 | |
| 66 | |