@@ -67,7 +67,10 @@ echo "*** test"
for l in 0 1 2 3 4
do
echo " *** test $l"
- $FSSTRESS_PROG -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID >>$seq.full
+ NUM=$((1000 * TIME_FACTOR))
+ CPU=$((1 * LOAD_FACTOR))
+ $FSSTRESS_PROG -d $SCRATCH_MNT -n $NUM -p $CPU \
+ $FSSTRESS_AVOID >>$seq.full
_scratch_mount -o remount,ro \
|| _fail "remount ro failed"
@@ -75,8 +75,8 @@ touch $tmp.running
STRESS_DIR="$SCRATCH_MNT/fsstress_test_dir"
mkdir "$STRESS_DIR"
- procs=2
- nops=200
+ procs=$((2 * LOAD_FACTOR))
+ nops=$((200 * TIME_FACTOR))
while [ -f "$tmp.running" ]
do
# We do both read & write IO - not only is this more realistic,
@@ -62,7 +62,9 @@ $FSSTRESS_PROG \
-f unresvsp=0 \
-f attr_set=100 \
-f attr_remove=100 \
- -p 1 -n 10000 -S c >$seq.full 2>&1
+ -p $((LOAD_FACTOR)) \
+ -n $((10000 * TIME_FACTOR)) \
+ -S c >$seq.full 2>&1
status=$?
exit
@@ -74,7 +74,10 @@ echo "*** test concurrent block/fs access"
cat $SCRATCH_DEV >/dev/null &
pid=$!
-$FSSTRESS_PROG -d $SCRATCH_MNT -p 2 -n 2000 $FSSTRESS_AVOID >>$seq.full
+num=$((2000 * TIME_FACTOR))
+proc=$((2 * LOAD_FACTOR))
+
+$FSSTRESS_PROG -d $SCRATCH_MNT -p $proc -n $num $FSSTRESS_AVOID >>$seq.full
_lets_get_pidst
_check_scratch_fs
@@ -66,8 +66,8 @@ workout()
{
fsz=$1
ags=$2
- procs=$3
- nops=$4
+ procs=$(($3 * LOAD_FACTOR))
+ nops=$(($4 * TIME_FACTOR))
umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seq.full
@@ -43,11 +43,13 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
_do_meta()
{
out=$SCRATCH_MNT/fsstress
- count=10000
- param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
+ count=$((10000 * TIME_FACTOR))
+ proc=$((4 * LOAD_FACTOR))
+ param="-z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
-f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
- _echofull "calling fsstress $param -m8 -n $count"
- if ! $FSSTRESS_PROG $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$seq.full 2>&1
+ _echofull "calling fsstress $param -m8 -p $proc -n $count"
+ if ! $FSSTRESS_PROG $param $FSSTRESS_AVOID -m 8 -p $proc \
+ -n $count -d $out >>$seq.full 2>&1
then
_echofull "fsstress failed"
fi
@@ -61,8 +61,8 @@ _fill_scratch()
_stress_scratch()
{
- procs=3
- nops=1000
+ procs=$((3 * LOAD_FACTOR))
+ nops=$((1000 * TIME_FACTOR))
# -w ensures that the only ops are ones which cause write I/O
$FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID > /dev/null &
}
@@ -245,12 +245,13 @@ _test_fsstress()
echo ""
out=$SCRATCH_MNT/fsstress.$$
- count=1000
+ count=$((1000 * TIME_FACTOR))
+ proc=$((3 * LOAD_FACTOR))
args="-z \
-f rmdir=10 -f link=10 -f creat=10 \
-f mkdir=10 -f rename=30 -f unlink=10 \
-f symlink=10 \
--n $count -d $out -p 3"
+-n $count -d $out -p $proc"
echo "fsstress $args" | sed -e "s#$out#outdir#"
if ! $FSSTRESS_PROG $args | _filter_num
@@ -42,8 +42,8 @@ _cleanup()
workout()
{
- procs=100
- nops=15000
+ procs=$((100 * LOAD_FACTOR))
+ nops=$((15000 * TIME_FACTOR))
$FSSTRESS_PROG -d $SCRATCH_MNT -p $procs -n $nops $FSSTRESS_AVOID \
>>$seq.full &
sleep 2
@@ -53,8 +53,9 @@ _fsstress()
echo ""
out=$SCRATCH_MNT/fsstress.$$
- count=2000
- args="-n $count -d $out -p 7"
+ count=$((2000*TIME_FACTOR))
+ CPU=$((7 * LOAD_FACTOR))
+ args="-n $count -d $out -p $CPU"
echo "fsstress $args" | tee -a $here/$seq.full | sed -e "s#$out#outdir#"
if ! $FSSTRESS_PROG $args | tee -a $here/$seq.full | _filter_num
@@ -57,11 +57,12 @@ _fsstress()
echo ""
out=$SCRATCH_MNT/fsstress.$$
- count=5000
+ count=$((5000 * TIME_FACTOR))
+ proc=$((7 * LOAD_FACTOR))
args="-z \
-f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 \
-f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
--n $count -d $out -p 7"
+-n $count -d $out -p $proc"
echo "fsstress $args" | tee -a $here/$seq.full | sed -e "s#$out#outdir#"
if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $here/$seq.full | _filter_num
@@ -42,10 +42,11 @@ _workout()
echo ""
echo "Run fsstress"
echo ""
- num_iterations=10
- enospc_time=2
+ num_iterations=$((10 * TIME_FACTOR))
+ enospc_time=$((2 * TIME_FACTOR))
+ proc=$((128 * LOAD_FACTOR))
out=$SCRATCH_MNT/fsstress.$$
- args="-p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out"
+ args="-p $proc -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out"
echo "fsstress $args" >> $here/$seq.full
$FSSTRESS_PROG $args > /dev/null 2>&1 &
pid=$!
@@ -45,10 +45,11 @@ _workout()
echo ""
echo "Run fsstress"
echo ""
- num_iterations=10
- enospc_time=2
+ num_iterations=$((10 * TIME_FACTOR))
+ enospc_time=$((2 * TIME_FACTOR))
+ proc=$((128 * LOAD_FACTOR))
out=$SCRATCH_MNT/fsstress.$$
- args="-p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out"
+ args="-p$proc -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out"
echo "fsstress $args" >> $here/$seq.full
# Grant chown capability
cp $FSSTRESS_PROG $tmp.fsstress.bin
@@ -175,7 +175,8 @@ workout()
{
fsz=$1
nfiles=$2
- procs=$3
+ procs=$(($3 * LOAD_FACTOR))
+ num=$((1000* TIME_FACTOR))
snap_name=$4
umount $SCRATCH_DEV >/dev/null 2>&1
@@ -185,8 +186,8 @@ workout()
|| _fail "size=$fsz mkfs failed"
run_check _scratch_mount
# -w ensures that the only ops are ones which cause write I/O
- run_check $FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n 1000 \
- $FSSTRESS_AVOID
+ run_check $FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $num \
+ $FSSTRESS_AVOID
run_check $BTRFS_UTIL_PROG subvol snap $SCRATCH_MNT \
$SCRATCH_MNT/$snap_name
@@ -196,13 +197,13 @@ workout()
# make some noise but ensure we're not touching existing data
# extents.
- run_check $FSSTRESS_PROG -d $SCRATCH_MNT -p $procs -n 2000 \
+ run_check $FSSTRESS_PROG -d $SCRATCH_MNT -p $procs -n $((num*2)) \
-z -f chown=3 -f link=1 -f mkdir=2 -f mknod=2 \
-f rename=2 -f setxattr=1 -f symlink=2
clean_dir="$SCRATCH_MNT/next"
mkdir $clean_dir
# now make more files to get a higher tree
- run_check $FSSTRESS_PROG -d $clean_dir -w -p $procs -n 2000 \
+ run_check $FSSTRESS_PROG -d $clean_dir -w -p $procs -n $((num*2)) \
$FSSTRESS_AVOID
run_check umount $SCRATCH_DEV >/dev/null 2>&1
run_check _scratch_mount "-o atime"
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> --- 017 | 5 ++++- 068 | 4 ++-- 070 | 4 +++- 076 | 5 ++++- 083 | 4 ++-- 087 | 10 ++++++---- 104 | 4 ++-- 114 | 5 +++-- 167 | 4 ++-- 232 | 5 +++-- 233 | 5 +++-- 269 | 7 ++++--- 270 | 7 ++++--- 276 | 11 ++++++----- 14 files changed, 48 insertions(+), 32 deletions(-)