16 · Utilization: stop-and-wait vs pipelining ★
Slides 3-30 → 3-33 · HW3 P4
What utilization means
Sender utilization \(U_{sender}\) = the fraction of time the sender is actually busy sending bits. 1 = the link is always in use. 0.0003 = the link is idle almost all the time.
Where the formula comes from
- \(t = 0\): the sender starts sending packet 1.
- \(t = L/R\): the last bit leaves. (That's the transmission delay from topic 3.)
- The bits travel to the receiver, and the ACK comes back. That takes one RTT.
- \(t = \text{RTT} + L/R\): the ACK arrives and the sender can send again.
So one cycle lasts \(\text{RTT} + L/R\). In that cycle, the sender is busy for \(N\) packets × \(L/R\) each.
\(N\) = window size (packets sent per RTT). Stop-and-wait: \(N = 1\).
Throughput follows from it:
$$\text{throughput} = U \times R \qquad \text{(or: } \frac{N \cdot L}{\text{RTT} + L/R}\text{)}$$• RTT = 2 × one-way propagation. "15 ms one-way" → RTT = 30 ms.
• Bytes → bits: 1500 bytes = 12,000 bits.
• Use the same time unit on top and bottom (all ms, or all s).
• \(U\) can't exceed 1. If the formula gives more than 1, the window is big enough to keep the link busy the whole time, so \(U = 1\).
Slide example: stop-and-wait stinks
1 Gbps link, 15 ms one-way propagation (RTT = 30 ms), 8000-bit packet.
$$\frac{L}{R} = \frac{8000}{10^9} = 8 \ \mu\text{s} = 0.008 \text{ ms}$$ $$U_{sender} = \frac{0.008}{30 + 0.008} = \frac{0.008}{30.008} \approx \mathbf{0.00027}$$The sender is busy 0.027% of the time. One 1 KB packet every 30 ms ≈ 33 kB/s of throughput on a 1 Gbps link. The protocol, not the link, limits performance.
3-packet pipelining (slide 3-33)
$$U_{sender} = \frac{3 \times 0.008}{30.008} = \frac{0.024}{30.008} \approx \mathbf{0.00081}$$3 packets per RTT → 3× the utilization. (The slide prints the numerator as ".0024", a typo; the result 0.00081 is right.)
Worked example: HW3 P4
Q: How big must the window be for utilization above 98%? \(R = 1\) Gbps, one-way propagation = 15 ms, packet = 1500 bytes (header included).
Step 1: transmission time
$$\frac{L}{R} = \frac{1500 \times 8}{10^9} = \frac{12{,}000}{10^9} = 12 \ \mu\text{s} = 0.012 \text{ ms}$$Step 2: RTT
$$\text{RTT} = 2 \times 15 = 30 \text{ ms}$$Step 3: set up the inequality
$$\frac{N \times 0.012}{30 + 0.012} > 0.98$$Step 4: solve for N
$$N > \frac{0.98 \times 30.012}{0.012} = 0.98 \times 2501 = 2450.98$$N must be a whole number of packets, so round up:
Check: \(2451 \times 0.012 / 30.012 = 0.98001\) ✓ (and 2450 gives 0.97961, just short).
General "solve for the window" formula
$$N \ge \frac{U_{target} \times (\text{RTT} + L/R)}{L/R}$$For 100% utilization: \(N \ge (\text{RTT} + L/R)/(L/R)\). In the slide example that's \(30.008 / 0.008 = 3751\) packets.
Ties to topic 15
- Pipelining (GBN, SR) is why \(N\) can be bigger than 1.
- But the window is limited by the seq # bits: a GBN window of 2451 needs \(2^k - 1 \ge 2451\) → \(k \ge 12\) bits (\(2^{12} = 4096\)). SR needs \(2^{k-1} \ge 2451\) → \(k \ge 13\).