Use env.*.sh scripts to define network parameters of emulated peers.
Still TODO: uplink emulation.
+ * min_owd TINT_NEVER is logged
+
v hints, data for non-existing ranges
- * opens multiple channels to the same address
+ v opens multiple channels to the same address
v hints do not expire
v RTT calculations need improvement (test)
v google-log is unnecessary
* reduce template use (peer queue)
v hints do not expire
v survive 10% loss
- * unlimited ping pong
+ v unlimited ping pong
v git sha-1
v check hints agains ack_out?_
v check data against ack_in
0_11_10_575_703 #9 sendctrl loss detected
0_11_10_575_703 #9 Tdata (0,194)
0_11_10_575_703 #9 sendctrl may send 0 < 0.000000 & 1732919509_-49_-44_-700_-110 (rtt 59661)
- * complete peer reconnects 1259967418.out.gz
+ v complete peer reconnects 1259967418.out.gz
* underhinting causes repetition causes interarr underest causes underhinting
* misterious initiating handshake bursts
v whether sending is limited by cwnd or app
* actually: whether packets are ACKed faster than sent
* uproot DATA NONE: complicates and deceives
- * r735 goes to github; r741
+ v r735 goes to github; r741
* receiver is swapping => strange behavior
v on high losses cwnd goes to silly fractions => slows down recovery
- * code the pingpong<->keepalive<->slowstart transition
- * empty datagram hammering (see at linode)
+ v code the pingpong<->keepalive<->slowstart transition
+ v empty datagram hammering (see at linode)
* make a testkit!!!
* never back from keepalive syndrome (because of underhashing)
* HTTP daemon, combined select() loop
* range requests, priorities
- * LEDBAT
+ v LEDBAT
* CUBIC
v misterious mass packet losses (!data)
# TODO: one method
if [ ! -e bin ]; then mkdir bin; fi
-g++ -I. *.cpp compat/*.cpp ext/seq_picker.cpp -pg -o bin/swift-pg &
-g++ -I. *.cpp compat/*.cpp ext/seq_picker.cpp -g -o bin/swift-dbg &
-g++ -I. *.cpp compat/*.cpp ext/seq_picker.cpp -O3 -o bin/swift-o3 &
+g++ -I. *.cpp ext/seq_picker.cpp -pg -o bin/swift-pg &
+g++ -I. *.cpp ext/seq_picker.cpp -g -o bin/swift-dbg &
+g++ -I. *.cpp ext/seq_picker.cpp -O2 -o bin/swift-o2 &
wait
echo done
-if [ -e .netem-on ]; then
- sudo tc qdisc del dev `cat .netem-on` root
- rm .netem-on
+if [ $EMIF ]; then
+ sudo tc qdisc del dev $EMIF ingress
+ sudo tc qdisc del dev ifb0 root
fi
sudo iptables -F &
cd swift
rm -f chunk core
-killall leecher
-killall seeder
-killall swift-o3
+killall swift-o2
killall swift-dbg
echo DONE
CMD=$2
ENV=env.default.sh
+if [ -e env.$HOST.sh ]; then
+ ENV="$ENV env.$HOST.sh"
+fi
+
if [ -e $CMD.$HOST.sh ] ; then
SHSC=$CMD.$HOST.sh ;
else
export SERVERS="servers.txt"
fi
-rm -rf harvest
+mv harvest .hrv-old
+rm -rf .hrv-old &
mkdir harvest
for s in `grep -v '#' $SERVERS`; do
mkfifo harvest/$s.fifo
+ # yas, yes, yes
+ ( scp ~/.ssh/config $s:.ssh/config > /dev/null ) &
done
+wait
for s in `grep -v '#' $SERVERS`; do
(if ssh $s \
rm harvest/*.fifo
cp report.css harvest
+scp -rq harvest mfold.libswift.org:/storage/mfold-granary/`date +%d%b_%H:%M`_`whoami` &
echo DONE
--- /dev/null
+EMIF=eth0
+EMBW=1mbit
+EMDELAY=50ms
+
# This script sets up shared environment variables
# at the servers
export SEEDER=130.161.211.198
-export SEEDPORT=10004
-export RUNPORT=10008
-export BRANCH=master
+export SWFTPORT=10004
+export HASH=66b9644bb01eaad09269354df00172c8a924773b
+export BRANCH=ack-have
export ORIGIN=git://github.com/gritzko/swift.git
--- /dev/null
+EMIF=eth0
+EMBW=1mbit
+
--- /dev/null
+EMIF=eth0
+EMBW=1mbit
+EMDELAY=100ms
+EMJTTR=20ms
+
SERVERS="servers.txt"
fi
+VERSION=`date`,`git log --summary | head -1`
+
cd harvest
HEAD=`head -1 *.log | grep -v '^$' | cut -f1 | sort | head -1`
echo "set y2label 'packets'" >> $GP
echo "set ylabel 'microseconds'" >> $GP
echo "set xlabel 'run time millis'" >> $GP
+ echo "set title '$VERSION'" >> $GP
#echo "set xrange [$HEAD:$TAIL]" >> $GP
CWNDLOG="$from-$to-cwnd.log"
echo -ne "plot '$CWNDLOG' using 1:2 with lines lt rgb '#00aa00' title 'cwnd'"\
fi
OWDLOG="$from-$to-owd.log"
if [ -e $OWDLOG ]; then
- echo -ne ", '$OWDLOG' using 1:2 with lines lt rgb '#8800ee' title 'owd' "\
+ echo -ne ", '$OWDLOG' using 1:2 with lines lt rgb '#ff00ee' title 'owd' "\
"axis x1y1, "\
"'$OWDLOG' using 1:3 with lines lw 2 lt rgb '#0044cc' title 'min owd'"\
"axis x1y1, "\
"lt rgb '#ff0000' title 't-losses'"\
>> $GP
fi
- echo >> $GP
+ echo >> $GP
echo "set term png size 512,192" >> $GP
PNG="$from-$to.thumb.png"
if [ -e $PNG ]; then rm $PNG; fi
echo "set out '$PNG'" >> $GP
+ echo "unset title" >> $GP
+ echo "unset xlabel" >> $GP
+ echo "unset ylabel" >> $GP
echo "replot" >> $GP
( cat $GP | gnuplot ) &
echo '<html><head>'
echo '<link rel="stylesheet" href="report.css" type="text/css">'
-echo '<title>Manifold: swarm tomography</title>'
+echo '<title>Manifold: swarm tomography' `date` `git log --summary | head -1` '</title>'
echo '</head><body>'
echo '<table id="main"><th>'
for to in `grep -v '#' ../$SERVERS`; do
--- /dev/null
+#!/bin/sh
+
+if [ ! $EMIF ] ; then
+ exit
+fi
+
+if [ ! $EMLOSS ]; then
+ EMLOSS=0%
+fi
+
+if [ ! $EMDELAY ]; then
+ EMDELAY=10ms
+fi
+
+if [ ! $EMBW ]; then
+ EMBW=10mbit
+fi
+
+if [ ! $EMJTTR ]; then
+ EMJTTR=0ms
+fi
+
+TC="sudo tc "
+
+echo ifb0 up
+sudo modprobe ifb
+sudo ip link set dev ifb0 up
+
+echo cleanup
+$TC qdisc del dev $EMIF ingress
+$TC qdisc del dev ifb0 root
+
+echo adding ingress
+$TC qdisc add dev $EMIF ingress || exit 1
+
+echo redirecting to ifb
+$TC filter add dev $EMIF parent ffff: protocol ip prio 1 u32 \
+ match ip sport $SWFTPORT 0xffff flowid 1:1 action mirred egress redirect dev ifb0 || exit 2
+echo adding netem for $EMDELAY - $EMLOSS
+$TC qdisc add dev ifb0 root handle 1:0 netem delay $EMDELAY $EMJTTR 25% loss $EMLOSS || exit 3
+echo adding tfb for $EMBW
+$TC qdisc add dev ifb0 parent 1:1 handle 10: tbf rate $EMBW buffer 102400 latency 40ms || exit 4
+
#!/bin/bash
# This script runs a leecher at some server;
# env variables are set in env.default.sh
-HASH=66b9644bb01eaad09269354df00172c8a924773b
ulimit -c 1024000
cd swift || exit 1
rm -f core
rm -f chunk
sleep $(( $RANDOM % 5 ))
-bin/swift-dbg -w -h $HASH -f chunk -t $SEEDER:$SEEDPORT \
+bin/swift-o2 -w -h $HASH -f chunk -t $SEEDER:$SWFTPORT \
-l 0.0.0.0:$RUNPORT -p -D 2>lerr | gzip > lout.gz || exit 2
wget -c http://video.ted.com/talks/podcast/ScottKim_2008P.mp4 || exit 1
fi
-bin/swift-dbg -w -f ScottKim_2008P.mp4 -p -D \
- -l 0.0.0.0:$SEEDPORT 2>lerr | gzip > lout.gz || exit 2
+bin/swift-o2 -w -f ScottKim_2008P.mp4 -p -D \
+ -l 0.0.0.0:$SWFTPORT 2>lerr | gzip > lout.gz || exit 2
exit