1#!/bin/sh 2SERVER=192.168.0.1 3CLIENT=10.0.0.2 4 5echo "setting up network..." 6ifconfig lo 127.0.0.1 7ifconfig eth0 $CLIENT txqueuelen 1000 8 9echo "modifying route table..." 10route add default gw 10.0.0.1 11 12echo "0" > /proc/sys/net/ipv4/tcp_timestamps 13echo "0" > /proc/sys/net/ipv4/tcp_sack 14echo "1" > /proc/sys/net/ipv4/tcp_vegas_cong_avoid 15echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_rmem 16echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_wmem 17echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_mem 18echo "262143" > /proc/sys/net/core/rmem_max 19echo "262143" > /proc/sys/net/core/wmem_max 20echo "262143" > /proc/sys/net/core/rmem_default 21echo "262143" > /proc/sys/net/core/wmem_default 22echo "262143" > /proc/sys/net/core/optmem_max 23echo "100000" > /proc/sys/net/core/netdev_max_backlog 24 25echo -n "waiting for natbox..." 26netcat -c -l -p 8000 27 28BINARY=/benchmarks/netperf-bin/netperf 29TEST="TCP_MAERTS" 30SHORT_ARGS="-l -100k" 31LONG_ARGS="-k16384,0 -K16384,0 -- -m 65536 -M 65536 -s 262144 -S 262144" 32 33 34SHORT="$BINARY -H $SERVER -t $TEST $SHORT_ARGS" 35LONG="$BINARY -H $SERVER -t $TEST $LONG_ARGS" 36 37echo "starting test..." 38echo "netperf warmup" 39echo $SHORT 40eval $SHORT 41 42echo "netperf benchmark" 43echo $LONG 44/sbin/m5 resetstats 45/sbin/m5 dumpresetstats 200000000 2000000000 46/sbin/m5 checkpoint 200000000 2000000000 47eval $LONG 48/sbin/m5 exit 49