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(){ |
koder aka kdanilov | 94e3a2c | 2015-03-27 11:36:34 +0200 | [diff] [blame] | 23 | |
| 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 kdanilov | 3a6633e | 2015-03-26 18:20:00 +0200 | [diff] [blame] | 34 | OPERS="read write randread randwrite" |
| 35 | CONCS="1 4 8 64" |
| 36 | SIZES="4k 16k 64k 256k 1m 2m" |
| 37 | |
koder aka kdanilov | 3a6633e | 2015-03-26 18:20:00 +0200 | [diff] [blame] | 38 | |
| 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 | |
| 71 | run_tests "$FILE_1" 2>&1 | tee "$OUT_FILE" |
| 72 | |
| 73 | |