Mercurial > hg > Members > nobuyasu > jungle_benchmark
changeset 7:867cd5f213d3
Added distributed directory
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 11 Jan 2014 03:24:53 +0900 |
parents | 593786973c04 |
children | 9ed378589601 |
files | distributed/loop_qsub.sh distributed/loop_qsub_cassandra_nodes.sh distributed/nodes_stress_write_cassandra.rb distributed/nodes_stress_write_cassandra.sh distributed/nodes_stress_write_jungle.rb distributed/stress_write_jungle.sh |
diffstat | 6 files changed, 118 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distributed/loop_qsub.sh Sat Jan 11 03:24:53 2014 +0900 @@ -0,0 +1,18 @@ +#!/bin/sh + +start=1 +finish=45 + +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/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 + while [ "x`qstat`" != "x" ] + do + echo "waiting for job to complete" + sleep 5 + done + echo "job complete" + sleep 15 +done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distributed/loop_qsub_cassandra_nodes.sh Sat Jan 11 03:24:53 2014 +0900 @@ -0,0 +1,18 @@ +#!/bin/sh + +start=1 +finish=45 + +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 + while [ "x`qstat`" != "x" ] + do + echo "waiting for job to complete" + sleep 5 + done + echo "job complete" + sleep 15 +done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distributed/nodes_stress_write_cassandra.rb Sat Jan 11 03:24:53 2014 +0900 @@ -0,0 +1,23 @@ +#!/usr/bin/ruby + +require 'net/http' +require 'benchmark' +require './get_node_name.rb' +include GetNodeName + +schedule = ARGV[0].to_i +time = Time.now.to_i +sleepTime = schedule - time +sleep(sleepTime) + +nodename = get_node_name("nodes.txt") + +tms = Benchmark.measure { + count = ARGV[1].to_i + uri = URI.parse('http://'+nodename+':8080/editMessage?bname=hello%20world&uuid=13814000-1dd2-11b2-93d6-02864ec060b6') + count.times {|i| + res = Net::HTTP.post_form(uri, {:author =>'oshiro', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"fugafuga #{i}"}) + } +} +puts tms.real +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distributed/nodes_stress_write_cassandra.sh Sat Jan 11 03:24:53 2014 +0900 @@ -0,0 +1,18 @@ +#!/bin/sh +# +#PBS -q tqueue +#PBS -N write_jungle +#PBS -l walltime=00:05:00 + +script=/home/mass/share/student/k128576/jungle_benchmark/distributed/nodes_stress_write_cassandra.rb + +function run() { + while read serv + do + ssh $serv "/usr/local/bin/ruby $script $schedule $times" & + done + wait +} + +uniq $PBS_NODEFILE /tmp/nodes +run < /tmp/nodes
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distributed/nodes_stress_write_jungle.rb Sat Jan 11 03:24:53 2014 +0900 @@ -0,0 +1,23 @@ +#!/usr/bin/ruby + +require 'net/http' +require 'uri' +require 'benchmark' +require './get_node_name.rb' +include GetNodeName + +schedule = ARGV[0].to_i +time = Time.now.to_i +sleepTime = schedule - time +sleep(sleepTime) + +nodename = get_node_name("nodes.txt") +r = Benchmark.measure { + count = ARGV[1].to_i + count.times {|i| + uri = URI.parse('http://'+nodename+':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}"}) + } +} +puts r.real +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distributed/stress_write_jungle.sh Sat Jan 11 03:24:53 2014 +0900 @@ -0,0 +1,18 @@ +#!/bin/sh +# +#PBS -q tqueue +#PBS -N write_jungle +#PBS -l walltime=00:05:00 + +script=/home/mass/share/student/k128576/jungle_benchmark/nodes_stress_write_jungle.rb + +function run() { + while read serv + do + ssh $serv "/usr/local/bin/ruby $script $schedule $times" & + done + wait +} + +uniq $PBS_NODEFILE /tmp/nodes +run < /tmp/nodes