runemomni.sh revision 7cb62816f02cc6abb1fe88b94808fc412e0b29d0
13ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# a script to run a set of single-instance netperf tests 23ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# between two machines 33ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 43ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# the length in seconds of each test iteration. the actual 53ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# run time will then be somewhere between that times min 63ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# and max iteration for confidence intervals 73ed852eea50f9d4cd633efb8c2b054b8e33c253cristylength=30 83ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 93ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# unlike the aggregate script, we do not have to worry 103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# about everyone all running at the same time, so we can 113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# save some time with a lower minimum iteration count 123ed852eea50f9d4cd633efb8c2b054b8e33c253cristyconfidence="-i 30,3" 133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# the CPUs to which the netperf process will be bound 153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# via the -T global option 16de984cdc3631106b1cbbb8d3972b76a0fc27e8e8cristynetperf_CPUs="0 1 2" 173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# the CPUs to which the netserver process will be bound 193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# via the -T global option 20b56bb24a985ca4366713bcd8ffdfacbb48a98a2fcristynetserver_CPUs="0 1 2" 213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# the host/IP to use for the control connection 233ed852eea50f9d4cd633efb8c2b054b8e33c253cristycontrol_host=192.168.0.26 243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# the list of host/IP addresses to actually measure over 263ed852eea50f9d4cd633efb8c2b054b8e33c253cristyremote_hosts="192.168.0.26 fe80::207:43ff:fe05:590a%eth0" 273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#reqs="128 256 512 1024" 293ed852eea50f9d4cd633efb8c2b054b8e33c253cristyreqs="64 128 256 512 1024 1460 2048 4096 8192" 303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# the burst size for bursted RR tests 323ed852eea50f9d4cd633efb8c2b054b8e33c253cristybursts="0 1 2 4 8 16 32 64 128 256" 333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 343ed852eea50f9d4cd633efb8c2b054b8e33c253cristyHDR="-P 1" 353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# -O means "human" -o means "csv" -k means "keyval" 363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# "all" means emit everything. otherwise, specify a 373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# list of output selectors directly or a filename with 383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# them therein. no parameter means a default set will 393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy# be emitted based on the test type 403ed852eea50f9d4cd633efb8c2b054b8e33c253cristyCSV="-o all" 413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#CSV="-O all" 424c08aed51c5899665ade97263692328eea4af106cristy 434c08aed51c5899665ade97263692328eea4af106cristy# which of the tests should we do? 444c08aed51c5899665ade97263692328eea4af106cristyDO_TCP_STREAM_AUTO=1 454c08aed51c5899665ade97263692328eea4af106cristyDO_TCP_STREAM_SOPT=1 464c08aed51c5899665ade97263692328eea4af106cristyDO_TCP_BIDIR=1 474c08aed51c5899665ade97263692328eea4af106cristyDO_TCP_RR=1 484c08aed51c5899665ade97263692328eea4af106cristyDO_TCP_CC=0 494c08aed51c5899665ade97263692328eea4af106cristyDO_TCP_BIDIR_REQ=0 504c08aed51c5899665ade97263692328eea4af106cristyDO_UDP_BIDIR_REQ=0 514c08aed51c5899665ade97263692328eea4af106cristyDO_UDP_STREAM=1 52030436f8fc9854b6bb39f4d7593d9e70ff83a8cacristy 534c08aed51c5899665ade97263692328eea4af106cristy# when this is set to 0 then netperf and netserver are bound 54c53413df5789700e14e1a67e6cc2716d1716a387cristy# to the same CPU number and we do not walk through all the 554c08aed51c5899665ade97263692328eea4af106cristy# combinations. one can do this when the two systems are 564c08aed51c5899665ade97263692328eea4af106cristy# otherwise identical. when they are not, then running 574c08aed51c5899665ade97263692328eea4af106cristy# through the full matrix may be indicated 584c08aed51c5899665ade97263692328eea4af106cristyFULL_MATRIX=0 594c08aed51c5899665ade97263692328eea4af106cristy 604c08aed51c5899665ade97263692328eea4af106cristy# here you should echo some things about the test and its 614c08aed51c5899665ade97263692328eea4af106cristy# environment and in particular those things not automagically 624c08aed51c5899665ade97263692328eea4af106cristy# determined by netperf 634c08aed51c5899665ade97263692328eea4af106cristyecho I NEED TO EDIT THE SCRIPT 644c08aed51c5899665ade97263692328eea4af106cristyecho interrupts CPU 0 with CPU 1 other socket CPU 2 same socket 654c08aed51c5899665ade97263692328eea4af106cristyecho ad386a in dl380 g5 2x 5160@3GHz to same 664c08aed51c5899665ade97263692328eea4af106cristy 672c5fc27ae5b613b7fb9fd69c12a47b99c7d4d471cristy# and away we go 684c08aed51c5899665ade97263692328eea4af106cristyfor data in $remote_hosts 694c08aed51c5899665ade97263692328eea4af106cristydo 704c08aed51c5899665ade97263692328eea4af106cristy 714c08aed51c5899665ade97263692328eea4af106cristy if [ $DO_TCP_STREAM_AUTO -eq 1 ] 724c08aed51c5899665ade97263692328eea4af106cristy then 734c08aed51c5899665ade97263692328eea4af106cristy echo TCP_STREAM to $data autotuning 744c08aed51c5899665ade97263692328eea4af106cristy for i in $netperf_CPUs 754c08aed51c5899665ade97263692328eea4af106cristy do 764c08aed51c5899665ade97263692328eea4af106cristy if [ $FULL_MATRIX -eq 1 ] 774c08aed51c5899665ade97263692328eea4af106cristy then 784c08aed51c5899665ade97263692328eea4af106cristy set=$netserver_CPUs 794c08aed51c5899665ade97263692328eea4af106cristy else 8063a81879d3568083e4ee4f78ebcae2bc831cb764cristy set=$i 814c08aed51c5899665ade97263692328eea4af106cristy fi 82d1dd6e4fefa0810b9893e6ac9418f79c97c1b39acristy for j in $set 834c08aed51c5899665ade97263692328eea4af106cristy do 84bcbda3fd7d9f3084869f5cebabceb0324c3b2cd7cristy netperf $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -m 64K;HDR="-P 0"; 854c08aed51c5899665ade97263692328eea4af106cristy done 864c08aed51c5899665ade97263692328eea4af106cristy done 874c08aed51c5899665ade97263692328eea4af106cristy fi 883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if [ $DO_TCP_STREAM_SOPT -eq 1 ] 903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy then 913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy echo TCP_STREAM to $data 923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy HDR="-P 1" 933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for i in $netperf_CPUs 943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy do 953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if [ $FULL_MATRIX -eq 1 ] 963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy then 973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy set=$netserver_CPUs 983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy else 993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy set=$i 1003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy fi 1013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for j in $set 1023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy do 1033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 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"; 1043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy fi 1073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if [ $DO_TCP_BIDIR -eq 1 ] 1093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy then 1103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy echo bidir TCP_RR MEGABITS to $data 1113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy HDR="-P 1" 112ce70c17bb6433add2eb069515a4f3105989e0662cristy for i in $netperf_CPUs 1133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy do 1143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if [ $FULL_MATRIX -eq 1 ] 1154c08aed51c5899665ade97263692328eea4af106cristy then 1167e9f233e6549b1e1856c1aa85b3f4dee8e9493facristy set=$netserver_CPUs 1177e9f233e6549b1e1856c1aa85b3f4dee8e9493facristy else 1187e9f233e6549b1e1856c1aa85b3f4dee8e9493facristy set=$i 1197e9f233e6549b1e1856c1aa85b3f4dee8e9493facristy fi 1207e9f233e6549b1e1856c1aa85b3f4dee8e9493facristy for j in $set 1217e9f233e6549b1e1856c1aa85b3f4dee8e9493facristy do 1224c08aed51c5899665ade97263692328eea4af106cristy 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"; 1234c08aed51c5899665ade97263692328eea4af106cristy done 1244c08aed51c5899665ade97263692328eea4af106cristy done 1254c08aed51c5899665ade97263692328eea4af106cristy fi 1264c08aed51c5899665ade97263692328eea4af106cristy 1274c08aed51c5899665ade97263692328eea4af106cristy if [ $DO_TCP_RR -eq 1 ] 1284c08aed51c5899665ade97263692328eea4af106cristy then 129ce70c17bb6433add2eb069515a4f3105989e0662cristy echo TCP_RR to $data 1303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy HDR="-P 1" 1313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for i in $netperf_CPUs 132ce70c17bb6433add2eb069515a4f3105989e0662cristy do 1333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if [ $FULL_MATRIX -eq 1 ] 1343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy then 135bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy set=$netserver_CPUs 1367e9f233e6549b1e1856c1aa85b3f4dee8e9493facristy else 1377e9f233e6549b1e1856c1aa85b3f4dee8e9493facristy set=$i 1387e9f233e6549b1e1856c1aa85b3f4dee8e9493facristy fi 1393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for j in $set 1403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy do 1413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy netperf $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -r 1; HDR="-P 0"; 1423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy fi 1453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if [ $DO_TCP_BIDIR_REQ -eq 1 ] 1473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy then 1483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy echo bidir TCP_RR MEGABITS to $data altering req/rsp size and burst 1493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy HDR="-P 1" 1503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for i in $netperf_CPUs 1513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy do 1523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for req in $reqs; do 1533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for burst in $bursts; do 1543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 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"; 1553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy fi 1593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if [ $DO_UDP_BIDIR_REQ -eq 1 ] 1613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy then 1623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy echo bidir UDP_RR MEGABITS to $data altering req/rsp size and burst 1633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy HDR="-P 1" 1643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for i in $netperf_CPUs 1653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy do 1663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for req in $reqs; do 1673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for burst in $bursts; do 1683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 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"; 1693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy fi 1733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if [ $DO_UDP_STREAM -eq 1 ] 1753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy then 1763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy echo UDP_STREAM MEGABITS to $data altering send size, no confidence intvls 1773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy confidence=" " 1783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy echo CPUs $netperf_CPUs reqs $reqs 1793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy HDR="-P 1" 1803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for i in $netperf_CPUs 1813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy do 1823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for req in $reqs; do 1833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 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"; 1843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy done 1863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy fi 1873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1883ed852eea50f9d4cd633efb8c2b054b8e33c253cristydone 1893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1903ed852eea50f9d4cd633efb8c2b054b8e33c253cristycat /proc/meminfo 1913ed852eea50f9d4cd633efb8c2b054b8e33c253cristycat /proc/cpuinfo 1923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy