48 lines
1.4 KiB
Bash
Executable file
48 lines
1.4 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
POOL=rbdbench
|
|
POOL_PG=4096
|
|
IMG_S=500G
|
|
R_T=60
|
|
TESTS="randwrite randread randrw"
|
|
BS_LST="4K 16K 64K 256K 1M 4M "
|
|
DEPTH_LST="1 2 4 8 16 32 64 128 256"
|
|
POOL_EXISTS=`ceph osd lspools | grep $POOL`
|
|
if [[ -z $POOL_EXISTS ]] ; then
|
|
# Crear el pool de benchmarks
|
|
ceph osd pool create $POOL $POOL_PG
|
|
ceph osd pool set $POOL pg_autoscale_mode off
|
|
ceph osd pool get $POOL pg_autoscale_mode
|
|
ceph osd pool set $POOL pg_num $POOL_PG
|
|
ceph osd pool get $POOL pg_num
|
|
ceph osd pool get $POOL pgp_num
|
|
ceph osd pool application enable $POOL rbd
|
|
ceph osd pool get $POOL size
|
|
ceph osd pool get $POOL min_size
|
|
fi
|
|
|
|
MY_HOST=`hostname | cut -d '.' -f 1 | cut -d '-' -f 3`
|
|
OUT_D=/output/ceph/$MY_HOST
|
|
mkdir -pv $OUT_D
|
|
FIO_PRM_CONST="-ioengine=rbd -name=test -runtime=$R_T -pool=$POOL"
|
|
|
|
for BS in $BS_LST ; do
|
|
# crear imagen de 100G
|
|
IMG="image-$MY_HOST-$BS"
|
|
echo "rbd create $IMG --size $IMG_S --pool $POOL --object-size $BS"
|
|
rbd create $IMG --size $IMG_S --pool $POOL --object-size $BS
|
|
FIO_PRM="$FIO_PRM_CONST -rbdname=$IMG "
|
|
for TEST in $TESTS ; do
|
|
for DEPTH in $DEPTH_LST ; do
|
|
echo
|
|
echo "BS: $BS TEST: $TEST DEPTH: $DEPTH"
|
|
OUT=$OUT_D/fio-$TEST-$BS-$DEPTH.out
|
|
#echo "fio $FIO_PRM --output=$OUT -rw=$TEST -bs=$BS -iodepth=$DEPTH"
|
|
fio $FIO_PRM --output=$OUT -rw=$TEST -bs=$BS -iodepth=$DEPTH
|
|
done
|
|
done
|
|
#echo "rbd remove $IMG --pool $POOL"
|
|
#rbd remove $IMG --pool $POOL
|
|
done
|
|
|
|
|