[netperf-dev] netperf2 commit notice r573 - trunk/doc/examples
raj at netperf.org
raj at netperf.org
Tue May 1 15:06:38 PDT 2012
Author: raj
Date: 2012-05-01 15:06:38 -0700 (Tue, 01 May 2012)
New Revision: 573
Added:
trunk/doc/examples/find_max_burst.sh
trunk/doc/examples/remote_hosts
Log:
a few additional helpful things
Added: trunk/doc/examples/find_max_burst.sh
===================================================================
--- trunk/doc/examples/find_max_burst.sh (rev 0)
+++ trunk/doc/examples/find_max_burst.sh 2012-05-01 22:06:38 UTC (rev 573)
@@ -0,0 +1,41 @@
+# a crude script to try to find the burst size which results in
+# something approximating peak transactions per second. once we so
+# pass the peak, we may want to refine further but for now, this
+# should suffice
+
+LAST_TPS=0
+BURST=1
+LAST_BURST=0
+
+TMP_TPS=`netperf -t TCP_RR -P 0 -H $1 -- -b $BURST -D -o throughput`
+
+if [ $? -ne 0 ]
+then
+ echo -1
+ exit -1
+fi
+
+CUR_TPS=`echo $TMP_TPS | awk '{print int($1)}'`
+
+while [ $CUR_TPS -gt $LAST_TPS ]
+do
+ LAST_BURST=$BURST
+ BURST=`expr $BURST \* 2`
+ LAST_TPS=$CUR_TPS
+
+ TMP_TPS=`netperf -t TCP_RR -P 0 -H $1 -- -b $BURST -D -o throughput`
+
+ if [ $? -ne 0 ]
+ then
+ echo -1
+ exit -1
+ fi
+
+ CUR_TPS=`echo $TMP_TPS | awk '{print int($1)}'`
+done
+
+# if we were going to further refine the estimate we would probably do
+# a binary search at this point but for now, just emit the value of
+# LAST_BURST and be done with it.
+
+echo $LAST_BURST
Property changes on: trunk/doc/examples/find_max_burst.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/doc/examples/remote_hosts
===================================================================
--- trunk/doc/examples/remote_hosts (rev 0)
+++ trunk/doc/examples/remote_hosts 2012-05-01 22:06:38 UTC (rev 573)
@@ -0,0 +1,3 @@
+REMOTE_HOSTS[0]=127.0.0.1
+REMOTE_HOSTS[1]=127.0.0.1
+NUM_REMOTE_HOSTS=2
\ No newline at end of file
More information about the netperf-dev
mailing list