nat-netperf-stream-client.rcS revision 3032:dc687512802b
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 "0" > /proc/sys/net/ipv4/tcp_timestamps
10echo "0" > /proc/sys/net/ipv4/tcp_sack
11echo "1" > /proc/sys/net/ipv4/tcp_vegas_cong_avoid
12echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
13echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_rmem
14echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_wmem
15echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_mem
16echo "262143" > /proc/sys/net/core/rmem_max
17echo "262143" > /proc/sys/net/core/wmem_max
18echo "262143" > /proc/sys/net/core/rmem_default
19echo "262143" > /proc/sys/net/core/wmem_default
20echo "262143" > /proc/sys/net/core/optmem_max
21echo "100000" > /proc/sys/net/core/netdev_max_backlog
22
23echo "modifying route table"
24route add default gw 10.0.0.1
25
26echo -n "waiting for server..."
27netcat -c -l -p 8000
28
29BINARY=/benchmarks/netperf-bin/netperf
30TEST="TCP_STREAM"
31SHORT_ARGS="-l -100k"
32LONG_ARGS="-k16384,0 -K16384,0 -- -m 65536 -M 65536 -s 262144 -S 262144"
33
34
35SHORT="$BINARY -H $SERVER -t $TEST $SHORT_ARGS"
36LONG="$BINARY -H $SERVER -t $TEST $LONG_ARGS"
37
38echo "starting test..."
39echo "netperf warmup"
40echo $SHORT
41eval $SHORT
42
43echo "netperf benchmark"
44echo $LONG
45/sbin/m5 ivlb 1
46/sbin/m5 resetstats
47/sbin/m5 dumpresetstats 200000000 2000000000
48/sbin/m5 checkpoint 200000000 2000000000
49eval $LONG
50/sbin/m5 exit
51