Author: manik.surtani(a)jboss.com
Date: 2008-01-24 09:31:25 -0500 (Thu, 24 Jan 2008)
New Revision: 5225
Added:
benchmarks/benchmark-fwk/trunk/bindAddress.sh
Modified:
benchmarks/benchmark-fwk/trunk/cluster.sh
benchmarks/benchmark-fwk/trunk/runNode.sh
Log:
Added: benchmarks/benchmark-fwk/trunk/bindAddress.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/bindAddress.sh (rev 0)
+++ benchmarks/benchmark-fwk/trunk/bindAddress.sh 2008-01-24 14:31:25 UTC (rev 5225)
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+### Set your bind address for the tests to use. Could be an IP, host name or a reference
to an environment variable.
+BIND_ADDRESS=${MYTESTIP_4}
+
Modified: benchmarks/benchmark-fwk/trunk/cluster.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/cluster.sh 2008-01-24 14:17:55 UTC (rev 5224)
+++ benchmarks/benchmark-fwk/trunk/cluster.sh 2008-01-24 14:31:25 UTC (rev 5225)
@@ -27,8 +27,6 @@
# Number of servers to launch on - taken from the command line.
NUM_SERVERS=${4}
-USER_JVM_PARAMS=${5}
-
COMMAND=${1}
# the DNS domain of your servers
@@ -45,7 +43,7 @@
do
server="${HOSTNAMES[idx]}"
echo Starting CacheBenchmarkFramework on host ${server}
- ssh ${SSH_USER}(a)${server}.${DOMAIN} ". .bash_profile && cd
${CACHE_BENCHMARK_HOME} && ./runNode.sh ${idx} ${CACHE_DIST} ${CFG_FILE}
${NUM_SERVERS} ${USER_JVM_PARAMS}"
+ ssh ${SSH_USER}(a)${server}.${DOMAIN} ". .bash_profile && cd
${CACHE_BENCHMARK_HOME} && ./runNode.sh ${idx} ${CACHE_DIST} ${CFG_FILE}
${NUM_SERVERS}"
sleep 2
done
;;
@@ -55,14 +53,13 @@
server="${HOSTNAMES[idx]}"
echo Stopping CacheBenchmarkFramework on host ${server}
ssh ${SSH_USER}(a)${server}.${DOMAIN} "cd ${CACHE_BENCHMARK_HOME}
&& ./killNode.sh &"
- sleep 2
done
;;
*)
- echo "Usage: ${0} [start | stop] [cache distribution to test] [name of
configuration file to use] [number of servers to launch on] [optional JVM params]"
+ echo "Usage: ${0} [start | stop] [cache distribution to test] [name of
configuration file to use] [number of servers to launch on]"
echo
echo "Example:"
- echo " ${0} start jbosscache-2.0.0 repl_async.xml 6
\"-Dbind.address=1.2.3.4 -Dxyz=abc\""
+ echo " ${0} start jbosscache-2.0.0 repl_async.xml 6"
echo " ${0} stop"
echo " Note that the stop command will stop all instances on all
configured hosts"
;;
Modified: benchmarks/benchmark-fwk/trunk/runNode.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/runNode.sh 2008-01-24 14:17:55 UTC (rev 5224)
+++ benchmarks/benchmark-fwk/trunk/runNode.sh 2008-01-24 14:31:25 UTC (rev 5225)
@@ -4,12 +4,11 @@
# those would make an automatic conversion from unix CLASSPATH to win classpath, needed
when executing java -cp
preferIPv4Stack=true
-DEBUG=false
+DEBUG=true
CURRENT_INDEX=${1}
CACHE_PRODUCT=${2}
TEST_CFG=${3}
CLUSTER_SIZE=${4}
-USER_JVM_PARAMS=${5}
PIDFILE="PID.pid"
if [ -e ${PIDFILE} ]
then
@@ -29,12 +28,11 @@
then
echo Usage:
echo
- echo ./runNode.sh [current node index] [cache product to test] [test config file]
[cluster size] [JVM params - optional]
+ echo ./runNode.sh [current node index] [cache product to test] [test config file]
[cluster size]
echo param [current node index] : the index of this node in the list of nodes in
the cluster [0 .. <cluster size> - 1]
echo param [cache product to test] : must be one of the directories names under
'./cache-products'
echo param [test config file] : configuration file to use with the cache product.
Typically resides in './cache-products/XXX/conf/'
echo param [cluster size] : total number of nodes that will run tests.
- echo param [JVM params] : an optional extra set of parameters to be passed
to the JVM - e.g., "-Dbind.address=127.0.0.1 -Dxyz=abc"
echo
echo Example: './runNode.sh 0 jbosscache-2.0.0 repl_async.xml 3' will start
the 1st node running an instance of jbc2.0.0 on a cluster made out of 3 nodes, using the
repl_async configuration.
exit 1
@@ -60,7 +58,9 @@
exit 2
fi
-JVM_OPTIONS="${JVM_OPTIONS} ${USER_JVM_PARAMS}
-DcacheBenchFwk.cacheConfigFile=${TEST_CFG} -DcurrentIndex=${CURRENT_INDEX}
-DclusterSize=${CLUSTER_SIZE} -DcurrentIndex=${CURRENT_INDEX}
-Djava.net.preferIPv4Stack=${preferIPv4Stack}"
+. ./bindAddress.sh
+
+JVM_OPTIONS="${JVM_OPTIONS} -Dbind.address=${BIND_ADDRESS}
-DcacheBenchFwk.cacheConfigFile=${TEST_CFG} -DcurrentIndex=${CURRENT_INDEX}
-DclusterSize=${CLUSTER_SIZE} -DcurrentIndex=${CURRENT_INDEX}
-Djava.net.preferIPv4Stack=${preferIPv4Stack}"
TO_EXECUTE="java $JVM_OPTIONS -cp $CLASSPATH
org.cachebench.CacheBenchmarkRunner"
if [ "$DEBUG" = "debug" ]
Show replies by date