X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Facceptance-metadata-single.sh;h=685f9f4c7d90d793bc90d63a147a27cb41087837;hb=97622806dce34589735a2399f3c4fe56a684e836;hp=53774e57d02d34a17bb4c12bbbeb3b2dceb12e30;hpb=040033cef24c5aca2967daf2da7a862abcd074cf;p=fs%2Flustre-release.git diff --git a/lustre/tests/acceptance-metadata-single.sh b/lustre/tests/acceptance-metadata-single.sh index 53774e5..685f9f4 100644 --- a/lustre/tests/acceptance-metadata-single.sh +++ b/lustre/tests/acceptance-metadata-single.sh @@ -8,139 +8,146 @@ set -e SRCDIR="`dirname $0`" CREATE=$SRCDIR/create.pl +RENAME=$SRCDIR/rename.pl + +TIME=${TIME:-/usr/bin/time} + +display_elapsed_time() { + PREVIOUS_TS=$CURRENT_TS + CURRENT_TS=`date +%s` + BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS` + TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS` + + echo " " + echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds" + echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds" + echo " " +} debug_client_on() { - echo -1 > /proc/sys/portals/debug + lctl set_param -n debug=-1 } debug_client_off() { - echo 0 > /proc/sys/portals/debug + lctl set_param -n debug=0x3f0400 } MNT=${MNT:-/mnt/lustre} +# Get our initial timestamps. +START_TS=`date +%s` +CURRENT_TS=$START_TS +PREVIOUS_TS=$START_TS + debug_client_on echo "create.pl, 1 mount, 1 thread, 10 ops, debug on" -perl $CREATE -- $MNT -1 10 +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10 echo "create.pl, 1 mount, 1 thread, 100 ops, debug on" -perl $CREATE --silent -- $MNT -1 100 +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent echo "create.pl --mcreate=0, 1 mount, 1 thread, 10 ops, debug on" -perl $CREATE --mcreate=0 -- $MNT -1 10 +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10 --use_mcreate=0 echo "create.pl --mcreate=0, 1 mount, 1 thread, 100 ops, debug on" -perl $CREATE --mcreate=0 --silent -- $MNT -1 100 +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --use_mcreate=0 --silent echo "rename.pl, 1 mount, 1 thread, 10 ops, debug on" -perl rename.pl $MNT 10 +$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=10 echo "rename.pl, 1 mount, 1 thread, 100 ops, debug on" -perl rename.pl --silent $MNT 100 +$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent + +display_elapsed_time debug_client_off echo "create.pl, 1 mount, 1 thread, 1000 ops, debug off" -perl $CREATE --silent -- $MNT -1 1000 +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent echo "create.pl --mcreate=0, 1 mount, 1 thread, 1000 ops, debug off" -perl $CREATE --silent --mcreate=0 -- $MNT -1 1000 +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --use_mcreate=0 --silent echo "rename.pl, 1 mount, 1 thread, 1000 ops, debug off" -perl rename.pl --silent $MNT 1000 +$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent + +display_elapsed_time debug_client_on echo "create.pl, 1 mount, 2 threads, 100 ops, debug on" -perl $CREATE --silent -- $MNT -1 100 & -perl $CREATE --silent -- $MNT -1 100 & -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --silent echo "create.pl --mcreate=0, 1 mount, 2 threads, 100 ops, debug on" -perl $CREATE --silent --mcreate=0 -- $MNT -1 100 & -perl $CREATE --silent --mcreate=0 -- $MNT -1 100 & -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --use_mcreate=0 --silent echo "rename.pl, 1 mount, 2 thread, 1000 ops, debug on" -perl rename.pl --silent $MNT 1000 & -perl rename.pl --silent $MNT 1000 & -wait +$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --num_threads=2 --silent + +display_elapsed_time debug_client_off echo "create.pl, 1 mount, 2 threads, 2000 ops, debug off" -perl $CREATE --silent -- $MNT -1 2000 & -perl $CREATE --silent -- $MNT -1 2000 & -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent echo "create.pl --mcreate=0, 1 mount, 2 threads, 2000 ops, debug off" -perl $CREATE --silent --mcreate=0 -- $MNT -1 2000 & -perl $CREATE --silent --mcreate=0 -- $MNT -1 2000 & +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --use_mcreate=0 --silent wait echo "rename.pl, 1 mount, 2 threads, 2000 ops, debug off" -perl rename.pl --silent $MNT 2000 & -perl rename.pl --silent $MNT 2000 & -wait +$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent + +display_elapsed_time debug_client_on echo "create.pl, 1 mount, 4 threads, 100 ops, debug on" -for i in `seq 1 4`; do - perl $CREATE --silent -- $MNT -1 100 & -done -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --silent echo "create.pl --mcreate=0, 1 mount, 4 threads, 100 ops, debug on" -for i in `seq 1 4`; do - perl $CREATE --silent --mcreate=0 -- $MNT -1 100 & -done -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --use_mcreate=0 --silent echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug on" -for i in `seq 1 4`; do - perl rename.pl --silent $MNT 2000 & -done -wait +$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent + +display_elapsed_time debug_client_off echo "create.pl, 1 mount, 4 threads, 2000 ops, debug off" -for i in `seq 1 4`; do - perl $CREATE --silent -- $MNT -1 2000 & -done -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent echo "create.pl --mcreate=0, 1 mount, 4 threads, 2000 ops, debug off" -for i in `seq 1 4`; do - perl $CREATE --silent --mcreate=0 -- $MNT -1 2000 & -done -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --use_mcreate=0 --silent echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug off" -for i in `seq 1 4`; do - perl rename.pl --silent $MNT 2000 & -done -wait +$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent + +display_elapsed_time debug_client_on echo "create.pl, 1 mount, 8 threads, 500 ops, debug on" -for i in `seq 1 8`; do - perl $CREATE --silent -- $MNT -1 500 & -done -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8 --silent echo "create.pl --mcreate=0, 1 mount, 8 threads, 500 ops, debug on" -for i in `seq 1 8`; do - perl $CREATE --silent --mcreate=0 -- $MNT -1 500 & -done -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8 --use_mcreate=0 --silent echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug on" -for i in `seq 1 8`; do - perl rename.pl --silent $MNT 2000 & -done -wait +$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent + +display_elapsed_time debug_client_off echo "create.pl, 1 mount, 8 threads, 2000 ops, debug off" -for i in `seq 1 8`; do - perl $CREATE --silent -- $MNT -1 2000 & -done -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent echo "create.pl --mcreate=0, 1 mount, 8 threads, 2000 ops, debug off" -for i in `seq 1 8`; do - perl $CREATE --silent --mcreate=0 -- $MNT -1 2000 & -done -wait +$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --use_mcreate=0 --silent echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug off" -for i in `seq 1 8`; do - perl rename.pl --silent $MNT 2000 & -done -wait -sh rundbench 1 -sh rundbench 2 -sh rundbench 4 -sh rundbench 8 -sh rundbench 16 -sh rundbench 32 +$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent + +display_elapsed_time + +$TIME sh rundbench 1 + +display_elapsed_time + +$TIME sh rundbench 2 + +display_elapsed_time + +$TIME sh rundbench 4 + +display_elapsed_time + +$TIME sh rundbench 8 + +display_elapsed_time + +$TIME sh rundbench 16 + +display_elapsed_time + +$TIME sh rundbench 32 + +display_elapsed_time