Why Test Network Throughput on Ubuntu Server?
If you're running an Ubuntu server, knowing your actual network speed matters. Whether you're hosting a website, running a game server, or managing file transfers, your network throughput — the real amount of data your connection moves per second — affects everything. Let's walk through the best ways to measure it, the tools you'll need, and what good numbers look like.
You can start with a quick browser-based check by running a speed test from any machine on the same network. But for server-specific testing, you'll want command-line tools that give you deeper, more accurate results.
What Is Network Throughput?
Throughput is the actual data transfer rate your network delivers. It's different from bandwidth, which is the maximum capacity of your connection. Think of bandwidth as a highway's speed limit and throughput as how fast cars are actually moving during rush hour. You almost never hit the theoretical max.
Throughput vs. Bandwidth vs. Speed
People use these terms interchangeably, but they mean slightly different things:
- Bandwidth — The maximum data rate your connection supports (e.g., 1 Gbps Ethernet port).
- Throughput — The actual data rate you achieve after overhead, congestion, and latency eat into bandwidth.
- Speed — A general term that usually refers to throughput in everyday use.
On a 1 Gbps Ethernet link, real throughput typically lands between 900–940 Mbps due to protocol overhead. If you're seeing 400 Mbps on that same link, something's wrong — and testing helps you find it.
Best Tools for Testing Throughput on Ubuntu
Ubuntu has several free, reliable tools for measuring throughput. Here's a breakdown of the most common options and what each one does best.
| Tool | Best For | Tests LAN? | Tests WAN? | Install Command |
|---|---|---|---|---|
| iperf3 | LAN throughput between two machines | Yes | Yes (with remote server) | sudo apt install iperf3 |
| speedtest-cli | Internet speed to public servers | No | Yes | sudo apt install speedtest-cli |
| nuttcp | Detailed TCP/UDP throughput analysis | Yes | Yes | sudo apt install nuttcp |
| netperf | Advanced latency and throughput benchmarks | Yes | Yes | sudo apt install netperf |
Using iperf3 (The Go-To Tool)
iperf3 is the most popular choice for server throughput testing. It measures the raw speed between two endpoints — either two machines on your local network or your server and a remote iperf3 server on the internet.
Here's how to set it up. You need two machines: one acts as the server, the other as the client.
On the server machine:
iperf3 -s
This starts iperf3 in server mode, listening on port 5201 by default.
On the client machine:
iperf3 -c 192.168.1.100
Replace the IP with your server's address. The test runs for 10 seconds and gives you a throughput result. A healthy 1 Gbps Ethernet connection should show 900–940 Mbps. For a 10 Gbps link, expect around 9.3–9.5 Gbps.
Want to test UDP throughput instead of TCP? Add the -u flag and set a target bitrate:
iperf3 -c 192.168.1.100 -u -b 1G
Using speedtest-cli for Internet Speed
If you want to measure your server's internet connection — not just LAN performance — speedtest-cli works well. After installing it, just run:
speedtest-cli
It picks the nearest server and tests download speed, upload speed, and ping. For more context on what good upload numbers look like, check out our guide on what is a good upload speed.
How to Read Your Results
Getting numbers is easy. Understanding them is where the value is. Here's what to look for.
Expected Throughput by Connection Type
| Connection Type | Rated Speed | Realistic Throughput | Red Flag Below |
|---|---|---|---|
| 100 Mbps Ethernet | 100 Mbps | 92–95 Mbps | 70 Mbps |
| 1 Gbps Ethernet | 1,000 Mbps | 900–940 Mbps | 500 Mbps |
| 10 Gbps Ethernet | 10,000 Mbps | 9,300–9,500 Mbps | 6,000 Mbps |
| 500 Mbps ISP plan | 500 Mbps | 400–480 Mbps | 250 Mbps |
What Causes Low Throughput?
If your numbers are below the "red flag" thresholds above, here are the usual suspects:
- Duplex mismatch — Your NIC is stuck on half-duplex instead of full-duplex. Check with
ethtool eth0. - MTU issues — The default MTU is 1500 bytes. Mismatched MTU between endpoints causes fragmentation and drops. Jumbo frames (MTU 9000) can boost LAN throughput by 10–15% if both ends support them.
- CPU bottleneck — On older servers or VMs with limited CPU, the processor can't keep up with high-speed data. Check with
topduring iperf3 tests. - TCP window size — On high-latency links, you might need a larger TCP window. Use
iperf3 -c IP -w 4Mto test with a 4 MB window. - Bad cable or NIC — A damaged Ethernet cable can negotiate at 1 Gbps but only deliver 100 Mbps of actual throughput. Swap the cable first.
If your server's internet speed falls short of what you're paying for, our article on why your speed is lower than your plan covers the most common reasons.
Advanced Testing Tips
Test in Both Directions
By default, iperf3 tests from client to server (upload from the client's perspective). Add the -R flag to reverse the direction:
iperf3 -c 192.168.1.100 -R
This tests download throughput from the server. Always test both directions — asymmetric results often point to a misconfigured NIC or a congested uplink port on a switch.
Run Parallel Streams
A single TCP stream sometimes can't fill a high-speed link, especially over long distances. Use the -P flag to run multiple parallel streams:
iperf3 -c 192.168.1.100 -P 4
Four parallel streams can push total throughput 20–30% higher on some links compared to a single stream. If parallel streams help a lot, your TCP tuning needs work.
Check for Packet Loss and Latency Too
Throughput alone doesn't tell the full story. High latency (delay) and packet loss (dropped data) can tank performance even when raw throughput looks decent. Run a packet loss test alongside your throughput tests. For latency, use the ping command or a dedicated ping test.
On Ubuntu, you can check latency quickly:
ping -c 20 8.8.8.8
For a local server, anything under 1 ms is normal. For internet targets, under 30 ms is good, and under 50 ms is acceptable for most applications.
Automate Regular Testing
Set up a cron job to run speedtest-cli or iperf3 at regular intervals and log the output. This helps you spot patterns — like throughput dropping every evening when traffic peaks. A simple cron entry that runs every 6 hours:
0 */6 * * * speedtest-cli --simple >> /var/log/speedtest.log 2>&1
Quick Summary
Testing network throughput on Ubuntu is straightforward once you know the right tools. Install iperf3 for LAN testing between two machines, and speedtest-cli for checking your internet connection speed. Expect about 90–94% of your link's rated speed in real-world throughput. If you're getting less than 50–70%, check your cables, NIC settings, MTU, and TCP window configuration.
Test regularly, test in both directions, and don't forget to measure latency and packet loss alongside throughput. Those three metrics together give you the full picture of your server's network health. If you want to check how your ISP stacks up against others, take a look at our ISP speed rankings.