aboutsummaryrefslogtreecommitdiff
path: root/doc/system/plots/run-latency.bash
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-12 18:19:17 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-12 18:19:17 +0200
commit895e24872de95acf255e0746b42f0661697e7f9a (patch)
treeb2aadbb712549f7aa9caf8679036e9f1535a4f2c /doc/system/plots/run-latency.bash
parent4d298f9bea8a98acc5d4b7d738af02313b203658 (diff)
initial import of thesis-dold
Diffstat (limited to 'doc/system/plots/run-latency.bash')
-rw-r--r--doc/system/plots/run-latency.bash44
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/system/plots/run-latency.bash b/doc/system/plots/run-latency.bash
new file mode 100644
index 000000000..77b375db6
--- /dev/null
+++ b/doc/system/plots/run-latency.bash
@@ -0,0 +1,44 @@
+#/usr/bin/env bash
+
+# This is intended to be run with SSH agent forwarding,
+# so we can log in as root to adjust artificial delay.
+
+set -eu
+
+which taler-exchange-benchmark
+
+# check that we can log in at least!
+ssh root@gv.taler.net true
+ssh root@firefly.gnunet.org true
+
+ssh root@gv.taler.net tc qdisc delete dev enp4s0f0 root || true
+ssh root@firefly.gnunet.org tc qdisc delete dev eno2 root || true
+
+ssh root@gv.taler.net "echo 3 > /proc/sys/net/ipv4/tcp_fastopen"
+ssh root@firefly.gnunet.org "echo 3 > /proc/sys/net/ipv4/tcp_fastopen"
+
+# warm up TCP fast open cookies
+taler-exchange-benchmark -c benchmark-remote-gv.conf -m client -p 1 -n 5 >> benchmark-latency.log 2>&1
+
+export GNUNET_BENCHMARK_DIR=$(readlink -f ./stats)
+
+for x in 0 50 100 150 200; do
+ echo running with one-sided delay of $x
+ result_dir="results/latency-$x"
+ if [[ -d "$result_dir" ]]; then
+ echo "skipping because results exist"
+ continue
+ fi
+
+ ssh root@gv.taler.net tc qdisc add dev enp4s0f0 root netem delay "${x}ms"
+ ssh root@firefly.gnunet.org tc qdisc add dev eno2 root netem delay "${x}ms"
+
+ rm -rf stats
+ taler-exchange-benchmark -c benchmark-remote-gv.conf -m client -p 1 -n 200 >> benchmark-latency.log 2>&1
+ echo "### Finished latency run for ${x}ms" >> benchmark-latency.log
+ mkdir -p "$result_dir"
+ cp -a stats "$result_dir/"
+
+ ssh root@gv.taler.net tc qdisc delete dev enp4s0f0 root
+ ssh root@firefly.gnunet.org tc qdisc delete dev eno2 root
+done