[netperf-dev] netperf2 commit notice r156 - trunk/doc/examples

raj at netperf.org raj at netperf.org
Thu Nov 8 15:25:25 PST 2007


Author: raj
Date: 2007-11-08 15:25:24 -0800 (Thu, 08 Nov 2007)
New Revision: 156

Modified:
   trunk/doc/examples/packet_byte_script
Log:
base the send sizes used by packet_byte_script on the purported mss measured at runtime

Modified: trunk/doc/examples/packet_byte_script
===================================================================
--- trunk/doc/examples/packet_byte_script	2007-11-08 22:55:56 UTC (rev 155)
+++ trunk/doc/examples/packet_byte_script	2007-11-08 23:25:24 UTC (rev 156)
@@ -10,6 +10,9 @@
 #
 # rick jones 4/99
 #
+# teach it about processor affinity and the TCP_MSS test
+# rick jones 2007-11-08
+#
 
 if [ $# -gt 2 ]; then
   echo "try again, correctly -> packet_byte_script hostname [CPU]"
@@ -33,7 +36,7 @@
 
 
 # The test length in seconds
-NETPERF_TIME=${NETPERF_TIME:=20}
+NETPERF_TIME=${NETPERF_TIME:=30}
 
 # How accurate we want the estimate of performance: 
 #      maximum and minimum test iterations (-i)
@@ -47,15 +50,6 @@
 # The CPU affinity to be applied
 NETPERF_AFFINITY=${NETPERF_AFFINITY:=""}
 
-# The request,response sizes that we will be using. The netperf
-# command parser will treat "1" the same as "1,1" - I use 1,1 to
-# remember that it is "request,response"
-NETPERF_REQS=${NETPERF_REQS:="1 16 32 64 128 256 512 1024 \
- 1448 1449 2896 2897 4344 4345"}
-
-NETPERF_RESP=${NETPERF_RESP:="1 16 32 64 128 256 512 1024 \
- 1448 1449 2896 2897 4344 4345"}
-
 # NETPERF_CMD is an amalgam of previous variables
 NETPERF_CMD="${NETPERF_DIR}/netperf ${NETPERF_AFFINITY}"
 
@@ -73,6 +67,46 @@
   REM_HOST=$1
 fi
 
+MSS=`$NETPERF_CMD -H $REM_HOST -t TCP_MSS -P 0 -v 0`
+
+echo "MSS is $MSS"
+
+# The request,response sizes that we will be using. The netperf
+# command parser will treat "1" the same as "1,1" - I use 1,1 to
+# remember that it is "request,response"
+
+# start at one and multiply by two on our way to the MSS
+bar=1
+while [ $bar -lt $MSS ]
+do
+ NETPERF_REQS="${NETPERF_REQS} $bar"
+ bar=`expr $bar \* 2`
+done
+
+# and now multiples of the mss and that plus one
+for i in 1 2 3
+do
+ bar=`expr $MSS \* $i`
+ NETPERF_REQS="${NETPERF_REQS} $bar"
+ NETPERF_REQS="${NETPERF_REQS} `expr $bar + 1`"
+done
+
+bar=1
+while [ $bar -lt $MSS ]
+do
+  NETPERF_RESP="${NETPERF_RESP} $bar"
+  bar=`expr $bar \* 2`
+done
+
+for i in 1 2 3
+do
+ bar=`expr $MSS \* $i`
+ NETPERF_RESP="${NETPERF_RESP} $bar"
+ NETPERF_RESP="${NETPERF_RESP} `expr $bar + 1`"
+done
+
+
+
 # If we are measuring CPU utilization, then we can save beaucoup
 # time by saving the results of the CPU calibration and passing
 # them in during the real tests. So, we execute the new CPU "tests"



More information about the netperf-dev mailing list