From 0581e3afd6b525635cf251a5bd9fa16a34f2bbb9 Mon Sep 17 00:00:00 2001 From: adash Date: Fri, 27 Feb 2009 01:39:58 +0000 Subject: [PATCH] add script for running jvm and java versions of dc-1 through dc-8 --- .../Benchmarks/Distributed/bmserverjava.txt | 1 + .../Benchmarks/Distributed/bmserverjvm.txt | 1 + Robust/src/Benchmarks/Distributed/run.sh | 76 +++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 Robust/src/Benchmarks/Distributed/bmserverjava.txt create mode 100644 Robust/src/Benchmarks/Distributed/bmserverjvm.txt create mode 100755 Robust/src/Benchmarks/Distributed/run.sh diff --git a/Robust/src/Benchmarks/Distributed/bmserverjava.txt b/Robust/src/Benchmarks/Distributed/bmserverjava.txt new file mode 100644 index 00000000..1f26bfae --- /dev/null +++ b/Robust/src/Benchmarks/Distributed/bmserverjava.txt @@ -0,0 +1 @@ +LookUpService/java:./Server.bin:-N 1 -nObj 160 diff --git a/Robust/src/Benchmarks/Distributed/bmserverjvm.txt b/Robust/src/Benchmarks/Distributed/bmserverjvm.txt new file mode 100644 index 00000000..cedc4edd --- /dev/null +++ b/Robust/src/Benchmarks/Distributed/bmserverjvm.txt @@ -0,0 +1 @@ +LookUpService/jvm:java LookUpServerExample:-nObj 160 diff --git a/Robust/src/Benchmarks/Distributed/run.sh b/Robust/src/Benchmarks/Distributed/run.sh new file mode 100755 index 00000000..a9623825 --- /dev/null +++ b/Robust/src/Benchmarks/Distributed/run.sh @@ -0,0 +1,76 @@ +#!/bin/sh -x +LOGDIR=~/research/Robust/src/Benchmarks/Distributed/runlog +function run { + i=0; + DIR=`pwd` + NEWDIR=${DIR}/$2 + while [ $i -lt $1 ]; do + echo "$DIR" > ~/.tmpdir + if [ "$4" != "java" ]; then + echo "java LookUpClient -nObjs 160 -numTrans 1000 -probRead 96 -nLookUp 10" > `cat ~/.runbm` + else + echo "./Client.bin -nObjs 160 -numTrans 1000 -probRead 96 -nLookUp 10" > `cat ~/.runbm` + fi + + j=1; + while [ $j -le $NUM_MACHINES ]; do + #Start the server + #cd $2 + cd ${DIR}/$2 + /usr/bin/time -f "%e" $3 -N $j -nObjs 160 2> ${LOGDIR}/server_${3}_${j}_${4}.txt & + # Start the clients + k=0; + while [ $k -lt $j ]; do + cli=`expr $k + 2` + echo "SSH into dc-${cli}" + ssh dc-${cli}.calit2.uci.edu 'cd `cat ~/.tmpdir; ~/.runbm' & + k=`expr $k + 1` + done + j=`expr $j + 1` + done + i=`expr $i + 1` + done +} + +benchmarks=LookUpService +NUM_MACHINES=2 + +for b in `echo $benchmarks` +do + bm=`grep $b bmserverjava.txt` + JAVA_DIR=`echo $bm | cut -f1 -d":"` + JAVA_BIN=`echo $bm | cut -f2 -d":"` + JAVA_ARGS=`echo $bm | cut -f3 -d":"` + run 1 $JAVA_DIR $JAVA_BIN java + + echo --------Move up to parent directory-------------- + cd ../../ + + bm=`grep $b bmserverjvm.txt` + JVM_DIR=`echo $bm | cut -f1 -d":"` + JVM_BIN=`echo $bm | cut -f2 -d":"` + JVM_ARGS=`echo $bm | cut -f3 -d":"` + run 1 $JVM_DIR $JVM_BIN jvm +done + +#BASEDIR=LookUpService +#echo "---------- Running benchmarks ---------- " +#for dir in java jvm +#do +# cd $BASEDIR/$dir +# echo '$BASEDIR/$dir' +# runbm +# cd - +#done + + +#----------Calulates the averages ----------- +#for file in `ls runlog/*.txt` +#do +# echo -n $file >> average.txt +# cat $file | grep -v "^Command" | awk '{sum += $1} END {print " "sum/NR}' >> average.txt +#done +#echo "===========" >> average.txt +#echo "" >> average.txt + +#echo "done" -- 2.34.1