Skip to content
BENIBIX Learn

Latency, Bandwidth and Ping

Level 3 · How data travels

The three numbers that say how fast a line feels: latency, bandwidth and throughput. How ping measures the wait, and which number to fix first.

Course contentsLesson 8 of 13

After this lesson you can

  • Tell latency from bandwidth
  • Measure latency with ping
  • Say which number limits a given task

12 mincovers 4 glossary entries

Worth reading first: TCP and UDP Protocols

Why a fast line can still feel slow

Three numbers say how fast a network is, and they are not the same. Latency is the wait before data arrives, counted in milliseconds. Bandwidth is the most data the line can carry each second. Throughput is how much really gets through. A line can have huge bandwidth and still feel slow, because of latency.

Latency comes mostly from distance and from each box on the way. Light in a glass fibre covers about 200 kilometres every millisecond. So London to New York and back takes at least about 56 milliseconds, and closer to 70 in real life. No upgrade can beat the speed of light.

Bandwidth is counted in bits each second, such as 100 megabits. Files are counted in bytes, and one byte is 8 bits. So a 100 megabit line moves at most about 12.5 megabytes each second. That gap of 8 is the most common cause of a download that looks slower than the plan.

Throughput is what you really get, and it is always below the bandwidth. Other users share the line, packets get lost and sent again, and the far server may be slow. A road is built for so many cars an hour, but how many get through depends on traffic.

The ping command measures latency. It sends a tiny packet to a machine and times how long the answer takes. The result is the round trip, there and back, in milliseconds. Under 20 is excellent for a nearby server. Over 150 makes calls and games feel laggy.

Different tasks need different numbers. A big download needs bandwidth. A web page made of 80 small files needs low latency, because each file costs a round trip. A video call needs a little of both, and above all a steady line.

People often pay for more bandwidth to fix a laggy game. A faster plan rarely cuts the wait, because the game server is just as far away. A server in your own region does far more. Some machines also refuse to answer ping. So no reply does not always mean a machine is down.

console
$ ping -c 3 emmas-shop.com
64 bytes from 203.0.113.10: icmp_seq=1 ttl=56 time=21.4 ms
64 bytes from 203.0.113.10: icmp_seq=2 ttl=56 time=20.9 ms
64 bytes from 203.0.113.10: icmp_seq=3 ttl=56 time=21.1 ms
Three tries, about 21 milliseconds each, there and back. The -c 3 stops it after three.

Latency, bandwidth and throughput side by side

NumberWhat it measuresCounted inFix it by
LatencyThe wait before data arrivesMillisecondsA closer server
BandwidthThe most the line can carryMegabits a secondA bigger plan
ThroughputWhat really gets throughMegabits a secondLess sharing, fewer losses

Which number to fix first

  1. 1

    Fix latency

    When pages with many small parts load slowly, or calls and games lag.

  2. 2

    Fix bandwidth

    When big downloads and uploads take too long and the line is full.

  3. 3

    Fix throughput

    When you get far less than your plan, even though the line is not full.

Ping times one tiny packet there and back. That round trip is the latency.

Worked example

Emma's slow download

Emma pays for 200 megabits. A 1 gigabyte file takes about 50 seconds to download, and she thinks the line is broken.

200 megabits is 25 megabytes a second, so 1 gigabyte needs at least 40 seconds. Her throughput is about 80 percent of the bandwidth, which is normal.

The words for this lesson4

Check yourself

A game lags even after you doubled your internet plan. What is the most likely cause?

Finished this lesson?

Marking it complete also marks its 4 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.