How to Test the Throughput and Latency of a Node and/or Gateway

Test the throughput of a computer to multiple regions using YABS

YABS Network Speed Tests will give you a general indication of at what rate data is sent and received from a computer to different parts of the world. Unlike speedtest.net, it does not only test the “best server”. The test uses ipfer3 to connect to servers in different countries which can give you a better idea of the throughput to other nodes and gateways located all over the world.

  • busy indicates the server did not respond and may mean it was just too busy at the time of the test.
  • Results can vary greatly based on the time of day the test is run, the infrastructure of you location, even the weather!

Run the following command on the node and gateway computers. It will take 3-5 minutes to complete.

$ curl -sL yabs.sh | bash -s -- -gf

I’ve provided results from two tests, 100/100 and 1000/1000 bandwidth.

100/100 bandwidth set via ethtool

You should not expect a 100/100 connection’s throughput to exceed 100 Mbits/sec due to latency but they should be close.

iperf3 Network Speed Tests (IPv4):
---------------------------------
Provider        | Location (Link)           | Send Speed      | Recv Speed     
                |                           |                 |                
Clouvider       | London, UK (10G)          | 81.3 Mbits/sec  | 74.4 Mbits/sec 
Online.net      | Paris, FR (10G)           | 83.9 Mbits/sec  | 82.8 Mbits/sec 
Hybula          | The Netherlands (40G)     | 80.6 Mbits/sec  | 71.2 Mbits/sec 
Uztelecom       | Tashkent, UZ (10G)        | busy            | busy           
Clouvider       | NYC, NY, US (10G)         | 85.3 Mbits/sec  | 74.5 Mbits/sec 
Clouvider       | Dallas, TX, US (10G)      | 87.1 Mbits/sec  | 77.8 Mbits/sec 
Clouvider       | Los Angeles, CA, US (10G) | 88.7 Mbits/sec  | 83.3 Mbits/sec 

1000/1000 bandwidth

You should not expect a 1000/1000 connection’s throughput to exceed 1000 Mbits/sec due to latency but they should be close and definitely over 100 Mbits/sec.

iperf3 Network Speed Tests (IPv4):
---------------------------------
Provider        | Location (Link)           | Send Speed      | Recv Speed     
                |                           |                 |                
Clouvider       | London, UK (10G)          | 418 Mbits/sec   | 287 Mbits/sec 
Online.net      | Paris, FR (10G)           | 325 Mbits/sec   | 315 Mbits/sec 
Hybula          | The Netherlands (40G)     | 433 Mbits/sec   | 305 Mbits/sec  
Uztelecom       | Tashkent, UZ (10G)        | 487 Mbits/sec   | 342 Mbits/sec  
Clouvider       | NYC, NY, US (10G)         | 393 Mbits/sec   | 311 Mbits/sec  
Clouvider       | Dallas, TX, US (10G)      | 420 Mbits/sec   | 427 Mbits/sec  
Clouvider       | Los Angeles, CA, US (10G) | 509 Mbits/sec   | 482 Mbits/sec 

Test the throughput between the node and gateway using iperf3

iperf3 tests the throughput between two specific computers by running a server on one computer and a client on the other. You can run the server on the node and the client on the gateway and vice versa. The default port used by the server is 5201. You must configure any routers and/or firewalls to allow for a connection to port 5201 on the computer hosting the server.

Step 1. Install iperf3 on the node and gateway computers.

$ sudo apt install iperf3

Step 2. On one computer, start the server by running the following:

$ iperf3 --server

The server will listen for the client.

-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

Step 3. On the other computer, start the test by running the following:
Replace REMOTE_HOST with the IP address or domain name of the computer running the server.

$ iperf3 --client REMOTE_HOST

The progress and results of the test will be shown on both computers.
On the client side you will see results such as …

Connecting to host REMOTE_HOST, port 5201
[  5] local REMOTE_HOST port 39276 connected to REMOTE_HOST port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  82.6 MBytes   693 Mbits/sec    0    942 KBytes       
[  5]   1.00-2.00   sec  72.5 MBytes   608 Mbits/sec    0    789 KBytes       
[  5]   2.00-3.00   sec  67.5 MBytes   566 Mbits/sec    1    990 KBytes       
[  5]   3.00-4.00   sec  62.5 MBytes   524 Mbits/sec    0    781 KBytes       
[  5]   4.00-5.00   sec  62.5 MBytes   524 Mbits/sec    0    812 KBytes       
[  5]   5.00-6.00   sec  63.8 MBytes   535 Mbits/sec    0    792 KBytes       
[  5]   6.00-7.00   sec  72.5 MBytes   608 Mbits/sec    0    795 KBytes       
[  5]   7.00-8.00   sec  66.2 MBytes   556 Mbits/sec    0    846 KBytes       
[  5]   8.00-9.00   sec  76.2 MBytes   640 Mbits/sec    0    911 KBytes       
[  5]   9.00-10.00  sec  81.2 MBytes   682 Mbits/sec    0    882 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   708 MBytes   594 Mbits/sec    1             sender
[  5]   0.00-10.01  sec   706 MBytes   591 Mbits/sec                  receiver

On the server side you will see results such as …

Accepted connection from REMOTE_HOST, port 39274
[  5] local REMOTE_HOST port 5201 connected to REMOTE_HOST port 39276
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  78.8 MBytes   661 Mbits/sec                  
[  5]   1.00-2.00   sec  73.2 MBytes   614 Mbits/sec                  
[  5]   2.00-3.00   sec  67.4 MBytes   566 Mbits/sec                  
[  5]   3.00-4.00   sec  62.8 MBytes   527 Mbits/sec                  
[  5]   4.00-5.00   sec  62.2 MBytes   522 Mbits/sec                  
[  5]   5.00-6.00   sec  63.8 MBytes   535 Mbits/sec                  
[  5]   6.00-7.00   sec  72.0 MBytes   604 Mbits/sec                  
[  5]   7.00-8.00   sec  66.6 MBytes   559 Mbits/sec                  
[  5]   8.00-9.00   sec  76.8 MBytes   644 Mbits/sec                  
[  5]   9.00-10.00  sec  81.0 MBytes   679 Mbits/sec                  
[  5]  10.00-10.01  sec  1004 KBytes   624 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.01  sec   706 MBytes   591 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

Step 4. To terminate the iperf3 server, press Ctrl-c on the keyboard.

Test for latency and packet loss between two computers using mtr

On either the node or gateway computer, start the test by running the following:
Replace REMOTE_HOST with the IP address or domain name of the other computer. It will take 3-5 minutes to complete.

$ mtr -o "J M X LSR NA B W V" -wbzc 100 REMOTE_HOST

The results of the test will look siliar to the following.

HOST: [REDACTED]                Jttr  Javg  Jmax  Loss%  Snt   Rcv    Last  Avg    Best   Wrst  StDev
  1. [REDACTED]   [REDACTED]    0.2   1.0   4.5   0.0%   100   100    3.2   4.1    2.3    7.5    0.9
  2. [REDACTED]   [REDACTED]    1.3   1.6  13.6   0.0%   100   100    3.9   4.1    2.2   16.7    2.6
  3. [REDACTED]   [REDACTED]    0.5   4.2  46.1   0.0%   100   100    2.2   4.8    1.5   48.5    8.1
  4. [REDACTED]   [REDACTED]    0.0   0.0   0.0  100.0   100     0    0.0   0.0    0.0    0.0    0.0
  5. [REDACTED]   [REDACTED]    0.0   0.0   0.0  100.0   100     0    0.0   0.0    0.0    0.0    0.0
  6. [REDACTED]   [REDACTED]    0.1   1.8  15.9   0.0%   100   100    3.5   4.4    2.6   19.4    2.7
  7. [REDACTED]   [REDACTED]    4.4   2.0  17.1   0.0%   100   100    9.3   7.8    4.5   25.6    3.2
  8. [REDACTED]   [REDACTED]    4.1   3.0  10.0   0.0%   100   100    4.3   8.3    3.6   14.6    2.5
  9. [REDACTED]   [REDACTED]    0.0   0.0   0.0  100.0   100     0    0.0   0.0    0.0    0.0    0.0
 10. [REDACTED]   [REDACTED]    0.0   0.0   0.0  100.0   100     0    0.0   0.0    0.0    0.0    0.0
 11. [REDACTED]   [REDACTED]    1.4   0.9   3.4  16.0%   100    84    3.2   4.6    3.2    7.5    0.9
 12. [REDACTED]   [REDACTED]    0.9   0.8   2.8   0.0%   100   100    4.1   3.9    2.9    6.4    0.7

You may notice in the output above, hops 4, 5, 9 and 10 show a 100% packet loss. 100% packet loss does not always indicate a problem. Reading the results of mtr requires some practice and an understanding of the path you are testing. So before you jump to conclusions, visiting one of the many websites which discuss how to interpret and understand mtr results is a good idea.

Thanks for running a node!
Keith

3 Likes