15-441 Computer Networking Lecture 19- TCP Performance
15-441 Computer Networking Lecture 19 – TCP Performance
Outline TCP congestion avoidance ·TCPs| ow start TCP modeling Lecture 19: TCP Congestion Control
Lecture 19: TCP Congestion Control 2 Outline • TCP congestion avoidance • TCP slow start • TCP modeling
Additive Increase/decrease Fairness line Allocation Efficiency Line User 1s Allocation X, Lecture 19: TCP Congestion Control
Lecture 19: TCP Congestion Control 3 Additive Increase/Decrease T0 T1 Efficiency Line Fairness Line User 1’s Allocation x1 User 2’s Allocation x2
Multiplicative Increase/Decrease °Both×1andX2 increase by the same factor over Fairness line time User 2s Extension from Allocation origin -constant fairness Efficiency Line User 1s Allocation X, Lecture 19: TCP Congestion Control
Lecture 19: TCP Congestion Control 4 Muliplicative Increase/Decrease • Both X1 and X2 increase by the same factor over time • Extension from origin – constant fairness T0 T1 Efficiency Line Fairness Line User 1’s Allocation x1 User 2’s Allocation x2
What is the right choice? · Constraints limit us to aIMD Fairness Line X Improves or keeps fairness User 2s constant at Allocation each step AIMD moves towards optimal Efficiency Line point User 1s Allocation x, Lecture 19: TCP Congestion Control
Lecture 19: TCP Congestion Control 5 What is the Right Choice? • Constraints limit us to AIMD • Improves or keeps fairness constant at each step • AIMD moves towards optimal point x0 x1 x2 Efficiency Line Fairness Line User 1’s Allocation x1 User 2’s Allocation x2
TCP Congestion Control Changes to T cP motivated by arpanet congestion collapse Basic principles AIMD Packet conservation Reaching steady state quickly ACK clocking Lecture 19: TCP Congestion Control
Lecture 19: TCP Congestion Control 6 TCP Congestion Control • Changes to TCP motivated by ARPANET congestion collapse • Basic principles • AIMD • Packet conservation • Reaching steady state quickly • ACK clocking
AIMD Distributed fair and efficient Packet loss is seen as sign of congestion and results in a multiplicative rate decrease Factor of 2 TCP periodically probes for available bandwidth by increasing its rate Rate Time Lecture 19: TCP Congestion Control
Lecture 19: TCP Congestion Control 7 AIMD • Distributed, fair and efficient • Packet loss is seen as sign of congestion and results in a multiplicative rate decrease • Factor of 2 • TCP periodically probes for available bandwidth by increasing its rate Time Rate
Implementation Issue Operating system timers are very coarse- how to pace packets out smoothly? Implemented using a congestion window that limits how much data can be in the network TCP also keeps track of how much data is in transit Data can only be sent when the amount of outstanding data is less than the congestion window The amount of outstanding data is increased on a send and decreased on"“ack” (last sent -last acked)<congestion window Window limited by both congestion and buffering Senders maximum window= Min(advertised window, cwnd Lecture 19: TCP Congestion Control
Lecture 19: TCP Congestion Control 8 Implementation Issue • Operating system timers are very coarse – how to pace packets out smoothly? • Implemented using a congestion window that limits how much data can be in the network. • TCP also keeps track of how much data is in transit • Data can only be sent when the amount of outstanding data is less than the congestion window. • The amount of outstanding data is increased on a “send” and decreased on “ack” • (last sent – last acked) < congestion window • Window limited by both congestion and buffering • Sender’s maximum window = Min (advertised window, cwnd)
Congestion Avoidance If loss occurs when cwnd= W Network can handle 0.5W-W segments Set cwnd to 0.5W(multiplicative decrease) Upon receiving ACK Increase cwnd by(1 packet)/cwnd What is 1 packet?>1 MSS worth of bytes After cwnd packets have passed by approximately increase of 1 MSs Implements AIMD Lecture 19: TCP Congestion Control
Lecture 19: TCP Congestion Control 9 Congestion Avoidance • If loss occurs when cwnd = W • Network can handle 0.5W ~ W segments • Set cwnd to 0.5W (multiplicative decrease) • Upon receiving ACK • Increase cwnd by (1 packet)/cwnd • What is 1 packet? 1 MSS worth of bytes • After cwnd packets have passed by approximately increase of 1 MSS • Implements AIMD
Congestion Avoidance Sequence Plot Sequence No ooooooo Packets BAcks Time Lecture 19: TCP Congestion Control
Lecture 19: TCP Congestion Control 10 Congestion Avoidance Sequence Plot Time Sequence No Packets Acks