forked from dtaht/deBloat
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I started at automating a string of tests to run nightly across multiple servers across multiple paths. Natually I ended up with far more variables than I'd planned for so I have to rethink the test framework. The nice thing is that these tests already thoroughly exposed a major bug in VI/VO queue handling that is now fixed in openwrt mainline. http://www.bufferbloat.net/issues/401 Which I have to get out to the 12 machines in the testbed...
- Loading branch information
Dave Täht
committed
Jul 11, 2012
1 parent
4fac8a3
commit 4c09fa6
Showing
5 changed files
with
240 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
#!/bin/sh | ||
# This string of tests runs router to router | ||
# It requires the ssh keys | ||
# hwtest variables_file | ||
. $1 | ||
|
||
# Capture as much relevant data as possible | ||
|
||
capture_start() { | ||
dmesg > $1/local.start.dmesg | ||
$SSH $SERVER dmesg > $1/$SERVER.start.dmesg | ||
$TC -s qdisc show dev $IFACE > $1/local.start.tc | ||
$SSH $SERVER "$TC -s qdisc show dev $REMOTE_IFACE" > $1/$SERVER.start.tc | ||
} | ||
|
||
capture_end() { | ||
dmesg > $1/local.end.dmesg | ||
$SSH $SERVER dmesg > $1/$SERVER.end.dmesg | ||
$TC -s qdisc show dev $IFACE > $1/local.end.tc | ||
$SSH $SERVER "$TC -s qdisc show dev $REMOTE_IFACE" > $1/$SERVER.end.tc | ||
} | ||
|
||
# Various and sundry things can go wrong | ||
|
||
reset_stuff() { | ||
$SSH $SERVER IFACE=$REMOTE_IFACE qlen_bk=128 qlen_be=128 qlen_vi=128 qlen_vo=128 QMODEL=codel $DEBLOAT | ||
$SSH $SERVER "$KILLALL netserver; $KILLALL -1 xinetd; $IFCONFIG $REMOTE_IFACE txqueuelen 1000; $TC qdisc del dev $REMOTE_IFACE root" | ||
ifconfig $IFACE txqueuelen 1000 | ||
qlen_bk=128 qlen_be=128 qlen_vi=128 qlen_vo=128 QMODEL=codel $DEBLOAT | ||
$TC qdisc del dev $IFACE root 2> /dev/null | ||
} | ||
|
||
test4() { | ||
LOGS=/tmp/$1/4_QUEUE/ | ||
mkdir -p $LOGS 2> /dev/null | ||
$1 | ||
capture_start $LOGS | ||
$PING > ${LOGS}ping.log & | ||
sleep 5 | ||
netperf -l$DUR -Y "CS1,CS1"-H $SERVER $NETPERF_TEST | tail -1 > ${LOGS}bk.log & | ||
netperf -l$DUR -Y "BE,BE" -H $SERVER $NETPERF_TEST | tail -1 > ${LOGS}be.log & | ||
netperf -l$DUR -Y "CS6,CS6" -H $SERVER $NETPERF_TEST | tail -1 > ${LOGS}vi.log & | ||
netperf -l$DUR -Y "EF,EF" -H $SERVER $NETPERF_TEST | tail -1 > ${LOGS}ef.log & | ||
sleep $DUR | ||
killall fping | ||
capture_end $LOGS | ||
echo $1:4QUEUE:throughput:`cat ${LOGS}[bve]*.log | awk '{ SUM += $5} END { print SUM}'` | ||
echo $1:4QUEUE:ping_latency:`tail -2 ${LOGS}ping*.log | head -1` | ||
} | ||
|
||
testBE() { | ||
LOGS=/tmp/$1/BE_QUEUE/ | ||
mkdir -p $LOGS 2> /dev/null | ||
$1 | ||
capture_start $LOGS | ||
$PING > ${LOGS}ping.log & | ||
sleep 5 | ||
netperf -l$DUR -Y "BE,BE" -H $SERVER $NETPERF_TEST | tail -1 > ${LOGS}be.log & | ||
sleep $DUR | ||
killall fping | ||
capture_end $LOGS | ||
echo $1:BE:throughput:`cat ${LOGS}be*.log | awk '{ SUM += $5} END { print SUM}'` | ||
echo $1:BE:ping_latency:`tail -2 ${LOGS}ping*.log | head -1` | ||
} | ||
|
||
testBE4() { | ||
LOGS=/tmp/$1/BE_QUEUE4/ | ||
mkdir -p $LOGS 2> /dev/null | ||
$1 | ||
capture_end $LOGS | ||
$PING > ${LOGS}ping.log & | ||
sleep 5 | ||
netperf -l$DUR -Y "BE,BE" -H $SERVER $NETPERF_TEST | tail -1 > ${LOGS}be1.log & | ||
netperf -l$DUR -Y "BE,BE" -H $SERVER $NETPERF_TEST | tail -1 > ${LOGS}be2.log & | ||
netperf -l$DUR -Y "BE,BE" -H $SERVER $NETPERF_TEST | tail -1 > ${LOGS}be3.log & | ||
netperf -l$DUR -Y "BE,BE" -H $SERVER $NETPERF_TEST | tail -1 > ${LOGS}be4.log & | ||
sleep $DUR | ||
killall fping | ||
capture_end $LOGS | ||
echo $1:BE4:throughput:`cat ${LOGS}be*.log | awk '{ SUM += $5} END { print SUM}'` | ||
echo $1:BE4:ping_latency:`tail -2 ${LOGS}ping*.log | head -1` | ||
} | ||
|
||
# Thse are the defaults | ||
pfifo_1000_hw128() { | ||
: | ||
} | ||
|
||
pfifo_30_hw128() { | ||
$IFCONFIG $IFACE txqueuelen 30 | ||
$SSH $SERVER $IFCONFIG $REMOTE_IFACE txqueuelen 30 | ||
} | ||
|
||
pfifo_30_hw2() { | ||
$IFCONFIG $IFACE txqueuelen 30 | ||
$SSH $SERVER $IFCONFIG $REMOTE_IFACE txqueuelen 30 | ||
qlen_bk=2 qlen_be=2 qlen_vi=2 qlen_vo=2 QMODEL=codel $DEBLOAT | ||
$SSH $SERVER IFACE=$REMOTE_IFACE qlen_bk=2 qlen_be=2 qlen_vi=2 qlen_vo=2 QMODEL=codel $DEBLOAT | ||
$TC qdisc del dev $IFACE root | ||
$SSH $SERVER $TC qdisc del dev $REMOTE_IFACE root | ||
} | ||
|
||
codel() { | ||
$IFCONFIG $IFACE txqueuelen 1000 | ||
$SSH $SERVER $IFCONFIG $REMOTE_IFACE txqueuelen 1000 | ||
} | ||
|
||
fq_codel_ll_hw128() { | ||
qlen_bk=128 qlen_be=128 qlen_vi=128 qlen_vo=128 QMODEL=fq_codel_ll $DEBLOAT | ||
$SSH $SERVER IFACE=$REMOTE_IFACE qlen_bk=128 qlen_be=128 qlen_vi=128 qlen_vo=128 QMODEL=fq_codel_ll $DEBLOAT | ||
} | ||
|
||
fq_codel_ll_hw2() { | ||
qlen_bk=2 qlen_be=2 qlen_vi=2 qlen_vo=2 QMODEL=fq_codel_ll $DEBLOAT | ||
$SSH $SERVER IFACE=$REMOTE_IFACE qlen_bk=2 qlen_be=2 qlen_vi=2 qlen_vo=2 QMODEL=fq_codel_ll $DEBLOAT | ||
} | ||
|
||
fq_codel_ll_hw3() { | ||
qlen_bk=3 qlen_be=3 qlen_vi=3 qlen_vo=2 QMODEL=fq_codel_ll $DEBLOAT | ||
$SSH $SERVER IFACE=$REMOTE_IFACE qlen_bk=2 qlen_be=2 qlen_vi=2 qlen_vo=2 QMODEL=fq_codel_ll $DEBLOAT | ||
} | ||
|
||
fq_codel_ll_hw3_quantum_1514() { | ||
CODEL_LL_QUANTUM=1514 qlen_bk=3 qlen_be=3 qlen_vi=3 qlen_vo=2 QMODEL=fq_codel_ll $DEBLOAT | ||
$SSH $SERVER CODEL_LL_QUANTUM=1514 IFACE=$REMOTE_IFACE qlen_bk=2 qlen_be=2 qlen_vi=2 qlen_vo=2 QMODEL=fq_codel_ll $DEBLOAT | ||
} | ||
|
||
fq_codel_ll_hw2_quantum_1514() { | ||
CODEL_LL_QUANTUM=1514 qlen_bk=2 qlen_be=2 qlen_vi=2 qlen_vo=2 QMODEL=fq_codel_ll $DEBLOAT | ||
$SSH $SERVER CODEL_LL_QUANTUM=1514 IFACE=$REMOTE_IFACE qlen_bk=2 qlen_be=2 qlen_vi=2 qlen_vo=2 QMODEL=fq_codel_ll $DEBLOAT | ||
} | ||
|
||
for i in $TESTS | ||
do | ||
for q in $QUEUE_SETUP | ||
do | ||
reset_stuff | ||
$i $q | ||
sleep 60 | ||
done | ||
done | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
* | ||
Variables under test | ||
|
||
Hardware queues | ||
Distance | ||
|
||
* Single Queue Behavior | ||
** pfifo_fast | ||
** pfifo_fast with txqueuelen 30 | ||
** fq_codel | ||
** codel | ||
|
||
* Multi Queue Behavior |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
SERVER=172.20.11.1 | ||
NETPERF_TEST="-t TCP_MAERTS" | ||
IFACE=gw11 | ||
REMOTE_IFACE=gw11 | ||
DUR=20 | ||
IFCONFIG=/sbin/ifconfig | ||
TC=/usr/sbin/tc | ||
DEBLOAT=/usr/sbin/debloat | ||
KILLALL=/usr/bin/killall | ||
SSH="/usr/bin/ssh -i /root/.ssh/id_rsa" | ||
TESTS="testBE4" | ||
QUEUE_SETUP="fq_codel_ll_hw2 fq_codel_ll_hw3 fq_codel_ll_hw3_quantum_1514 fq_codel_ll_hw2_quantum_1514" | ||
#TESTS="test4 testBE testBE4" | ||
#QUEUE_SETUP="pfifo fq_codel_ll2" | ||
PING_INTERVAL=10 | ||
DUR_MSEC=`expr $DUR \* 1000` | ||
PING_COUNT=`expr $DUR_MSEC / $PING_INTERVAL + 10` | ||
PING="fping -p $PING_INTERVAL -c $PING_COUNT -i $PING_INTERVAL -b 200 $SERVER" | ||
|
||
export SERVER IFACE REMOTE_IFACE DUR IFCONFIG TC TESTS QUEUE_SETUP KILLALL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
SERVER=172.20.11.1 | ||
NETPERF_TEST="-t TCP_MAERTS" | ||
IFACE=gw11 | ||
REMOTE_IFACE=gw11 | ||
DUR=60 | ||
IFCONFIG=/sbin/ifconfig | ||
TC=/usr/sbin/tc | ||
DEBLOAT=/usr/sbin/debloat | ||
KILLALL=/usr/bin/killall | ||
SSH="/usr/bin/ssh -i /root/.ssh/id_rsa" | ||
|
||
TESTS="testBE4" | ||
QUEUE_SETUP="pfifo_1000_hw128 pfifo_30_hw128 pfifo_30_hw2 fq_codel_ll_hw128 fq_codel_ll_hw2 fq_codel_ll_hw3 fq_codel_ll_hw3_quantum_1514 fq_codel_ll_hw2_quantum_1514" | ||
# Doing the 4 queue ping test causes starvation in the BE/BK queues | ||
#TESTS="test4 testBE testBE4" | ||
#QUEUE_SETUP="pfifo fq_codel_ll2" | ||
PING_INTERVAL=10 | ||
DUR_MSEC=`expr $DUR \* 1000` | ||
PING_COUNT=`expr $DUR_MSEC / $PING_INTERVAL + 10` | ||
PING="fping -p $PING_INTERVAL -c $PING_COUNT -i $PING_INTERVAL -b 200 $SERVER" | ||
|
||
export SERVER IFACE REMOTE_IFACE DUR IFCONFIG TC TESTS QUEUE_SETUP KILLALL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
# this was basically under lab conditions, with the AP 2 feet from the other | ||
|
||
root@testbox:~# ./hwtest setup.vars 2> /dev/null | egrep "ping_latency|throughput" | ||
pfifo_1000_hw128:BE:throughput:85.41 | ||
pfifo_1000_hw128:BE:ping_latency:172.20.11.1 : [2504], 228 bytes, 30.8 ms (24.1 avg, 0% loss) | ||
pfifo_30_hw128:BE:throughput:130.68 | ||
pfifo_30_hw128:BE:ping_latency:172.20.11.1 : [3511], 228 bytes, 9.48 ms (7.75 avg, 0% loss) | ||
pfifo_30_hw2:BE:throughput:23.92 | ||
pfifo_30_hw2:BE:ping_latency:172.20.11.1 : [4522], 228 bytes, 12.3 ms (11.8 avg, 0% loss) | ||
fq_codel_ll_hw128:BE:throughput:101.5 | ||
fq_codel_ll_hw128:BE:ping_latency:172.20.11.1 : [2705], 228 bytes, 15.3 ms (20.9 avg, 0% loss) | ||
fq_codel_ll_hw2:BE:throughput:23.65 | ||
fq_codel_ll_hw2:BE:ping_latency:172.20.11.1 : [4923], 228 bytes, 1.94 ms (2.93 avg, 0% loss) | ||
fq_codel_ll_hw3:BE:throughput:28.33 | ||
fq_codel_ll_hw3:BE:ping_latency:172.20.11.1 : [4788], 228 bytes, 3.10 ms (3.24 avg, 0% loss) | ||
fq_codel_ll_hw3_quantum_1514:BE:throughput:26.66 | ||
fq_codel_ll_hw3_quantum_1514:BE:ping_latency:172.20.11.1 : [4721], 228 bytes, 4.43 ms (3.99 avg, 0% loss) | ||
fq_codel_ll_hw2_quantum_1514:BE:throughput:22.71 | ||
fq_codel_ll_hw2_quantum_1514:BE:ping_latency:172.20.11.1 : [4855], 228 bytes, 3.66 ms (3.51 avg, 0% loss) | ||
pfifo_1000_hw128:BE4:throughput:67.66 | ||
pfifo_1000_hw128:BE4:ping_latency:172.20.11.1 : [905], 228 bytes, 69.5 ms (46.3 avg, 0% loss) | ||
pfifo_30_hw128:BE4:throughput:116.84 | ||
pfifo_30_hw128:BE4:ping_latency:172.20.11.1 : [3310], 228 bytes, 8.25 ms (10.4 avg, 0% loss) | ||
pfifo_30_hw2:BE4:throughput:22.73 | ||
pfifo_30_hw2:BE4:ping_latency:172.20.11.1 : [4429], 228 bytes, 14.1 ms (13.6 avg, 1% loss) | ||
fq_codel_ll_hw128:BE4:throughput:112.9 | ||
fq_codel_ll_hw128:BE4:ping_latency:172.20.11.1 : [2772], 228 bytes, 43.2 ms (31.2 avg, 0% loss) | ||
fq_codel_ll_hw2:BE4:throughput:21.96 | ||
fq_codel_ll_hw2:BE4:ping_latency:172.20.11.1 : [4788], 228 bytes, 4.60 ms (3.57 avg, 0% loss) | ||
fq_codel_ll_hw3:BE4:throughput:26.4 | ||
fq_codel_ll_hw3:BE4:ping_latency:172.20.11.1 : [4519], 228 bytes, 3.23 ms (5.21 avg, 0% loss) | ||
fq_codel_ll_hw3_quantum_1514:BE4:throughput:26.04 | ||
fq_codel_ll_hw3_quantum_1514:BE4:ping_latency:172.20.11.1 : [4519], 228 bytes, 2.42 ms (5.50 avg, 0% loss) | ||
fq_codel_ll_hw2_quantum_1514:BE4:throughput:21.8 | ||
fq_codel_ll_hw2_quantum_1514:BE4:ping_latency:172.20.11.1 : [4721], 228 bytes, 2.91 ms (3.74 avg, 0% loss) |