changeset 3:5ea96ce6a1c1

Added some files
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Wed, 08 Jan 2014 20:01:21 +0900
parents d4f55fd47603
children d9d712277bf5
files cassandra_read_loop_qsub.sh cassandra_read_write_loop_qsub.sh cassandra_write_loop_qsub.sh loop_qsub_cassandra.sh read_write_loop_qsub.sh stress_read.rb stress_read_write.rb stress_read_write.sh stress_read_write_cassandra.rb stress_read_write_cassandra.sh stress_write.rb test.rb
diffstat 12 files changed, 206 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cassandra_read_loop_qsub.sh	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,17 @@
+#!/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/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/cassandra_read_write_loop_qsub.sh	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,17 @@
+#!/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/stress_read_write_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/cassandra_write_loop_qsub.sh	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,17 @@
+#!/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/stress_write_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/loop_qsub_cassandra.sh	Wed Jan 08 20:01:21 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/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/read_write_loop_qsub.sh	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,17 @@
+#!/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/stress_read_write.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/stress_read.rb	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,19 @@
+#!/usr/bin/ruby
+
+require 'net/http'
+require 'benchmark'
+require 'socket'
+
+schedule = ARGV[0].to_i
+time = Time.now.to_i 
+sleepTime = schedule - time
+sleep(sleepTime) 
+
+tms = Benchmark.measure {
+  count = ARGV[1].to_i
+  count.times {|i|
+    ret = Net::HTTP.get('bldsv12.cr.ie.u-ryukyu.ac.jp','/showBoardMessage?bname=hello%20world',8080)
+ }
+}
+puts tms.real
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stress_read_write.rb	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,20 @@
+#!/usr/bin/ruby
+
+require 'net/http'
+require 'benchmark'
+
+schedule = ARGV[0].to_i
+time = Time.now.to_i 
+sleepTime = schedule - time
+sleep(sleepTime) 
+
+tms = Benchmark.measure {
+  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|
+    ret = Net::HTTP.get('bldsv12.cr.ie.u-ryukyu.ac.jp','/showBoardMessage?bname=hello%20world',8080)
+    res = Net::HTTP.post_form(uri, {:author =>'oshiro', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"hogehoge #{i}"})
+ }
+}
+puts tms.real
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stress_read_write.sh	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+#PBS -q tqueue
+#PBS -N write_read_jungle
+#PBS -l walltime=00:05:00
+
+script=/home/mass/share/student/k128576/jungle_benchmark/stress_read_write.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/stress_read_write_cassandra.rb	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,20 @@
+#!/usr/bin/ruby
+
+require 'net/http'
+require 'benchmark'
+
+schedule = ARGV[0].to_i
+time = Time.now.to_i 
+sleepTime = schedule - time
+sleep(sleepTime) 
+
+tms = Benchmark.measure {
+  count = ARGV[1].to_i
+  uri = URI.parse('http://bldsv12.cr.ie.u-ryukyu.ac.jp:8080/editMessage?bname=hello%20world&uuid=13814000-1dd2-11b2-93d6-02864ec060b6')
+  count.times {|i|
+    ret = Net::HTTP.get('bldsv12.cr.ie.u-ryukyu.ac.jp','/showBoardMessage?bname=hello%20world',8080)
+    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/stress_read_write_cassandra.sh	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+#PBS -q tqueue
+#PBS -N read_write_jungle
+#PBS -l walltime=00:05:00
+
+script=/home/mass/share/student/k128576/jungle_benchmark/stress_read_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/stress_write.rb	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +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 {
+  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}"})
+  }
+}
+puts r.real
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test.rb	Wed Jan 08 20:01:21 2014 +0900
@@ -0,0 +1,5 @@
+require 'net/http'
+require 'benchmark'
+
+time = Time.now.to_i 
+puts time
\ No newline at end of file