Test Network and Connection Quality - FederatedAI/eggroll GitHub Wiki
Like other network related applications, the performance of RollSite largely depends on proper configurations. To well tune RollSite, the actual network and connection quality measurement is a prerequisite.
We provided 2 scripts to test the network and connection quality. They both based on iperf3, acting as server and client.
iperf3 is an open source tool to measure IP networks. It can be installed via apt-get or yum in many Linux distributions and brew in Mac. For more information about iperf3, please visit https://iperf.fr/.
1. server
usage: ${EGGROLL_HOME}/bin/iperf3-server.sh ${port}
example: ${EGGROLL_HOME}/bin/iperf3-server.sh 9370
parameters:
port - specifies a port which iperf server binds on and listens to
2. client
usage: ${EGGROLL_HOME}/bin/iperf3-client.sh ${ip} ${port} ${bandwidth}
example: ${EGGROLL_HOME}/bin/iperf3-client.sh 192.168.0.1 9370 50m
parameters:
ip - specifies the ip address where the corresponding iperf3-server.sh runs
port - specifies the port where the corresponding iperf3-server.sh runs
bandwidth - the bandwidth between the 2 sites. This is used by iperf3 to simulate network speed
3. notes
3.1. iperf3-server.sh and iperf3-client.sh are run manually when needed (and possibly consented). Operators on both sites need to be coordinate to perform a network and connection test.
3.2. There are 8 tests in the client script:
-
- TCP test at specified bandwidth (bps) (e.g. at 10m), client to server;
-
- TCP test at specified bandwidth (bps) (e.g. at 10m), server to client;
-
- TCP test at 1mbps, client to server;
-
- TCP test at 1mbps, server to client;
-
- TCP test at specified bandwidth (bps) (e.g. at 10m), 10 parallel connection threads, client to server;
-
- TCP test at specified bandwidth (bps) (e.g. at 10m), 10 parallel connection threads, server to client;
-
- UDP test at specified bandwidth (bps) (e.g. at 10m), client to server;
-
- UDP test at specified bandwidth (bps) (e.g. at 10m), server to client.
Each test takes 10 sec, so a total of 80 sec required for all 8 tests to complete. iperf3 prints certain logs and results on stdout. Via these logs can we know the actual bandwidth and quality.