Test network bandwidth

# install (on server and client)
sudo apt-get install -y iperf
 
# iperf server
iperf -s
 
# iperf client
iperf -c ${IPERF_SERVER} -t 300
 
# test duplex mode and multiple connections
iperf -c ${IPERF_SERVER} -d -P 8 -t 300

parallel iperf3 at >= 40Gbps
https://fasterdata.es.net/performance-testing/network-troubleshooting-tools/iperf/multi-stream-iperf3/

# server
for i in {9011..9018}; do
    iperf3 -s -p $i &
done
 
pkill -f iperf3
 
 
# client
IP=${SERVER_IP}
for i in {9011..9018}; do
    iperf3 -c $IP -p $i -T label$i -i 0 -t 4 -P 8 &
done | awk '/SUM.*receiver/ {sum+=$7}; END{printf("%.20g Gbits/sec\n",sum)}'
 
killall iperf3