Sub topic 13
Bandwidth-delay product and data in flight
This chapter assumes you can compute transmission delay (packet size divided by rate) and propagation delay (distance divided by signal speed). It also assumes you can convert between bits and bytes and between milli-, mega-, and giga- units. Here you use those two delays to count how much data a path holds at once, and you use that count to size windows and judge link efficiency.
The pipe picture
A link has two properties: how fast a sender can put bits on it (rate, in bits per second) and how long a bit takes to cross it (delay). Picture the link as a pipe. Rate is the pipe's width, and delay is its length. The volume of the pipe is the amount of data that can be on the wire at one moment.
The bandwidth-delay product (BDP) is that volume:
BDP = rate × delay
With one-way delay, the BDP is the number of bits that fill the link in one direction. With round-trip time (RTT), the BDP is the number of bits a sender can transmit before the first acknowledgement for the first bit comes back. Transport-layer questions almost always use RTT, so state which delay you use.
Computing the BDP
Convert everything to bits and seconds before you multiply. In networking, k, M, and G for rates mean powers of 10 (1 Mbps = 10^6 bits per second). Sizes of buffers or files sometimes use powers of 2, so read the question carefully.
| Link | Rate | RTT | BDP (bits) | BDP (bytes) |
|---|---|---|---|---|
| Campus LAN | 1 Gbps | 0.1 ms | 100,000 | 12,500 |
| Regional path | 100 Mbps | 20 ms | 2,000,000 | 250,000 |
| Geostationary satellite | 10 Mbps | 500 ms | 5,000,000 | 625,000 |
| Long-haul fiber | 1 Gbps | 100 ms | 100,000,000 | 12,500,000 |
The product grows with both factors. A fast link with a tiny RTT holds little data. A slower link with a very long delay can hold more.
Worked example
A 100 Mbps link has a 20 ms RTT.
- BDP = 100 × 10^6 × 0.020 = 2,000,000 bits.
- In bytes: 2,000,000 / 8 = 250,000 bytes.
- With 12,000-bit frames, the pipe holds 2,000,000 / 12,000 ≈ 166.7 frames.
The sender must have roughly 167 frames outstanding to keep the link busy through one RTT.
Data in flight and the sender's window
Data in flight is data the sender has transmitted but not yet seen acknowledged. A sender that stops after each frame (stop-and-wait) has at most one frame in flight. A sliding-window sender may have up to W frames in flight.
Two quantities decide how well the link is used:
- Transmission time of one frame: Tt = L / R.
- Round-trip time: RTT. If you ignore the transmission time of the acknowledgement, RTT = 2 × Tp, where Tp is the one-way propagation delay.
The sender sends a window of W frames, which takes W × Tt. The first acknowledgement returns Tt + RTT after the first bit starts. If the window is smaller than that cycle, the sender sits idle until acknowledgements arrive. This gives:
- Utilization = min(1, W × Tt / (Tt + RTT)).
- Full utilization needs W × Tt ≥ Tt + RTT, so W ≥ 1 + RTT / Tt.
GATE questions write this with a = Tp / Tt. Then RTT / Tt = 2a. Stop-and-wait efficiency is 1 / (1 + 2a), and the window for full utilization is 1 + 2a.
The "+1" appears because the frame being transmitted when the window opens is itself part of the cycle. Without it, you would undercount by one frame. The BDP divided by the frame size gives the "2a" part only.
import math
def bdp_bits(rate_bps, rtt_s):
"""Bits that fit in the pipe for one round trip."""
return rate_bps * rtt_s
def window_for_full_utilization(packet_bits, rate_bps, rtt_s):
"""Smallest window (in packets) that keeps the sender transmitting."""
transmission = packet_bits / rate_bps
return math.ceil(1 + rtt_s / transmission)
def utilization(window, packet_bits, rate_bps, rtt_s):
"""Fraction of time the sender is transmitting; ack transmission ignored."""
transmission = packet_bits / rate_bps
return min(1.0, window * transmission / (transmission + rtt_s))
rate, rtt, frame = 100_000_000, 0.020, 12_000
print(round(bdp_bits(rate, rtt))) # 2000000
print(window_for_full_utilization(frame, rate, rtt)) # 168
print(round(utilization(1, frame, rate, rtt), 5)) # 0.00596
print(round(utilization(42, frame, rate, rtt), 4)) # 0.2505
print(utilization(168, frame, rate, rtt)) # 1.0Stop-and-wait (W = 1) uses about 0.6 percent of this link. A window of 42 frames gives about a quarter. A window of 168 fills it. The link is no faster in any of these cases. Only the amount of data in flight changes.
Throughput limited by the window
Throughput cannot exceed one window per RTT:
throughput ≤ window size / RTT
It is also capped by the link rate, so the achievable value is the smaller of the two. The window can be the sender's, the receiver's advertised window, or the congestion window, whichever is smallest.
For example, a TCP connection without window scaling has a maximum window of 65,535 bytes. With a 100 ms RTT:
- Throughput ≤ 65,535 × 8 / 0.1 = 5,242,800 bps ≈ 5.24 Mbps.
- This holds even if the link is 1 Gbps.
The window needed to use a 1 Gbps link at 100 ms RTT is the BDP, 12.5 MB. That is why high-speed, long-delay paths (sometimes called "long fat networks") need window scaling.
Edge cases and common errors
- One-way versus round trip. Use one-way delay for "bits on the wire in one direction". Use RTT for "bits sent before the first acknowledgement". Mixing them gives an answer off by a factor of 2.
- Bits versus bytes. A rate in Mbps times a time in seconds gives bits. Divide by 8 for bytes.
- Queuing delay enlarges the pipe. If a bottleneck queue holds packets, the RTT grows, and so does the data in flight. Part of that in-flight data sits in the queue, not on the wire.
- The bottleneck sets the rate. For a path of several links, use the slowest link's rate. Use the total RTT for the path.
- Window in frames or bytes. Match the unit. If the window is in bytes, divide by the frame size before using W in frame-count formulas.
- Sequence numbers. The window must fit the sequence-number space. For Go-Back-N, the window is at most 2^k − 1 with k-bit sequence numbers. For Selective Repeat, it is at most 2^(k−1). A BDP larger than that limit cannot be filled without more sequence-number bits.
- Transmission time of the acknowledgement. Most GATE problems ignore it. When a problem gives an ack size, add the ack's transmission time to the cycle: Tt + 2 × Tp + Tack.
Where this fits
The previous chapter separated bandwidth from throughput and identified the bottleneck link. This chapter turns delay and rate into a capacity measure. The next chapter looks at queue growth near full load. Stop-and-wait efficiency then appears there as an example of how an under-filled pipe wastes capacity.
Exercise
A link has a rate of 10 Mbps and a one-way propagation delay of 25 ms. Frames are 1000 bytes. Ignore acknowledgement transmission time. (a) What is the BDP using RTT, in bits? (b) What is the stop-and-wait utilization, as a fraction? (c) What is the smallest window, in frames, that gives full utilization?
Show answer
Frame size is 8000 bits, so Tt = 8000 / 10^7 = 0.8 ms. RTT = 2 × 25 = 50 ms. (a) BDP = 10^7 × 0.05 = 500,000 bits. (b) Utilization = 0.8 / (0.8 + 50) = 0.8 / 50.8 ≈ 0.01575, about 1.6 percent. (c) W ≥ 1 + 50 / 0.8 = 63.5, so the smallest window is 64 frames.
Exercise
A TCP sender has a fixed window of 128 KB (1 KB = 1024 bytes) on a path with 40 ms RTT and a 1 Gbps bottleneck. What is the maximum throughput, and what fraction of the link does it use?
Show answer
Window = 128 × 1024 × 8 = 1,048,576 bits. Throughput ≤ 1,048,576 / 0.04 = 26,214,400 bps ≈ 26.2 Mbps. The link carries 1,000 Mbps, so utilization is about 2.6 percent. The BDP is 10^9 × 0.04 = 40,000,000 bits, so the window is far too small to fill the path.