image 11

Use qperf to measure network throughput and latency

# install qperf
sudo apt-get install qperf
# run qperf on one node in server mode by invoking it with no arguments
qperf
# run qperf on a client node to obtain measurements such as bandwidth, latency
qperf -ip 19766 -t 10 -ub -vvs node-2 tcp_bw tcp_lat
tcp_bw:
    bw          =    1.94 Gb/sec
    msg_rate    =     3.7 K/sec
    send_bytes  =    2.43 GB
    send_msgs   =  37,046
    recv_bytes  =    2.43 GB
    recv_msgs   =  37,011
tcp_lat:
    latency         =     366 us
    msg_rate        =    2.73 K/sec
    loc_send_bytes  =    13.7 KB
    loc_recv_bytes  =    13.7 KB
    loc_send_msgs   =  13,659
    loc_recv_msgs   =  13,658
    rem_send_bytes  =    13.7 KB
    rem_recv_bytes  =    13.7 KB
    rem_send_msgs   =  13,658
    rem_recv_msgs   =  13,658

Use iperf to measure network throughput

# install iperf3
sudo apt install iperf3
# run iperf3 in server mode
iperf3 -s  # Server listening on 5201
# run iperf3 in client mode
iperf3 -c node-2
Connecting to host node-2, port 5201
[  5] local 192.168.91.128 port 44372 connected to 192.168.91.129 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   239 MBytes  2.00 Gbits/sec    6   1.50 MBytes
[  5]   1.00-2.00   sec   285 MBytes  2.39 Gbits/sec    0   1.61 MBytes
[  5]   2.00-3.00   sec   255 MBytes  2.14 Gbits/sec    0   1.71 MBytes
[  5]   3.00-4.00   sec   248 MBytes  2.07 Gbits/sec    0   1.79 MBytes
[  5]   4.00-5.00   sec   271 MBytes  2.28 Gbits/sec   14   1.31 MBytes
[  5]   5.00-6.00   sec   254 MBytes  2.13 Gbits/sec    0   1.43 MBytes
[  5]   6.00-7.00   sec   234 MBytes  1.96 Gbits/sec    0   1.54 MBytes
[  5]   7.00-8.00   sec   265 MBytes  2.22 Gbits/sec    0   1.65 MBytes
[  5]   8.00-9.00   sec   256 MBytes  2.15 Gbits/sec    0   1.75 MBytes
[  5]   9.00-10.00  sec   260 MBytes  2.18 Gbits/sec    0   1.84 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  2.51 GBytes  2.15 Gbits/sec   20             sender
[  5]   0.00-10.01  sec  2.50 GBytes  2.15 Gbits/sec                  receiver

iperf Done.