- local numfiles=10000
- local i=0
- local time1
- local time2
- local time3
- local dir=$POOL_ROOT/dir
- local stat
- local diff
-
- time1=$(create_perf $dir $numfiles)
-
- create_pool_nofail $POOL
-
- add_pool $POOL $TGT_ALL "$TGT_UUID"
-
- create_dir $dir $POOL
- time2=$(create_perf $dir $numfiles)
-
- destroy_pool $POOL
-
- time3=$(create_perf $dir $numfiles)
-
- echo Time taken for $numfiles creates without pools: $time1
- echo Time taken for $numfiles creates with pools: $time2
- echo Time taken for $numfiles creates without pools: $time3
-
- deg=$(echo "scale=2; (($time2 - $time3) * 100 / $time3) > 5" | bc)
- diff=$(echo "scale=2; ($time2 - $time3) * 100 / $time3" | bc)
+ local numfiles=30000
+ local plaindir=$POOL_ROOT/plaindir
+ local pooldir=$POOL_ROOT/pooldir
+ local t1=0
+ local t2=0
+ local t3=0
+ local diff
+
+ for i in $(seq 1 3);
+ do
+ echo "Create performance, iteration $i, $numfiles files x 3"
+
+ time1=$(create_perf $plaindir $numfiles)
+ echo "iter $i: $numfiles creates without pool: $time1"
+ t1=$(echo "scale=2; $t1 + $time1" | bc)
+
+ create_pool_nofail $POOL > /dev/null
+ add_pool $POOL $TGT_ALL "$TGT_UUID" > /dev/null
+ create_dir $pooldir $POOL
+ time2=$(create_perf $pooldir $numfiles)
+ echo "iter $i: $numfiles creates with pool: $time2"
+ t2=$(echo "scale=2; $t2 + $time2" | bc)
+
+ destroy_pool $POOL > /dev/null
+ time3=$(create_perf $pooldir $numfiles)
+ echo "iter $i: $numfiles creates with missing pool: $time3"
+ t3=$(echo "scale=2; $t3 + $time3" | bc)
+
+ echo
+ done
+
+ time1=$(echo "scale=2; $t1 / $i" | bc)
+ echo Avg time taken for $numfiles creates without pool: $time1
+ time2=$(echo "scale=2; $t2 / $i" | bc)
+ echo Avg time taken for $numfiles creates with pool: $time2
+ time3=$(echo "scale=2; $t3 / $i" | bc)
+ echo Avg time taken for $numfiles creates with missing pool: $time3
+
+ # Set this high until we establish a baseline for what the degradation
+ # is / should be
+ max=30
+ diff=$(echo "scale=2; ($time2 - $time1) * 100 / $time1" | bc)
+ echo "No pool to wide pool: $diff %."
+ deg=$(echo "scale=2; $diff > $max" | bc)
+ [ "$deg" == "1" ] && error_ignore 23408 "Degradation with wide pool is $diff % (> $max %)"
+
+ max=15
+ diff=$(echo "scale=2; ($time3 - $time1) * 100 / $time1" | bc)
+ echo "No pool to missing pool: $diff %."
+ deg=$(echo "scale=2; $diff > $max" | bc)
+ [ "$deg" == "1" ] && error_ignore 23408 "Degradation with missing pool is $diff % (> $max %)"