Latency, bandwidth and throughput: what is the difference and why does it matter?
BeginnerScenarioPerformance, MTU, Latency & Tools
Answer
Situation read → People mix these up and then buy bandwidth to fix a latency problem.
What I'd do →
- Latency is the time for a packet to travel (RTT in ms)
- Bandwidth is the link capacity (Mbps or Gbps)
- Throughput is what you actually achieve, limited by latency, window size, loss and CPU
- Measure RTT with
ping -c 10 hostand throughput withiperf3 -c host - A 1 Gbps link with 200 ms RTT still gives slow single-stream transfers
Why → TCP needs acknowledgements, so high RTT caps throughput regardless of link speed.
Interview tip → Say the formula: throughput is at most window size divided by RTT.
More on Performance, MTU, Latency & Tools
When do you use ping, traceroute and mtr?BeginnerWhat is MTU and what is the usual value?BeginnerHow do you check what is listening on a port and who is connected?BeginnerHow do you measure where time goes in a slow HTTP request?BeginnerWhat does tcpdump do and what are the first filters you use?BeginnerTCP or UDP: how do you choose for an application?Beginner