Mercurial > hg > Members > nobuyasu > jungle_benchmark
changeset 10:f94fc7812cd8
Modified benchmark program
author | Nobuyasu |
---|---|
date | Fri, 17 Jan 2014 11:31:28 +0900 |
parents | 4fa0a48323fe |
children | 223af50e60d5 |
files | distributed/loop_qsub.sh distributed/loop_qsub_cassandra_nodes.sh distributed/nodes_stress_write_cassandra.rb distributed/nodes_stress_write_jungle.rb loop_qsub.sh loop_qsub_cassandra.sh stress_write.rb stress_write_cassandra.sh stress_write_jungle.rb stress_write_jungle.sh test2.sh |
diffstat | 11 files changed, 58 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/distributed/loop_qsub.sh Sat Jan 11 04:41:24 2014 +0900 +++ b/distributed/loop_qsub.sh Fri Jan 17 11:31:28 2014 +0900 @@ -1,14 +1,18 @@ #!/bin/sh start=1 -finish=10 -#finish=45 +finish=45 for i in `seq $start $finish` do + nodenum=$i + if [ $i -lt 10 ] + then + nodenum=0$i + fi echo "current count = $i" - qsub -e /home/mass/share/student/k128576/jungle_benchmark/distributed/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/distributed/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/stress_write_jungle.sh -# qsub -e /home/mass/share/student/k128576/jungle_benchmark/distributed/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/distributed/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/stress_read_jungle.sh + qsub -e /home/mass/share/student/k128576/jungle_benchmark/distributed/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/distributed/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$nodenum:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/stress_write_jungle.sh +# qsub -e /home/mass/share/student/k128576/jungle_benchmark/distributed/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/distributed/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$nodenum:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/stress_read_jungle.sh while [ "x`qstat`" != "x" ] do echo "waiting for job to complete"
--- a/distributed/loop_qsub_cassandra_nodes.sh Sat Jan 11 04:41:24 2014 +0900 +++ b/distributed/loop_qsub_cassandra_nodes.sh Fri Jan 17 11:31:28 2014 +0900 @@ -5,9 +5,14 @@ for i in `seq $start $finish` do - echo "current count = $i" - qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/nodes_stress_write_cassandra.sh -# qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_read_cassandra.sh + nodenum=$i + if [ $i -lt 10 ] + then + nodenum=0$i + fi + echo "current count = $nodenum" + qsub -e /home/mass/share/student/k128576/jungle_benchmark/distributed/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/distributed/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$nodenum:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/nodes_stress_write_cassandra.sh +# qsub -e /home/mass/share/student/k128576/jungle_benchmark/distributed/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/distributed/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$nodenum:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/stress_read_cassandra.sh while [ "x`qstat`" != "x" ] do echo "waiting for job to complete"
--- a/distributed/nodes_stress_write_cassandra.rb Sat Jan 11 04:41:24 2014 +0900 +++ b/distributed/nodes_stress_write_cassandra.rb Fri Jan 17 11:31:28 2014 +0900 @@ -11,10 +11,11 @@ sleepTime = schedule - time sleep(sleepTime) +UUID="13814000-1dd2-11b2-b303-72d4cffbf294" nodename = get_node_name("/home/mass/share/student/k128576/jungle_benchmark/distributed/nodes.txt") r = Benchmark.measure { count = ARGV[1].to_i - uri = URI.parse('http://'+nodename.chomp+':8080/editMessage?bname=hello%20world&uuid=13814000-1dd2-11b2-93d6-02864ec060b6') + uri = URI.parse('http://'+nodename.chomp+':8080/editMessage?bname=hello%20world&uuid='+UUID) count.times {|i| res = Net::HTTP.post_form(uri, {:author =>'oshiro', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"fugafuga #{i}"}) }
--- a/distributed/nodes_stress_write_jungle.rb Sat Jan 11 04:41:24 2014 +0900 +++ b/distributed/nodes_stress_write_jungle.rb Fri Jan 17 11:31:28 2014 +0900 @@ -14,7 +14,6 @@ nodename = get_node_name("/home/mass/share/student/k128576/jungle_benchmark/distributed/nodes.txt") r = Benchmark.measure { count = ARGV[1].to_i - puts nodename.chomp uri = URI.parse('http://' << nodename.chomp << ':8080/editMessage?bname=hello%20world&uuid=0') count.times {|i| res = Net::HTTP.post_form(uri, {:author =>'oshiro', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"hogehoge #{i}"})
--- a/loop_qsub.sh Sat Jan 11 04:41:24 2014 +0900 +++ b/loop_qsub.sh Fri Jan 17 11:31:28 2014 +0900 @@ -5,9 +5,14 @@ for i in `seq $start $finish` do - echo "current count = $i" - qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_write_jungle.sh -# qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_read_jungle.sh + nodenum=$i + if [ $i -lt 10 ] + then + nodenum=0$i + fi + echo "current count = $nodenum" + qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$nodenum:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_write_jungle.sh +# qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$nodenum:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_read_jungle.sh while [ "x`qstat`" != "x" ] do echo "waiting for job to complete"
--- a/loop_qsub_cassandra.sh Sat Jan 11 04:41:24 2014 +0900 +++ b/loop_qsub_cassandra.sh Fri Jan 17 11:31:28 2014 +0900 @@ -5,9 +5,14 @@ for i in `seq $start $finish` do - echo "current count = $i" - qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_write_cassandra.sh -# qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_read_cassandra.sh + nodenum=$i + if [ $i -lt 10 ] + then + nodenum=0$i + fi + echo "current count = $nodenum" + qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$nodenum:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_write_cassandra.sh +# qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$nodenum:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_read_cassandra.sh while [ "x`qstat`" != "x" ] do echo "waiting for job to complete"
--- a/stress_write.rb Sat Jan 11 04:41:24 2014 +0900 +++ b/stress_write.rb Fri Jan 17 11:31:28 2014 +0900 @@ -1,20 +1,16 @@ #!/usr/bin/ruby require 'net/http' -require 'uri' require 'benchmark' -schedule = ARGV[0].to_i -time = Time.now.to_i -sleepTime = schedule - time -sleep(sleepTime) - r = Benchmark.measure { - count = ARGV[1].to_i - count.times {|i| - uri = URI.parse('http://bldsv12.cr.ie.u-ryukyu.ac.jp:8080/editMessage?bname=hello%20world&uuid=0') - res = Net::HTTP.post_form(uri, {:author =>'shoshi', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"hogehoge #{i}"}) - } + schedule = ARGV[0].to_i + time = Time.now.to_i + sleepTime = schedule - time + sleep(sleepTime) + count = ARGV[1].to_i + count.times {|i| + Net::HTTP.get('133.13.62.3','/editMessage?bname=hello%20world&uuid=0&author=oshiro&key=0&msg=hogehoge',8080) + } } puts r.real -
--- a/stress_write_cassandra.sh Sat Jan 11 04:41:24 2014 +0900 +++ b/stress_write_cassandra.sh Fri Jan 17 11:31:28 2014 +0900 @@ -1,6 +1,6 @@ #!/bin/sh # -#PBS -q tqueue +#PBS -q cqueue #PBS -N write_jungle #PBS -l walltime=00:05:00
--- a/stress_write_jungle.rb Sat Jan 11 04:41:24 2014 +0900 +++ b/stress_write_jungle.rb Fri Jan 17 11:31:28 2014 +0900 @@ -1,16 +1,20 @@ #!/usr/bin/ruby require 'net/http' +require 'uri' require 'benchmark' +schedule = ARGV[0].to_i +time = Time.now.to_i +sleepTime = schedule - time +sleep(sleepTime) + r = Benchmark.measure { - schedule = ARGV[0].to_i - time = Time.now.to_i - sleepTime = schedule - time - sleep(sleepTime) - count = ARGV[1].to_i - count.times {|i| - Net::HTTP.get('133.13.62.3','/editMessage?bname=hello%20world&uuid=0&author=oshiro&key=0&msg=hogehoge',8080) - } + count = ARGV[1].to_i + uri = URI.parse('http://bldsv12.cr.ie.u-ryukyu.ac.jp:8080/editMessage?bname=hello%20world&uuid=0') + count.times {|i| + res = Net::HTTP.post_form(uri, {:author =>'oshiro', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"hogehoge #{i}"}) + } } puts r.real +
--- a/stress_write_jungle.sh Sat Jan 11 04:41:24 2014 +0900 +++ b/stress_write_jungle.sh Fri Jan 17 11:31:28 2014 +0900 @@ -1,10 +1,10 @@ #!/bin/sh # -#PBS -q tqueue +#PBS -q cqueue #PBS -N write_jungle #PBS -l walltime=00:05:00 -script=/home/mass/share/student/k128576/jungle_benchmark/stress_write.rb +script=/home/mass/share/student/k128576/jungle_benchmark/stress_write_jungle.rb function run() { while read serv