aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/contrib/stress-testing/threewayiperf.sh
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2015-06-05 15:58:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-06-25 16:48:39 +0200
commit99d303ac2739e65a02fbbc325b74ad6fcac63cc2 (patch)
tree6f4095f42d3d298cdd5ab8bc6f8ed89d9673b38b /contrib/stress-testing/threewayiperf.sh
downloadwireguard-monolithic-historical-99d303ac2739e65a02fbbc325b74ad6fcac63cc2.tar.xz
wireguard-monolithic-historical-99d303ac2739e65a02fbbc325b74ad6fcac63cc2.zip
Initial commit
Diffstat (limited to 'contrib/stress-testing/threewayiperf.sh')
-rwxr-xr-xcontrib/stress-testing/threewayiperf.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/stress-testing/threewayiperf.sh b/contrib/stress-testing/threewayiperf.sh
new file mode 100755
index 0000000..932d666
--- /dev/null
+++ b/contrib/stress-testing/threewayiperf.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+set -e
+
+if [[ $(hostname) == "thinkpad" ]]; then
+ make -C "$(dirname "$0")/../../src" remote-run
+ for i in 128 129 130; do
+ scp "$0" root@172.16.48.${i}:
+ done
+ for i in 128 129 130; do
+ konsole --new-tab -e ssh -t root@172.16.48.${i} "./$(basename "$0")"
+ done
+ exit
+fi
+
+# perf top -U --dsos '[wireguard]'
+
+tmux new-session -s bigtest -d
+tmux new-window -n "server 6000" -t bigtest "iperf3 -p 6000 -s"
+tmux new-window -n "server 6001" -t bigtest "iperf3 -p 6001 -s"
+sleep 5
+me=$(ip -o -4 address show dev wg0 | sed 's/.*inet \([^ ]*\)\/.*/\1/' | cut -d . -f 4)
+for i in 1 2 3; do
+ [[ $i == $me ]] && continue
+ [[ $me == "1" ]] && port=6000
+ [[ $me == "3" ]] && port=6001
+ [[ $me == "2" && $i == "1" ]] && port=6000
+ [[ $me == "2" && $i == "3" ]] && port=6001
+ tmux new-window -n "client 192.168.2.${i}" -t bigtest "iperf3 -n 300000G -i 1 -p $port -c 192.168.2.${i}"
+done
+tmux attach -t bigtest