Networking related issues can be some of the most annoying and odd problems to troubleshoot. Particularly in the case when moving data over the Internet. The Internet is more like a living organism than a consistent medium.
In this article, I will look at how to get a baseline of how well the network should be performing. There are several other issues to consider that are not networking-related when troubleshooting a slow data transfer. Considered and eliminate the other potential performance issues before blaming the network.
TLDR: Use iPerf
Network Setup
There are several factors to consider when determining why your network connection is not operating as expected. To start, we need to list all the components that are apart of the networking function we are testing. For my example, I am troubleshooting a slow transfer speed of data. I am moving a large file from a server to another. Let’s review the characteristics of the data transfer so we can build a test around it.
Answer the following questions.
- What direction is the data moving? Server-A is copying data to Server-B. So Server-A is uploading while Server-B is downloading data. The direction of data is important because uploading and downloading do not always run at the same speed.
- What time of day does the transfer occur? Is this data transfer a backup job running during the night? Other networking activities will impact your performance. So it is key to run the test with the same conditions that the normal data transfer operation would have.
Network Testing Tool
To test the network traffic throughput I will be using a tool called iPerf. This tool will generate random data to move between two points on a network. iPerf will create as much data as our network can handle, showing us the highest bandwidth our network can achieve. This tool is more accurate than using an online speed test site. Speed Test sites will only show the bandwidth speed between the testing device and the Speed Test site. The network path will not be the same path between Server-A and B.
The tool does not need to be installed in Windows operating systems. The program can execute as a standalone EXE. You will need to have the EXE running on both systems that you will be testing. For Linux/Unix systems or even Android systems, the iPerf package will need to be installed in the OS. The two systems you are testing with do not have to be the same OS, but both must be using the same version of iPerf.
Network Testing Method
To get accurate results you should try to conduct this test during the same time the data transfer would normally run. This is not required but is a good practice. Remember you will need to disable the normal data transfer during the test. With iPerf we want to run as a client on Server-A, to send data to the iPerf Server on Server-B. This way the data transfer flow will be consistent with the normal data transfer operation.
On Server-B we need to start the iPerf Server. Open a command prompt and move into the downloaded and extracted iPerf folder with the EXE file in it. Now run the following command.
PS C:\iperf-3.1.3-win64> .\iperf3.exe -s {Server-B-IP} -p 555
PS C:\iperf-3.1.3-win64> .\iperf3.exe -s 10.10.10.232 -p 555
Note that you can use any port number as long as the port is not already in use. You may also need to configure the firewall to allow incoming connections on the iPerf port. In this example, I chose port 555 to be the iPerf Server port.
Now on the client-side Server-A, we will start the data transfer test.
PS C:\iperf-3.1.3-win64> .\iperf3.exe -c {Server-B-IP} -p 555
PS C:\iperf-3.1.3-win64> .\iperf3.exe -c 10.10.10.232 -p 555
Below are the results of the test.
From the above image, we can see that our connection between Server-A and Server-B has a throughput of around 930 MegaBits per second or 111 MegaBytes per second(box #2). During this test, we moved a total of 1.08 GigaBytes of data(box #1). The network connecting these two systems is using 1Gig switches, so these are good results.
Advanced Testing
While the simple test works well, I have found it is not always 100% accurate. Over long data transfers, the connection speed can fluctuate. There are a few additional iPerf options you can add to have the test run longer and see how the connection changes over time. The “-t” option specifies the amount of time to test. Here I have set it to run for one hour. iPerf will provide a reading every second so you can see the current transfer speed.
At Client-Side
PS C:\iperf-3.1.3-win64> .\iperf3.exe -c {Server-B-IP} -p 555 -t 3600
1 Pingback