130 likes | 309 Views
Read 7.E & 7.F. Flow & Congestion Control. Prof. Dina Katabi. Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden . This Lecture. More about Sliding Window Flow Control Congestion Control. window = 1-5. 4. 3. 2. 1. 5. Src. x.
E N D
Read 7.E & 7.F Flow & Congestion Control Prof. Dina Katabi Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden
This Lecture • More about Sliding Window • Flow Control • Congestion Control
window = 1-5 4 3 2 1 5 Src x Rcvr p1
6 window = 2-6 4 3 2 1 5 Src a2 x Rcvr p1
6 a2 p3 window = 2-6 4 3 2 1 5 Src a2 x Rcvr p1
Timeout 6 2 a2 a2 a2 a7 a2 p5 p4 p6 p2 p3 window = 2-6 4 3 2 1 5 Src a2 x Rcvr p1
Timeout 7 2 6 a7 a2 a2 a2 a2 p2 p3 p6 p5 p4 window = 7-11 4 3 2 1 5 9 8 11 10 Src a2 x Rcvr p1 In this example, the receiver sent cumulative acks, but the same behavior happens if the receiver acks the received sequence number
This Lecture • More about Sliding Window • Flow Control • Congestion Control
What is the right window size? • The window limits how fast the sender sends • Two mechanisms control the window: • Flow control • Congestion control
cwnd += 1 cwnd = 2 cwnd = 1 cwnd = 3 cwnd = 4 D A D D A A D D D A A A Additive Increase Src Rcvr
Timeout because of a packet loss Grab capacity again Halve Cwnd TCP AIMD Cwnd desired cwnd Time Need the queue to absorb these saw-tooth oscillations
TCP “Slow Start” • How to set the initial cwnd? • At the beginning of a connection, increase exponentially • Every RTT, double cwnd 1 2 4 8 Src D D D A A D D D D A A A A A A A A A Rcvr
Timeout Additive increase Multiplicative decrease Slow start Slow Start + AIMD Cwnd Time