3 ###############################################################################
5 # This script runs first the RUBBoS browsing mix, then the read/write mix
6 # for each rubbos.properties_XX specified where XX is the number of emulated
7 # clients. Note that the rubbos.properties_XX files must be configured
8 # with the corresponding number of clients.
9 # In particular set the following variables in rubis.properties_XX:
10 # httpd_use_version = Servlets
11 # workload_number_of_clients_per_node = XX/number of client machines
12 # workload_transition_table = yourPath/RUBBoS/workload/transitions.txt
14 # This script should be run from the RUBBoS/bench directory on the local
16 # Results will be generated in the RUBBoS/bench directory.
18 ################################################################################
20 #setenv SERVLETDIR $RUBBOS_HOME/Servlets
22 # Go back to RUBBoS root directory
27 cp -fi ./workload/browse_only_transitions.txt ./workload/user_transitions.txt
28 cp -fi ./workload/browse_only_transitions.txt ./workload/author_transitions.txt
30 scp ./workload/browse_only_transitions.txt ${CLIENT1_HOST}:${RUBBOS_HOME}/workload/user_transitions.txt
31 scp ./workload/browse_only_transitions.txt ${CLIENT1_HOST}:${RUBBOS_HOME}/workload/author_transitions.txt
33 scp ./workload/browse_only_transitions.txt ${CLIENT2_HOST}:${RUBBOS_HOME}/workload/user_transitions.txt
34 scp ./workload/browse_only_transitions.txt ${CLIENT2_HOST}:${RUBBOS_HOME}/workload/author_transitions.txt
36 scp ./workload/browse_only_transitions.txt ${CLIENT3_HOST}:${RUBBOS_HOME}/workload/user_transitions.txt
37 scp ./workload/browse_only_transitions.txt ${CLIENT3_HOST}:${RUBBOS_HOME}/workload/author_transitions.txt
39 scp ./workload/browse_only_transitions.txt ${CLIENT4_HOST}:${RUBBOS_HOME}/workload/user_transitions.txt
40 scp ./workload/browse_only_transitions.txt ${CLIENT4_HOST}:${RUBBOS_HOME}/workload/author_transitions.txt
42 scp Client/rubbos.properties ${CLIENT1_HOST}:${RUBBOS_HOME}/Client/rubbos.properties
43 scp Client/rubbos.properties ${CLIENT2_HOST}:${RUBBOS_HOME}/Client/rubbos.properties
44 scp Client/rubbos.properties ${CLIENT3_HOST}:${RUBBOS_HOME}/Client/rubbos.properties
45 scp Client/rubbos.properties ${CLIENT4_HOST}:${RUBBOS_HOME}/Client/rubbos.properties
48 bench/flush_cache 490000
49 ssh $HTTPD_HOST "$RUBBOS_HOME/bench/flush_cache 880000" # web server
50 ssh $MYSQL1_HOST "$RUBBOS_HOME/bench/flush_cache 880000" # database server
51 ssh $TOMCAT1_HOST "$RUBBOS_HOME/bench/flush_cache 780000" # servlet server
52 ssh $CLIENT1_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client
53 ssh $CLIENT2_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client
54 ssh $CLIENT3_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client
55 ssh $CLIENT4_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client
59 current_seconds=`date +%s`
60 start_seconds=`echo \( $RAMPUP / 1000 \) + $current_seconds - 60 | bc`
61 SMI=`date -d "1970-01-01 $start_seconds secs UTC" +%Y%m%d%H%M%S`
62 end_seconds=`echo \( $RAMPUP / 1000 + $MI / 1000 + 30 \) + $current_seconds | bc`
63 EMI=`date -d "1970-01-01 $end_seconds secs UTC" +%Y%m%d%H%M%S`
64 ssh $BENCHMARK_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" &
65 ssh $CLIENT1_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" &
66 ssh $CLIENT2_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" &
67 ssh $CLIENT3_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" &
68 ssh $CLIENT4_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" &
69 ssh $HTTPD_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" &
70 ssh $TOMCAT1_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" &
71 ssh $MYSQL1_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" &