1# a script to run a set of single-instance netperf tests 2# between two machines 3 4# the length in seconds of each test iteration. the actual 5# run time will then be somewhere between that times min 6# and max iteration for confidence intervals 7length=30 8 9# unlike the aggregate script, we do not have to worry 10# about everyone all running at the same time, so we can 11# save some time with a lower minimum iteration count 12confidence="-i 30,3" 13 14# the CPUs to which the netperf process will be bound 15# via the -T global option 16netperf_CPUs="0 1 2" 17 18# the CPUs to which the netserver process will be bound 19# via the -T global option 20netserver_CPUs="0 1 2" 21 22# the host/IP to use for the control connection 23control_host=192.168.0.26 24 25# the list of host/IP addresses to actually measure over 26remote_hosts="192.168.0.26 fe80::207:43ff:fe05:590a%eth0" 27 28#reqs="128 256 512 1024" 29reqs="64 128 256 512 1024 1460 2048 4096 8192" 30 31# the burst size for bursted RR tests 32bursts="0 1 2 4 8 16 32 64 128 256" 33 34HDR="-P 1" 35# -O means "human" -o means "csv" -k means "keyval" 36# "all" means emit everything. otherwise, specify a 37# list of output selectors directly or a filename with 38# them therein. no parameter means a default set will 39# be emitted based on the test type 40CSV="-o all" 41#CSV="-O all" 42 43# which of the tests should we do? 44DO_TCP_STREAM_AUTO=1 45DO_TCP_STREAM_SOPT=1 46DO_TCP_BIDIR=1 47DO_TCP_RR=1 48DO_TCP_CC=0 49DO_TCP_BIDIR_REQ=0 50DO_UDP_BIDIR_REQ=0 51DO_UDP_STREAM=1 52 53# when this is set to 0 then netperf and netserver are bound 54# to the same CPU number and we do not walk through all the 55# combinations. one can do this when the two systems are 56# otherwise identical. when they are not, then running 57# through the full matrix may be indicated 58FULL_MATRIX=0 59 60# here you should echo some things about the test and its 61# environment and in particular those things not automagically 62# determined by netperf 63echo I NEED TO EDIT THE SCRIPT 64echo interrupts CPU 0 with CPU 1 other socket CPU 2 same socket 65echo ad386a in dl380 g5 2x 5160@3GHz to same 66 67# and away we go 68for data in $remote_hosts 69do 70 71 if [ $DO_TCP_STREAM_AUTO -eq 1 ] 72 then 73 echo TCP_STREAM to $data autotuning 74 for i in $netperf_CPUs 75 do 76 if [ $FULL_MATRIX -eq 1 ] 77 then 78 set=$netserver_CPUs 79 else 80 set=$i 81 fi 82 for j in $set 83 do 84 netperf $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -m 64K;HDR="-P 0"; 85 done 86 done 87 fi 88 89 if [ $DO_TCP_STREAM_SOPT -eq 1 ] 90 then 91 echo TCP_STREAM to $data 92 HDR="-P 1" 93 for i in $netperf_CPUs 94 do 95 if [ $FULL_MATRIX -eq 1 ] 96 then 97 set=$netserver_CPUs 98 else 99 set=$i 100 fi 101 for j in $set 102 do 103 netperf $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -m 64K;HDR="-P 0"; 104 done 105 done 106 fi 107 108 if [ $DO_TCP_BIDIR -eq 1 ] 109 then 110 echo bidir TCP_RR MEGABITS to $data 111 HDR="-P 1" 112 for i in $netperf_CPUs 113 do 114 if [ $FULL_MATRIX -eq 1 ] 115 then 116 set=$netserver_CPUs 117 else 118 set=$i 119 fi 120 for j in $set 121 do 122 netperf $HDR -T $i,$j -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -r 64K -b 12; HDR="-P 0"; 123 done 124 done 125 fi 126 127 if [ $DO_TCP_RR -eq 1 ] 128 then 129 echo TCP_RR to $data 130 HDR="-P 1" 131 for i in $netperf_CPUs 132 do 133 if [ $FULL_MATRIX -eq 1 ] 134 then 135 set=$netserver_CPUs 136 else 137 set=$i 138 fi 139 for j in $set 140 do 141 netperf $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -r 1; HDR="-P 0"; 142 done 143 done 144 fi 145 146 if [ $DO_TCP_BIDIR_REQ -eq 1 ] 147 then 148 echo bidir TCP_RR MEGABITS to $data altering req/rsp size and burst 149 HDR="-P 1" 150 for i in $netperf_CPUs 151 do 152 for req in $reqs; do 153 for burst in $bursts; do 154 netperf $HDR -T $i -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -r $req -b $burst -D;HDR=-"P 0"; 155 done 156 done 157 done 158 fi 159 160 if [ $DO_UDP_BIDIR_REQ -eq 1 ] 161 then 162 echo bidir UDP_RR MEGABITS to $data altering req/rsp size and burst 163 HDR="-P 1" 164 for i in $netperf_CPUs 165 do 166 for req in $reqs; do 167 for burst in $bursts; do 168 netperf $HDR -T $i -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -r $req -b $burst -T udp;HDR=-"P 0"; 169 done 170 done 171 done 172 fi 173 174 if [ $DO_UDP_STREAM -eq 1 ] 175 then 176 echo UDP_STREAM MEGABITS to $data altering send size, no confidence intvls 177 confidence=" " 178 echo CPUs $netperf_CPUs reqs $reqs 179 HDR="-P 1" 180 for i in $netperf_CPUs 181 do 182 for req in $reqs; do 183 netperf $HDR -T $i -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -m $req -T udp;HDR=-"P 0"; 184 done 185 done 186 fi 187 188done 189 190cat /proc/meminfo 191cat /proc/cpuinfo 192