4 #########################################################################
5 # Runs create.pl on a single mountpoint and directory with increasing
6 # load across multiple clients.
7 #########################################################################
9 LUSTRE=${LUSTRE:-`dirname $0`/..}
10 LTESTDIR=${LTESTDIR:-$LUSTRE/../ltest}
11 PATH=$LUSTRE/utils:$LUSTRE/tests:$PATH
13 RLUSTRE=${RLUSTRE:-$LUSTRE}
16 . $LUSTRE/tests/test-framework.sh
18 TIME=${TIME:-/usr/bin/time}
19 PDSH=${PDSH:-"pdsh -S -w"}
20 MOUNTPT=${MOUNTPT:-"/mnt/lustre"}
22 CREATE=$LUSTRE/tests/create.pl
23 RENAME=$LUSTRE/tests/rename.pl
25 [ -z "$CLIENTS" ] && exit 1
26 #CLIENTS=`comma_list $CLIENTS`
28 display_elapsed_time() {
29 PREVIOUS_TS=$CURRENT_TS
31 BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS`
32 TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS`
35 echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds"
36 echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds"
42 $PDSH $CLIENTS "echo $1 > /proc/sys/portals/debug"
50 debug_client_partial()
52 set_debug_level 0x3f0400
60 # Get our initial timestamps.
67 echo "create.pl, 1 mount, 1 thread, 1000 ops"
68 $TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=1000 --silent"
69 #echo "create.pl --mcreate=0, 1 mount, 1 thread, 1000 ops, debug off"
70 #$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=1000 --use_mcreate=0 --silent"
72 #echo "rename.pl, 1 mount, 1 thread, 1000 ops, debug off"
73 #$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=1000 --silent"
77 echo "create.pl, 1 mount, 2 threads, 2000 ops, debug off"
78 $TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent"
79 #echo "create.pl --mcreate=0, 1 mount, 2 threads, 2000 ops, debug off"
80 #$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=2 --use_mcreate=0 --silent"
82 #echo "rename.pl, 1 mount, 2 threads, 2000 ops, debug off"
83 #$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent#
87 echo "create.pl, 1 mount, 4 threads, 2000 ops, debug off"
88 $TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent"
89 #echo "create.pl --mcreate=0, 1 mount, 4 threads, 2000 ops, debug off"
90 #$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=4 --use_mcreate=0 --silent"
92 #echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug off"
93 #$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent"
97 echo "create.pl, 1 mount, 8 threads, 2000 ops, debug off"
98 $TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent"
99 #echo "create.pl --mcreate=0, 1 mount, 8 threads, 2000 ops, debug off"
100 #$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=8 --use_mcreate=0 --silent"
102 #echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug off"
103 #$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent"