Delay and throughput

Two questions decide how fast a network feels: how long does one packet take to arrive (delay), and how many bits per second get through (throughput)?

Four delays at every hop

DelayCauseFormula
Transmissionpushing all the packet's bits onto the linkL / R: packet size ÷ link rate
Propagationthe signal travelling down the wire or aird / s: distance ÷ signal speed
Queueingwaiting behind other packets in a routerdepends on traffic
Processingthe router reading the header and choosing a linkusually microseconds

Transmission and propagation are often confused. Transmission is about the link's rate (bits per second): a 1500-byte packet on a 10 Mbps link takes 1.2 ms to put on the wire, whatever the distance. Propagation is about distance: signals travel at about 2 × 10⁸ m/s in cable, so 2000 km takes 10 ms, whatever the packet size.

packet_bits = 1500 * 8          # a 1500-byte packet
rate = 10_000_000               # 10 Mbps
distance = 2_000_000            # 2000 km, in metres
speed = 2e8                     # metres per second in cable

transmission = packet_bits / rate
propagation = distance / speed
print("transmission:", round(transmission * 1000, 3), "ms")
print("propagation:", round(propagation * 1000, 3), "ms")
print("total (no queueing):", round((transmission + propagation) * 1000, 3), "ms")
Open in compiler

Throughput and the bottleneck

A path is only as fast as its slowest link, the bottleneck. A file crossing a 100 Mbps link, then a 4 Mbps home line, then a 50 Mbps link arrives at 4 Mbps.

links = [100, 4, 50]            # Mbps, in order along the path
bottleneck = min(links)
file_bits = 32 * 1_000_000 * 8  # a 32 MB file
seconds = file_bits / (bottleneck * 1_000_000)
print("bottleneck:", bottleneck, "Mbps")
print("time for 32 MB:", seconds, "seconds")

in_flight = 10_000_000 * 0.010  # 10 Mbps x 10 ms
print("bits in the pipe:", int(in_flight))
Open in compiler

Note the units: networks count bits, files count bytes (8 bits), and network "mega" means 10⁶, not 2²⁰.

The bandwidth-delay product

Rate × propagation delay is the number of bits "in the pipe" at once. On a 10 Mbps link with 10 ms of propagation delay, 100,000 bits are on the wire at any moment. A sender that waits for a reply after every packet leaves most of that pipe empty: this is why the Reliable delivery lesson sends many packets at once.

Common mistakes

  • Forgetting to change bytes to bits (× 8) before dividing by a rate in bits per second.
  • Adding up the rates of the links on a path. The path runs at the smallest rate.
  • Treating queueing delay as fixed. It grows quickly as a link gets busy, which is when networks feel slow.

Quick check

1. A 1000-byte packet on a 1 Mbps link. What is the transmission delay?
2. Which delay depends on the distance between the two ends?
3. A path has links of 100, 5 and 20 Mbps. Its throughput is about:
4. How many bits is 2 megabytes, in network units?

Practice problems for this lesson

My notes

Write down what you want to remember from this lesson. Notes are saved on this device as you type, and appear on your dashboard.