Mercurial > hg > Members > toma > benchmark
changeset 0:21d45c3484bb
Initial commit
author | Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 02 Jul 2013 15:41:37 +0900 |
parents | |
children | 1f53f31151d1 |
files | loop_qsub.sh stress_read.rb stress_read.sh |
diffstat | 3 files changed, 53 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/loop_qsub.sh Tue Jul 02 15:41:37 2013 +0900 @@ -0,0 +1,17 @@ +#!/bin/sh + +start=1 +finish=45 + +for i in `seq $start $finish` +do + echo "current count = $i" + qsub -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 stress_write_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/stress_read.rb Tue Jul 02 15:41:37 2013 +0900 @@ -0,0 +1,18 @@ +#!/usr/bin/ruby + +require 'net/http' +require 'benchmark' + +tms = 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.56.3','/showBoardMessage?bname=hello%20world',3000) + } +} +puts tms.real +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stress_read.sh Tue Jul 02 15:41:37 2013 +0900 @@ -0,0 +1,18 @@ +#!/bin/sh +# +#PBS -q tqueue +#PBS -N read_jungle_bldsv10 +#PBS -l walltime=00:05:00 + +script=/home/mass/share/student/k128569/stress_read.rb + +function run() { + while read serv + do + ssh $serv "/usr/bin/ruby $script $schedule $times" & + done + wait +} + +uniq $PBS_NODEFILE /tmp/nodes +run < /tmp/nodes