How to Test Server Network Speed: Methods, Metrics, and Best Practices

The network speed, and more importantly, “network consistency”, affects every aspect of your Linux server. Slow throughout means delays and lost packets result in broken APIs, especially if you are dealing with network-reliant workloads.
It doesn’t matter whether you’re running a dedicated or cloud infrastructure; every team needs to know exactly how to measure network performance. In this guide, we’re not going to rely on assumptions or predictions; we’re going to cover several methods to test your network speed with precision and diagnose issues early on.
Key Network Metrics You Must Know
Before you start running tests, it’s best to ensure that you understand what you are measuring. Network speed is not a single metric. There are different variables, each of which is related to a different aspect of the network. Here’s a quick breakdown:
| Metric: | Measurement: | Meaning: |
| Latency (ms) | Round-trip time between two systems. | High latency slows APIs, replication, and user response times. |
| Packet Loss (%) | Percentage of packets that fail to arrive. | Even 1 percent reduces TCP throughput and stability. |
| Download Speed (Mbps or Gbps) | Inbound throughput to your server. | Impacts restores, updates, and data ingestion. |
| Upload Speed (Mbps or Gbps) | Outbound throughput from your server. | Affects website delivery, streaming, and replication. |
| Jitter (ms) | Variation in latency over time. | Disrupts VoIP, live streaming, and real-time systems. |
Let’s get into the first method of measuring these variables.
Method 1: Using Speedtest CLI
Speedtest CLI is a public internet performance monitoring tool available for various operating systems, including Linux distributions. It’s undoubtedly the most popular tool among DevOps because of its simplicity and precision combined.
Using Speedtest CLI, you can test download speed, upload speed, latency (ms), and any lost packets, providing you with a clear network picture.
Step 1: Install Speedtest CLI
To install Speedtest CLI, we’re going to use the official Ookla version.
Ubuntu and Debian
sudo apt-get install curl
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
sudo apt-get install speedtestCentOS, AlmaLinux, Rocky Linux
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.rpm.sh | sudo bashAlternatively, you can straightforwardly download the installer through the official speedtest.net website. The available Linux OS download files are i386, x86_64, armel, armhf, and aarch64.
Step 2: Basic Network Test
speedtest --accept-license --accept-gdprThe tool will automatically select a nearby server and then measure all the basics, including latency, download speed, upload speed, and packet loss.
Here’s an example output:
- Latency: 1.95 ms
- Download: 871.14 Mbps
- Upload: 767.41 Mbps
- Packet Loss: 0.1%
This instantly shows you how fast and how consistent your Linux server network speed is. The latency, download, and upload tell us how fast the network is running, while the packet loss shows potential inconsistencies.
Here are a few more commands to try on Speedtest CLI:
| List all the available servers | speedtest -L | |
| Run against a specific server | speedtest -s SERVER_ID | |
| Export results for monitoring | speedtest -f json | |
To wrap Speedtest CLI up, we can say that it’s a surface-level tool, but it does offer everything you need for basic monitoring, logging, and parsing.
Method 2: Using iPref3 Testing
iPerf3 measures the raw throughput between two machines. It gives you precise control over streams, protocols, and direction. Use it to test internal traffic, cross-data-center links, private VLANs, or replication paths.
Unlike Speedtest, iPerf3 requires two servers. This means that you’ll need to install the tool on the two servers that you’ll be using to measure the connection.
Step 1: Install iPref3
The installation of iPref3 remains simple:
Ubuntu or Debian
sudo apt update
sudo apt install iperf3 -yCentOS, AlmaLinux, Rocky Linux
sudo yum install iperf3 -yStep 2: Start the iPref3 Server
On the destination server, you need to start listening. It uses 5201. This means that if there is a firewall running, you must open this port.
First, start the listener:
iperf3 -sOpen 5201 (if needed):
sudo firewall-cmd --add-port=5201/tcp --permanent
sudo firewall-cmd --reloadStep 3: Run Test from the Client
Now we’re back on the client-server. This is where we’re going to start the text and observe the feedback from the destination listener.
From the source server:
iperf3 -c SERVER_IPNote: Replace “SERVER_IP” with the IPv4 of the destination server!
The output should look something like this:
- [SUM] 0.00-10.00 sec 10.8 GBytes 9.29 Gbits/sec
Here we can see for how long the test has been running, and the exact network speed during this time. You can run the command multiple times, compare the speed, and analyze problems.
Here are some additional iPref3 commands you can use:
| Run parallel streams | iperf3 -c SERVER_IP -P 4 |
| Test reverse direction | iperf3 -c SERVER_IP -R |
| Test UDP & packet loss | iperf3 -c SERVER_IP -u -b 1G |
💡Quick Explanation:
- -P 4 runs four parallel connections. Increase the number on 10G, 25G, or 100G ports to better saturate the link.
- -R reverses the test direction to verify symmetric throughput.
- -u enables UDP mode, and -b 1G sets the target bandwidth. UDP testing reports jitter and packet loss.
What’s unique about iPref3 is that it provides depth. You have two servers, and you can analyze the network between them from A-Z. You can measure exactly how these servers communicate, and whether something is slowing them down.
See Also: Smart Routing Explained: Intelligent Network Optimization
Method 3: Using Natcat Testing
Unlike Speedtest CLI and iPref3, Netcat is a more raw way to measure TCP transfer between two Linux servers. At its core, it does not calculate bandwidth automatically. It measures how much data is transferred over a specific time frame.
What’s unique about Natcat is that it’s very light. DevOps teams keep it on their servers at all times as a quick way to test internal network connectivity.
Step 1: Install Natcat
As always, the installation can’t be any simpler:
Ubuntu or Debian
sudo apt install netcat -yCentOS, AlmaLinux, Rocky Linux
sudo yum install nc -yStep 2: Start Listener
Similar to iPref3, with Netcat, you must start the listener service on the receiving server:
nc -l -p 5001 > /dev/nullThis opens port 5001 and discards incoming data. Don’t forget to open port 5001 if there is a running firewall on your receiving server:
sudo firewall-cmd --add-port=5001/tcp --permanent
sudo firewall-cmd --reloadStep 3: Send the Data
From your source server, send the data:
dd if=/dev/zero bs=1M count=1024 | nc SERVER_IP 5001Here’s a breakdown of exactly what this does:
- First, the “dd” will generate 1 GB of zero data.
- bs=1M count=1024, which is exactly 1024 MB.
- The data will stream through Netcat to the host.
In the meantime, the tool measures exactly what is going on. So, for instance, if this 1GB goes in for 1 second, you’ll get an output of about 8 Gbps.
You can also add time management for clearer results:
time dd if=/dev/zero bs=1M count=2048 | nc SERVER_IP 5001In this example, 2GBs are transferred; if completed in 2 seconds, you get 15 gigabits = 8 Gbps.
See Also: How to Allocate an IP Address to a Virtual Server
Method 4: Using curl and wget
Unlike the other tools we’ve reviewed, using curl and wget, you can get accurate results of the real-world download performance. In this case, you’re not generating test data or measuring the speed between two servers; you’re connecting to actual HTTP or HTTPS endpoints for testing.
The method of using curl and wget is primarily used to verify CDN performance, create backup mirrors, or check the speed of a large file migration.
To perform the test, we’re going to need to start downloading a file.
Test Download Speed with wget
We’re going to download a 1GB test file from a URL of your choice:
wget -O /dev/null [INSERT DIRECT FILE DOWNLOAD URL HERE]While downloading, you get live transfer speed in MB/,s and when the download is ready, wget will show you the total download speed, e.g, 196 MB/s.
If you want to convert it to Gbps, just:
- 202 MB/s × 8 = 1.61 Gbps
Quick Tip: You can use wget to test speeds at different times and identify congestion patterns.
Test Download Speed with curl
With curl, we’re pretty much doing the exact same thing with the URL:
curl -o /dev/null [INSERT DIRECT FILE DOWNLOAD URL HERE]With curl, you need an extra command to display the average speed:
curl -o /dev/null -s -w "%{speed_download}\n" [INSERT DIRECT FILE DOWNLOAD URL HERE]Note: To convert the output to megabytes, just divide by 125,000.
The best part about testing with wget and curl is that you can find URLs offering dummy files for testing purposes from different countries. This way, you can identify specific CDN issues that are location-based and may affect a good portion of your services.
If you want to do further testing, you can try ServerMania Network Test Tool.
See Also: How to Configure Network Switches?
Need Consistent High-Speed Network Performance?

Testing is always the first step. If your current network performance is falling short, the right infrastructure can make an immediate difference.
Here at ServerMania, we offer robust network infrastructure through our public cloud (AraCloud) and dedicated servers. We know the true meaning of zero latency, no congestion, and 99.99% uptime SLA.
With ServerMania, you get:
- Unmetered dedicated servers for predictable bandwidth usage
- 10 Gbps to 100 Gbps unmetered servers for higher throughput
- Data center locations across North America, Canada, and Europe
Curious to learn more about optimizing your network infrastructure? Don’t hesitate to book a free consultation with a network technician.
💬 If you want to get in touch with us immediately, contact our 24/7 customer support. We’re online and available to speak with you right now.
Was this page helpful?
