Computer networking is a complex topic. In this article, we'll be taking a deep dive on the nuances of network performance for those who need some additional explanation while striving to be concise, and to educate users of various experience levels relating computer hardware and computer networking.
If you just need to know how to perform a network performance test/benchmark, jump down to configuring iPerf.
Core Network Concepts
LAN vs WAN
With regards to network performance, it is crucial to first separate whether an issue is with Wide Area Network (WAN) performance, or if the issue is with Local Area Network (LAN) performance.
Your LAN is essentially the network inside your home or business. Many homes use a combination modem/router device provided by their Internet Service Provider (ISP). In some cases, especially in businesses, you may have a separate modem and router, along with other equipment connecting to the router such as a network switch.
Your modem, and the connection it establishes to your ISP—whether through coaxial cable, fiber, phone lines, or long-range wireless—essentially marks the point between the WAN and the LAN. The connection your modem makes to your ISP is the WAN, and any devices you connect through your router behind that modem belong to the LAN.
Link Rate
Almost every type of connection your computer makes to any piece of hardware will have a link rate of some kind. The link rate establishes how fast data can possibly be transferred across any given connection, but it does not guarantee how fast the hardware on either end of the connection will actually transfer data.
The concept of link rates, and their related bottlenecks, is likely best conveyed by giving an example of what connections might be involved in transferring a file from one computer on your LAN to another.
-
800Mbps—The file source is a USB 3.0 thumb drive capable of 100MB/s (800Mbps) read/write.
-
480Mbps—The USB 3.0 thumb drive is plugged into a USB 2.0 port on the PC, which has a maximum throughput of 480Mbps
-
1000Mbps—PC1's Ethernet connection establishes 1Gbps (1000Mbps) link to the router via Ethernet
-
300Mbps—The router connects to a second PC (we'll refer to this as PC2) via Wi-Fi, and it has established a 300Mbps link to the Wi-Fi adapter on PC2
-
480Mbps—The Wi-Fi adapter on PC2 is connected via a USB 2.0 port. The link rate of the USB connection to PC2 is at 480Mbps
-
6000Mbps—PC2 is going to store the file on an internal hard drive with a link rate of 6Gbps
-
1600Mbps—File Destination: SATA hard drive capable of 200MB/s (1600Mbps) read/write.
Following this chain, we see that 300Mbps is the slowest link rate established. This means that, regardless of the link rates established elsewhere, the absolute maximum the data can possibly be transferred is 300Mbps.
if we were to change the Wi-Fi connection to a wired Ethernet connection capable of 1Gbps, our performance bottleneck would then become the USB 2.0 connection to the USB drive where the file is stored.
Ports and Interfaces
Interfaces
A network interface represents connections, whether wired or wireless, that are made to form a network between devices.
Ports
Some may refer to physical hardware connections as "ports". For the purposes of networking, ports are logical constructs that can also be referred to as "network ports". Each network interface has 65,535 of these logical ports. Each port on a network interface is a separate data connection.
Benchmarking Network Adapter Performance
To properly benchmark network adapter performance, we need to:
- Use a simple LAN configuration
- Eliminate bottlenecks, especially link rate bottlenecks
Websites like speedtest.net, fast.com, and other performance tools in your web browser are going to use your WAN connection, and are not appropriate for determining if a network adapter is working well.
Transferring files from one computer to another on your LAN is typically not the best way to benchmark a network adapter. File transfers are bottlenecked by a number of things, including performance limitations of the disk the data is on, and often times a lack of establishing parallel network connections to perform the task.
One of the most accurate ways to benchmark network performance on a LAN is by using iPerf . To more effectively benchmark network adapter performance, it is best to establish a point-to-point connection between two PCs, rather than connecting through a router or switch.
Configuring iPerf
To test a connection using iPerf, you'll need at least two network interfaces, and preferably two computers. You'll also need to know the IP (Internet Protocol) address assigned to each network interface . One network interface will function as an iPerf server, and the other network interface will function as an iPerf client. Lastly, you'll need to download the version of iPerf 3.x that's appropriate for your computer's operating system and extract/install it .
- Make sure the drivers for both network interfaces involved in the test are using up-to-date drivers. Drivers for Plugable products can be found here.
- Download and extract iPerf for Windows
- Open Command Prompt
- Press Windows Key + R or + R, then enter
cmd
in the window that appears
- Search the Start Menu for
Command Prompt
, and open it
- Navigate Command Prompt to the directory the directory where iPerf is located
- The
cd
command is for 'change directory'- If you have a folder named 'iperf' on your Windows desktop, you can reach it in command prompt with the command
cd %USERPROFILE%\Desktop\iperf
- Run iperf in server mode via Command Prompt
- Usually it is best to install iperf on macOS using brew in Terminal
- Make sure the drivers for both network interfaces involved in the test are using up-to-date drivers
- Open Terminal
- Run iPerf in server mode
- Usually it is best to install iperf using the package manager in your Linux distro. For example, in Ubuntu, use
apt
:
- Make sure the drivers for both network interfaces involved in the test are using up-to-date Drivers
- Open Terminal
- Run iPerf in server mode
Next, you'll need to run iPerf in client mode, targeting the IP address of the server/interface where iPerf is running in server mode. Additionally, we'll run the test for 30 seconds using -t 30
and with four parallel connections using -P 4
. Running 4 parallel connections is optimal for saturating a network link.
- Open Command Prompt
- Press Windows Key + R or + R, then enter
cmd
in the window that appears
- Search the Start Menu for
Command Prompt
, and open it
- Navigate Command Prompt to the directory the directory where iPerf is located
- The
cd
command is for 'change directory'- If you have a folder named 'iperf' on your Windows desktop, you can reach it in command prompt with the command
cd %USERPROFILE%\Desktop\iperf
- Run iperf in client mode via Command Prompt (replace 192.168.0.200 with the IP address of the server/interface where iPerf is running in server mode)
iperf3.exe -c 192.168.0.200 -t 30 -P 4
- Open Terminal
- Run iPerf in client mode (replace 192.168.0.200 with the IP address of the server/interface where iPerf is running in server mode)
iperf3 -c 192.168.0.200 -t 30 -P 4
iPerf should start performing a network performance test. If the test fails to start, make sure that iPerf is not being blocked by your PC's/Mac's firewall.
Why iPerf is Ideal for Benchmarking
Unlike a file transfer, iPerf runs in memory on the PC and generates data to send using the CPU directly. This alleviates potential bottlenecks generated by storage devices, and allows you to explicitly control how many parallel connections are being used to transfer data rather than being unsure if parallel network connections are being used by other means.
Conclusion
There's a lot more to networking that isn't covered in this article, but we hope this helps explain enough to get an accurate measure of your network performance.
If you need assistance with your Plugable product that features network connectivity, please contact us for further assistance.