]> git.meshlink.io Git - utcp/commitdiff
Minor improvements to the benchmark script and graph output.
authorGuus Sliepen <guus@sliepen.org>
Sun, 15 Mar 2020 13:55:50 +0000 (14:55 +0100)
committerGuus Sliepen <guus@sliepen.org>
Sun, 15 Mar 2020 13:55:50 +0000 (14:55 +0100)
benchmark
makegraph

index e33b76393276d0ffdb3c26e90f4a9e50b369e162..008af3dd880c41f90eb25af6da86797e278c13a3 100755 (executable)
--- a/benchmark
+++ b/benchmark
@@ -4,11 +4,21 @@ set -e
 # Configuration
 LOG_PREFIX=/dev/shm/benchmark-log
 SIZE=10000000
+
+# Network parameters
+# Some realistic values:
+# - Gbit LAN connection: RATE=1gbit DELAY=0.4ms JITTER=0.04ms LOSS=0%
+# - Fast WAN connection: RATE=100mbit DELAY=50ms JITTER=3ms LOSS=0%
+# - 5GHz WiFi connection: RATE=90mbit DELAY=5ms JITTER=1ms LOSS=0%
 RATE=100mbit
 DELAY=10ms
 JITTER=1ms
 LOSS=0.1%
 
+# Maximum achievable bandwidth is limited to BUFSIZE / (2 * DELAY)
+# The Linux kernel has a default maximum send buffer of 4 MiB
+#export BUFSIZE=4194304
+
 # Require root permissions
 if [ "$USER" != "root" ]; then
        exec sudo "$0" "$@"
@@ -69,7 +79,7 @@ tail -2 $LOG_PREFIX-socat-client.txt
 
 echo
 echo "UTCP:"
-tail -2 $LOG_PREFIX-client.txt
+tail -3 $LOG_PREFIX-client.txt
 
 # If sudo was used, ensure the log files can be read by the user
 if [ -n "$SUDO_USER" ]; then
index 97b29227aa69ab1dddf4ede4087584506bb5dab6..04e76064b8080bcdd31d61895cdb1b46218676c1 100755 (executable)
--- a/makegraph
+++ b/makegraph
@@ -57,8 +57,8 @@ for peer in client server; do
                        "$LOG.rtt" using 1:(\$10/1000) title "rto"
 
                set bmargin 4
-               set xtics format "%g"
-               set xlabel "time"
+               set xtics format "%.3S"
+               set xlabel "time (seconds)"
                set ylabel "size (bytes)"
                plot \
                        "$LOG.left" using 1:(\$4 > 0 ? \$4 : 0) title "cwnd left", \