Sub topic 12
Bandwidth, throughput and the bottleneck link
This chapter assumes you know what bits, bytes and bits per second are. It also assumes you can convert between milli, kilo, mega and giga. It builds on the packet-switching and delay chapters. There, a link's transmission rate decided how long a packet took to push onto the wire. Here the question is how fast data actually flows from one end of a path to the other.
Bandwidth and throughput are different quantities
Two words are often mixed up in exam questions.
- Bandwidth (or link rate, capacity) is the maximum number of bits per second a link can transmit. It is a property of the link. A 100 Mbps Ethernet link has a bandwidth of 100 Mbps whether or not anything is sent.
- Throughput is the number of bits per second actually delivered between two endpoints over some period. It is a property of a transfer. It is never larger than the bandwidth of the slowest link it crosses.
A road is a good comparison. The bandwidth is how many cars per minute the road can carry at best. Throughput is how many cars per minute actually arrive. Roadworks, traffic lights and other drivers lower the second number and leave the first unchanged.
Throughput can also be measured two ways.
- Instantaneous throughput is the rate at a given moment.
- Average throughput is the total bits delivered divided by the total time,
F / Tfor a file ofFbits that takesTseconds. Most GATE questions mean this one.
Units
Rates in networking use powers of ten: 1 kbps = 10^3 bps, 1 Mbps = 10^6 bps, 1 Gbps = 10^9 bps. File sizes are bytes, and a byte is 8 bits. A common slip is dividing a size in megabytes by a rate in megabits per second without multiplying by 8.
The bottleneck link
Data crossing several links in a row can move no faster than the slowest one. That link is the bottleneck link. If one flow has the path to itself, its throughput is:
throughput = min(R1, R2, ..., Rn)
Faster links ahead of the bottleneck cannot speed anything up. A queue builds in front of the bottleneck. Faster links after it sit partly idle, because the bottleneck delivers data to them more slowly than they could carry it.
For the path in the diagram, the throughput is min(2, 5, 1) = 1 Mbps. Upgrading the 5 Mbps link to 50 Mbps changes nothing. Upgrading the 1 Mbps link to 3 Mbps raises the throughput to 2 Mbps, because the server link becomes the new bottleneck.
Transfer time for a large file
For a large file, the time to transfer it is roughly:
T = F / throughput (+ propagation delay of the path)
Suppose the server in the diagram sends a 4 MB file, using 1 MB = 10^6 bytes. The file is 4 × 10^6 × 8 = 32 × 10^6 bits. At 1 Mbps the transfer takes 32 seconds. Propagation delay of a few milliseconds is negligible next to that. The formula also leaves out the short pipeline fill time, which the chapter on store-and-forward delay covers.
If the last link were 4 Mbps, the bottleneck would move to the 2 Mbps server link and the time would drop to 16 seconds.
Sharing a bottleneck
Links in the middle of a network usually carry many flows at once. If N flows share a link of rate R and the link divides its capacity equally, each flow gets about R / N from it. For a flow whose path has a server link Rs, a client link Rc and one shared link R:
throughput per flow = min(Rs, Rc, R / N)
The bottleneck depends on load. With few flows, the access links (Rs or Rc) limit the speed. With many flows, the shared link takes over. The code below uses the numbers from the diagram, but treats the 5 Mbps link as shared.
def flow_throughput(server_bps, client_bps, shared_bps, flows):
"""Per-flow throughput when `flows` equal flows share one link."""
return float(min(server_bps, client_bps, shared_bps / flows))
def transfer_time(file_bits, throughput_bps):
return file_bits / throughput_bps
FILE_BITS = 4_000_000 * 8 # a 4 MB file, with 1 MB = 10^6 bytes
for n in (1, 5, 10):
t = flow_throughput(2_000_000, 1_000_000, 5_000_000, n)
print(n, t, transfer_time(FILE_BITS, t))
# 1 1000000.0 32.0
# 5 1000000.0 32.0
# 10 500000.0 64.0With 1 flow or 5 flows, the 1 Mbps client link is the bottleneck: 5 / 5 = 1 Mbps, so the shared link only ties with it at 5 flows. At 10 flows the shared link gives each flow 0.5 Mbps and becomes the bottleneck. The transfer time doubles.
Throughput versus goodput
Throughput as defined so far counts every bit delivered, including headers. The useful data that the application receives is called goodput. Each packet carries headers, and lost packets are sent again. Both reduce goodput below throughput.
For headers, the fraction of useful bits is:
efficiency = payload / (payload + header)
Take a 10 Mbps link carrying 1500-byte packets, where 40 bytes of each are headers. The payload is 1460 bytes. The efficiency is 1460 / 1500 ≈ 0.9733, so the best possible goodput is about 9.73 Mbps. Small packets are worse. With 100-byte packets and the same 40-byte header, the efficiency falls to 60 / 100 = 0.6, so the goodput is at most 6 Mbps.
Utilization
Utilization compares what a link carries with what it could carry:
utilization = throughput / bandwidth
On the diagram's path, the 1 Mbps bottleneck is fully used, with utilization 1. The 5 Mbps link carries the same 1 Mbps, so its utilization is 1/5 = 0.2. Only the bottleneck link of a single flow can reach full utilization. A later chapter shows why queues grow rapidly as utilization nears 1.
Working a GATE-style problem
A host sends a file over a path of three links with rates 1 Mbps, 2 Mbps and 500 kbps. The file is 1 MB, taken as 10^6 bytes. Ignore propagation and queuing. How long does the transfer take?
- Convert the rates to the same unit: 1,000,000, 2,000,000 and 500,000 bps.
- The bottleneck is the minimum, 500,000 bps.
- The file is 8 × 10^6 bits.
- T = 8 × 10^6 / 500,000 = 16 seconds.
A trap here is to add the per-link times, 8 + 4 + 16 = 28 seconds. That is the answer only when the whole file must be received at each router before the next link starts, as in message switching. When the file is split into many small packets, the links work in a pipeline and the slowest link sets the pace. The earlier chapter on end-to-end delay covers the difference in detail.
Common errors
- Averaging the link rates. The path rate is the minimum, not the mean.
- Mixing bits and bytes. Multiply a size in bytes by 8 before dividing by a rate in bits per second.
- Mixing prefixes. Rates use 10^3 steps. Check whether the question uses 1024 for sizes.
- Treating bandwidth as throughput. A 100 Mbps link does not give a 100 Mbps transfer if another link on the path is slower or the link is shared.
- Forgetting the sharing term. If
Nflows share the link, compareR / Nwith the access link rates. - Ignoring overhead when the question asks for useful data. Goodput needs the payload fraction.
Exercise
A client downloads a 50 MB file (1 MB = 10^6 bytes) from a server. The path has a server link of 100 Mbps, a backbone link of 1 Gbps shared equally by 20 flows, and a client link of 40 Mbps. Find the per-flow throughput and the transfer time. Ignore propagation and overhead.
Show answer
The shared link gives 1000 / 20 = 50 Mbps per flow. The three limits are 100, 50 and 40 Mbps, so the minimum is 40 Mbps and the client link is the bottleneck. The file is 50 × 10^6 × 8 = 4 × 10^8 bits. T = 4 × 10^8 / (40 × 10^6) = 10 seconds.
Exercise
A 100 Mbps link carries packets with 1000 bytes of payload and a 50-byte header. What is the maximum goodput, and what is the utilization of the link if the application receives 80 Mbps of payload?
Show answer
The efficiency is 1000 / 1050 ≈ 0.952, so the maximum goodput is about 95.2 Mbps. If the application receives 80 Mbps of payload, the bits on the wire are 80 × 1050 / 1000 = 84 Mbps, so the link utilization is 84 / 100 = 0.84. The goodput is 80% of the bandwidth, but the link itself is 84% used.