From ec69b5870a508ec444119ee2149311ef2030cf37 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 15 Mar 2020 14:55:50 +0100 Subject: [PATCH] Minor improvements to the benchmark script and graph output. --- benchmark | 12 +++++++++++- makegraph | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/benchmark b/benchmark index e33b763..008af3d 100755 --- 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 diff --git a/makegraph b/makegraph index 97b2922..04e7606 100755 --- 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", \ -- 2.39.2