Networking
Throughput vs Bandwidth vs Latency: What Actually Sets Network Speed
By NileVPS Team · Published · 5 min read
اقرأ المقال بالعربيA VPS plan lists a port speed, a speed test shows a different number, and a file download runs at a third speed. None of them is necessarily wrong. They measure different things. Bandwidth, throughput and latency are often used as if they meant the same thing, and that confusion leads to bad purchasing decisions and wasted troubleshooting time. This article separates the three concepts, shows how they interact, and explains how to measure what you actually get.
The three terms
Bandwidth is the maximum capacity of a link: how many bits per second it can carry in theory. A 1 Gbps port can move at most one billion bits per second, before any overhead.
Throughput is what you actually achieve: the real rate of useful data delivered over a period of time. It is always lower than bandwidth because of protocol overhead, congestion, loss, latency and the limits of the endpoints.
Latency is the delay for a packet to travel across the network, usually measured as round-trip time (RTT) in milliseconds. Our article on server latency covers how to measure and reduce it.
A simple analogy: bandwidth is the number of lanes on a road, latency is how long the trip takes, and throughput is how many cars actually arrive per hour.
| Bandwidth | Throughput | Latency | |
|---|---|---|---|
| Measures | Capacity | Actual delivered rate | Delay per trip |
| Unit | Mbps, Gbps | Mbps, Gbps (or MB/s) | Milliseconds |
| Set by | Link and port | Everything on the path | Distance, routing, queues |
| Upgrading the port helps? | Yes | Sometimes | No |
Note the units: network speeds are usually in bits (Mbps), while download tools often show bytes (MB/s). Divide bits by eight: 100 Mbps is about 12.5 MB/s at best.
How latency limits throughput
This is the part many people miss. A single TCP connection can only have a certain amount of unacknowledged data "in flight" at once; that amount is the window size. The sender must wait for acknowledgments before sending more. So the maximum throughput of one connection is roughly:
throughput ≈ window size / RTT
The amount of data that must be in flight to fill a link is the bandwidth-delay product (BDP):
BDP = bandwidth × RTT
For example, to fill a 1 Gbps path with an RTT of 50 ms, you need about 1,000,000,000 × 0.05 / 8 ≈ 6.25 MB in flight. If the TCP buffers on either side are smaller than that, a single connection cannot reach full speed, no matter how big the port is. That is why a transfer from a server on another continent can be slow while a transfer from a nearby server on the same plan is fast.
Packet loss makes this worse, because every loss event makes TCP shrink its window and then rebuild it over many round trips.
Other things that cap throughput
- The slowest link on the path: your home connection, the provider's uplink, or a congested peering point.
- Disk speed: downloading a large file from a server is limited by how fast the disk can read it if it is not cached.
- CPU: encryption (TLS, VPN, SSH), compression, and packet processing all use CPU. A tunnel on a small VPS may be CPU bound long before the port is full.
- Application limits: rate limits in Nginx, download managers using one stream, or an app that waits for each response before sending the next request.
- Traffic shaping: some networks deliberately limit speed for certain traffic types or after a usage threshold.
Measuring real throughput
iperf3 between two machines
iperf3 measures raw network throughput without disks or web servers in the way. Install it on the server and on a test client:
sudo apt install iperf3On the server (open TCP port 5201 in your firewall first, and close it afterward):
iperf3 -sOn the client:
iperf3 -c your-server-ip -t 20 # client to server
iperf3 -c your-server-ip -t 20 -R # server to client
iperf3 -c your-server-ip -t 20 -P 4 # four parallel streamsIf four parallel streams reach much more than one stream, the limit is likely per-connection (window size and latency), not the link itself.
Real-world downloads
curl -o /dev/null -w "%{speed_download} bytes/sec\n" https://example.com/largefile.binThis includes disk, web server and TLS, so it reflects what users experience.
Watch live traffic on the server
sudo apt install nload
nload eth0Or use vnstat for history over days and months.
Improving throughput
- Reduce RTT by choosing a server location close to the users or the other servers you exchange data with.
- Allow TCP windows to grow. Modern Linux auto-tunes buffers, but the maximums can be raised for high-BDP paths:
sudo sysctl -w net.core.rmem_max=16777216
sudo sysctl -w net.core.wmem_max=16777216
sudo sysctl -w net.ipv4.tcp_rmem="4096 131072 16777216"
sudo sysctl -w net.ipv4.tcp_wmem="4096 16384 16777216"Put the lines in a file under /etc/sysctl.d/ to keep them after reboot, and test before and after.
- Enable BBR congestion control, which tends to keep throughput higher on long or lightly lossy paths.
- Use parallel streams for bulk transfers, for example
rclonewith multiple transfers. - Check CPU when encryption is involved; a plan with more cores may help more than a faster port.
When comparing plans, look at the port speed and traffic allowance on the pricing page, but remember that location often matters as much as the number on the port.
FAQ
Why is my speed test lower than the advertised port speed?
The port speed is the capacity of the server's link. A test measures the whole path, including your connection, the routes between networks, latency and the test server itself. Any one of them can be the bottleneck.
Does more bandwidth reduce latency?
No. More bandwidth lets more data flow at the same time, but each packet still takes the same time to travel the distance. A bigger pipe helps with large transfers, not with the delay of each request.
Why are parallel downloads faster than a single one?
Each TCP connection is limited by its window size divided by the round-trip time. Several connections each get their own window, so together they fill more of the available bandwidth, especially on long-distance paths.