Richard Crane wrote:
> 
> Can someone give an annotated example of the arguments to bonnie++ ?
> 

I use the follwing script to generate some I/O-load on the raid device.
Don't comment on the style of the script :-)

#!/bin/sh

# for parameters see bonnie options:
#  [-d scratch-dir] [-s size(Mb)[:chunk-size(b)]]
#  [-n number-to-stat[:max-size[:min-size][:num-directories]]]
#  [-m machine-name]
#  [-r ram-size-in-Mb]
#  [-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use]
#  [-q] [-f] [-b] [-p processes | -y]

MACHINE="www-neu"
RAM="320"
DIR="/mnt"
USER="nobody"
#S="0"
#S="100"
S_1="1024"
S_2="768"
S_3="1024"
S_4="768"
S_5="2047"
#N="1:4096:512:1"
N_1="100:4096:512:1"
N_2="1:10240:4096:5"
N_3="1:6553600:1638400:1"
N_4="1:4096:512:10"
N_5="1:8192:4096:10"
#N="0"
P="5"
#P="1"
X="20000"
SYNC="no"

###########################
# nothing to config below #
###########################

if [ "$SYNC" = "yes" ]; then
        B="-b"
else
        B=""
fi

if [ $P -gt 1 ]; then
        Y="-y"

        # create semaphore
        #bonnie++ -d $DIR -u $USER -s $S -n $N -m "$MACHINE" -r $RAM $B -x $X -p $P
        bonnie++ -d $DIR -u $USER -p $P
fi

# clean up
echo -n cleaning up...
killall -q -KILL bonnie++
rm -f out-*-{1,2}
rm -fvR $DIR/Bonnie*
echo done.

# start real processes
I=1; while [ $I -le $P ]; do 
        echo spanning subprocess nr. $I
        eval P_S=\$S_$I
        eval P_N=\$N_$I
        
        [ -n "$P_S" ] && S=$P_S
        [ -n "$P_N" ] && N=$P_N
        
        bonnie++ -d $DIR -u $USER -s $S -n $N -m "$MACHINE" -r $RAM $B -x $X $Y > 
out-$I-1 2> out-$I-2 &
        I=`expr $I + 1`
done

 
MfG / Regards
Friedrich Lobenstock
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to