SlideShare a Scribd company logo
1 of 29
Computer Networks: TCP Congestion Control 1
TCP
Congestion Control
Lecture material taken from
“Computer Networks A Systems Approach”,
Third Ed.,Peterson and Davie,
Morgan Kaufmann, 2003.
Computer Networks: TCP Congestion Control 2
TCP Congestion Control
• Essential strategy :: The TCP host sends
packets into the network without a reservation
and then the host reacts to observable events.
• Originally TCP assumed FIFO queuing.
• Basic idea :: each source determines how
much capacity is available to a given flow in the
network.
• ACKs are used to ‘pace’ the transmission of
packets such that TCP is “self-clocking”.
Computer Networks: TCP Congestion Control 3
AIMD
(Additive Increase / Multiplicative
Decrease)
• CongestionWindow (cwnd) is a variable held by
the TCP source for each connection.
• cwnd is set based on the perceived level of
congestion. The Host receives implicit (packet
drop) or explicit (packet mark) indications of
internal congestion.
MaxWindow :: min (CongestionWindow , AdvertisedWindow)
EffectiveWindow = MaxWindow – (LastByteSent -LastByteAcked)
Computer Networks: TCP Congestion Control 4
Additive Increase
• Additive Increase is a reaction to perceived
available capacity.
• Linear Increase basic idea:: For each “cwnd’s
worth” of packets sent, increase cwnd by 1
packet.
• In practice, cwnd is incremented fractionally for
each arriving ACK.
increment = MSS x (MSS /cwnd)
cwnd = cwnd + increment
Computer Networks: TCP Congestion Control 5
Figure 6.8 Additive Increase
Source Destination
Add one packet
each RTT
Computer Networks: TCP Congestion Control 6
Multiplicative Decrease
* The key assumption is that a dropped packet and the
resultant timeout are due to congestion at a router or
a switch.
Multiplicate Decrease:: TCP reacts to a timeout by
halving cwnd.
• Although cwnd is defined in bytes, the literature often
discusses congestion control in terms of packets (or
more formally in MSS == Maximum Segment Size).
• cwnd is not allowed below the size of a single packet.
Computer Networks: TCP Congestion Control 7
AIMD
(Additive Increase / Multiplicative
Decrease)
• It has been shown that AIMD is a necessary
condition for TCP congestion control to be stable.
• Because the simple CC mechanism involves
timeouts that cause retransmissions, it is important
that hosts have an accurate timeout mechanism.
• Timeouts set as a function of average RTT and
standard deviation of RTT.
• However, TCP hosts only sample round-trip time
once per RTT using coarse-grained clock.
Computer Networks: TCP Congestion Control 8
Figure 6.9 Typical TCP
Sawtooth Pattern
60
20
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
Time (seconds)
70
30
40
50
10
10.0
Computer Networks: TCP Congestion Control 9
Slow Start
• Linear additive increase takes too long to
ramp up a new TCP connection from cold
start.
• Beginning with TCP Tahoe, the slow start
mechanism was added to provide an initial
exponential increase in the size of cwnd.
Remember mechanism by: slow start
prevents a slow start. Moreover, slow start
is slower than sending a full advertised
window’s worth of packets all at once.
Computer Networks: TCP Congestion Control 10
Slow Start
• The source starts with cwnd = 1.
• Every time an ACK arrives, cwnd is
incremented.
cwnd is effectively doubled per RTT “epoch”.
• Two slow start situations:
 At the very beginning of a connection {cold start}.
 When the connection goes dead waiting for a
timeout to occur (i.e, the advertized window goes
to zero!)
Computer Networks: TCP Congestion Control 11
Figure 6.10 Slow Start
Source Destination
Slow Start
Add one packet
per ACK
Computer Networks: TCP Congestion Control 12
Slow Start
• However, in the second case the source
has more information. The current value
of cwnd can be saved as a congestion
threshold.
• This is also known as the “slow start
threshold” ssthresh.
Computer Networks: TCP Congestion Control 13
Figure 6.11 Behavior of TCP
Congestion Control
60
20
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
Time (seconds)
70
30
40
50
10
Computer Networks: TCP Congestion Control 14
Fast Retransmit
• Coarse timeouts remained a problem, and Fast
retransmit was added with TCP Tahoe.
• Since the receiver responds every time a packet
arrives, this implies the sender will see duplicate
ACKs.
Basic Idea:: use duplicate ACKs to signal lost packet.
Fast Retransmit
Upon receipt of three duplicate ACKs, the TCP Sender
retransmits the lost packet.
Computer Networks: TCP Congestion Control 15
Fast Retransmit
• Generally, fast retransmit eliminates about half
the coarse-grain timeouts.
• This yields roughly a 20% improvement in
throughput.
• Note – fast retransmit does not eliminate all
the timeouts due to small window sizes at the
source.
Computer Networks: TCP Congestion Control 16
Figure 6.12 Fast Retransmit
Packet 1
Packet 2
Packet 3
Packet 4
Packet 5
Packet 6
Retransmit
packet 3
ACK 1
ACK 2
ACK 2
ACK 2
ACK 6
ACK 2
Sender Receiver
Fast Retransmit
Based on three
duplicate ACKs
Computer Networks: TCP Congestion Control 17
Figure 6.13 TCP Fast Retransmit Trace
60
20
1.0 2.0 3.0 4.0 5.0 6.0 7.0
Time (seconds)
70
30
40
50
10
Computer Networks: TCP Congestion Control 18
Congestion
window
10
5
15
20
0
Round-trip times
Slow
start
Congestion
avoidance
Congestion occurs
Threshold
Figure 7.63
Leon-Garcia & Widjaja: Communication Networks
Copyright ©2000 The McGraw Hill Companies
TCP Congestion Control
Computer Networks: TCP Congestion Control 19
Fast Recovery
• Fast recovery was added with TCP Reno.
• Basic idea:: When fast retransmit detects
three duplicate ACKs, start the recovery
process from congestion avoidance region
and use ACKs in the pipe to pace the
sending of packets.
Fast Recovery
After Fast Retransmit, half cwnd and commence
recovery from this point using linear additive increase
‘primed’ by left over ACKs in pipe.
Computer Networks: TCP Congestion Control 20
Modified Slow Start
• With fast recovery, slow start only
occurs:
–At cold start
–After a coarse-grain timeout
• This is the difference between
TCP Tahoe and TCP Reno!!
Computer Networks: TCP Congestion Control 21
Congestion
window
10
5
15
20
0
Round-trip times
Slow
start
Congestion
avoidance
Congestion occurs
Threshold
Figure 7.63
Leon-Garcia & Widjaja: Communication Networks
Copyright ©2000 The McGraw Hill Companies
TCP Congestion Control
Fast recovery
would cause a
change here.
Computer Networks: TCP Congestion Control 22
Adaptive Retransmissions
RTT:: Round Trip Time between a pair of
hosts on the Internet.
• How to set the TimeOut value?
– The timeout value is set as a function of
the expected RTT.
– Consequences of a bad choice?
Computer Networks: TCP Congestion Control 23
Original Algorithm
• Keep a running average of RTT and
compute TimeOut as a function of this
RTT.
– Send packet and keep timestamp ts .
– When ACK arrives, record timestamp ta .
SampleRTT = ta - ts
Computer Networks: TCP Congestion Control 24
Original Algorithm
Compute a weighted average:
EstimatedRTT = α x EstimatedRTT +
(1- α) x SampleRTT
Original TCP spec: α in range (0.8,0.9)
TimeOut = 2 x EstimatedRTT
Computer Networks: TCP Congestion Control 25
Karn/Partidge Algorithm
An obvious flaw in the original algorithm:
Whenever there is a retransmission it is
impossible to know whether to associate
the ACK with the original packet or the
retransmitted packet.
Computer Networks: TCP Congestion Control 26
Figure 5.10
Associating the ACK?
Sender Receiver
Original transmission
ACK
Retransmission
Sender Receiver
Original transmission
ACK
Retransmission
(a) (b)
Computer Networks: TCP Congestion Control 27
Karn/Partidge Algorithm
1. Do not measure SampleRTT when
sending packet more than once.
2. For each retransmission, set TimeOut
to double the last TimeOut.
{ Note – this is a form of exponential
backoff based on the believe that the
lost packet is due to congestion.}
Computer Networks: TCP Congestion Control 28
Jaconson/Karels Algorithm
The problem with the original algorithm is that it did not
take into account the variance of SampleRTT.
Difference = SampleRTT – EstimatedRTT
EstimatedRTT = EstimatedRTT +
(δ x Difference)
Deviation = δ (|Difference| - Deviation)
where δ is a fraction between 0 and 1.
Computer Networks: TCP Congestion Control 29
Jaconson/Karels Algorithm
TCP computes timeout using both the mean
and variance of RTT
TimeOut = µ x EstimatedRTT
+ Φ x Deviation
where based on experience µ = 1 and Φ = 4.

More Related Content

Similar to TCP_Congestion_Control.ppt

tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptxECE01AJAYS
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxTekle12
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)NYversity
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPDilum Bandara
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcpsamarai_apoc
 
TCP Traffic Control Chapter12
TCP Traffic Control Chapter12TCP Traffic Control Chapter12
TCP Traffic Control Chapter12daniel ayalew
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layerSonaliAjankar
 
Performance Evaluation of High Speed Congestion Control Protocols
Performance Evaluation of High Speed Congestion Control  ProtocolsPerformance Evaluation of High Speed Congestion Control  Protocols
Performance Evaluation of High Speed Congestion Control ProtocolsIOSR Journals
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDPsangusajjan
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IPvijai s
 
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxtcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxGOKULKANNANMMECLECTC
 
Congestion control in TCP.pptx
Congestion control in TCP.pptxCongestion control in TCP.pptx
Congestion control in TCP.pptxkamalakantas
 
Studying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfStudying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfIUA
 
Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Justin Frankel
 

Similar to TCP_Congestion_Control.ppt (20)

Congestion control avoidance
Congestion control avoidanceCongestion control avoidance
Congestion control avoidance
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptx
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptx
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcp
 
Mobile comn.pptx
Mobile comn.pptxMobile comn.pptx
Mobile comn.pptx
 
Congestion Control
Congestion ControlCongestion Control
Congestion Control
 
Tcp traffic control and red ecn
Tcp traffic control and red ecnTcp traffic control and red ecn
Tcp traffic control and red ecn
 
TCP Traffic Control Chapter12
TCP Traffic Control Chapter12TCP Traffic Control Chapter12
TCP Traffic Control Chapter12
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layer
 
Performance Evaluation of High Speed Congestion Control Protocols
Performance Evaluation of High Speed Congestion Control  ProtocolsPerformance Evaluation of High Speed Congestion Control  Protocols
Performance Evaluation of High Speed Congestion Control Protocols
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IP
 
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxtcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
 
T Tcp
T TcpT Tcp
T Tcp
 
Congestion control in TCP.pptx
Congestion control in TCP.pptxCongestion control in TCP.pptx
Congestion control in TCP.pptx
 
Studying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfStudying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdf
 
6610-l14.pptx
6610-l14.pptx6610-l14.pptx
6610-l14.pptx
 
Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Tcp performance simulationsusingns2
Tcp performance simulationsusingns2
 

Recently uploaded

FULL ENJOY - 9953040155 Call Girls in Shaheen Bagh | Delhi
FULL ENJOY - 9953040155 Call Girls in Shaheen Bagh | DelhiFULL ENJOY - 9953040155 Call Girls in Shaheen Bagh | Delhi
FULL ENJOY - 9953040155 Call Girls in Shaheen Bagh | DelhiMalviyaNagarCallGirl
 
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | DelhiMalviyaNagarCallGirl
 
SHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
SHIVNA SAHITYIKI APRIL JUNE 2024 MagazineSHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
SHIVNA SAHITYIKI APRIL JUNE 2024 MagazineShivna Prakashan
 
Vip Hisar Call Girls #9907093804 Contact Number Escorts Service Hisar
Vip Hisar Call Girls #9907093804 Contact Number Escorts Service HisarVip Hisar Call Girls #9907093804 Contact Number Escorts Service Hisar
Vip Hisar Call Girls #9907093804 Contact Number Escorts Service Hisarsrsj9000
 
FULL ENJOY - 9953040155 Call Girls in Mahipalpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Mahipalpur | DelhiFULL ENJOY - 9953040155 Call Girls in Mahipalpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Mahipalpur | DelhiMalviyaNagarCallGirl
 
FULL ENJOY - 9953040155 Call Girls in Noida | Delhi
FULL ENJOY - 9953040155 Call Girls in Noida | DelhiFULL ENJOY - 9953040155 Call Girls in Noida | Delhi
FULL ENJOY - 9953040155 Call Girls in Noida | DelhiMalviyaNagarCallGirl
 
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad EscortsCall girls in Ahmedabad High profile
 
Escort Service in Islamabad | 03070433345 | Islamabad Escort Service
Escort Service in Islamabad | 03070433345 | Islamabad Escort ServiceEscort Service in Islamabad | 03070433345 | Islamabad Escort Service
Escort Service in Islamabad | 03070433345 | Islamabad Escort ServiceAyesha Khan
 
Mandi House Call Girls : ☎ 8527673949, Low rate Call Girls
Mandi House Call Girls : ☎ 8527673949, Low rate Call GirlsMandi House Call Girls : ☎ 8527673949, Low rate Call Girls
Mandi House Call Girls : ☎ 8527673949, Low rate Call Girlsashishs7044
 
Karachi Escorts | +923070433345 | Escort Service in Karachi
Karachi Escorts | +923070433345 | Escort Service in KarachiKarachi Escorts | +923070433345 | Escort Service in Karachi
Karachi Escorts | +923070433345 | Escort Service in KarachiAyesha Khan
 
Turn Lock Take Key Storyboard Daniel Johnson
Turn Lock Take Key Storyboard Daniel JohnsonTurn Lock Take Key Storyboard Daniel Johnson
Turn Lock Take Key Storyboard Daniel Johnsonthephillipta
 
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...gurkirankumar98700
 
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call GirlsPragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girlsashishs7044
 
Bridge Fight Board by Daniel Johnson dtjohnsonart.com
Bridge Fight Board by Daniel Johnson dtjohnsonart.comBridge Fight Board by Daniel Johnson dtjohnsonart.com
Bridge Fight Board by Daniel Johnson dtjohnsonart.comthephillipta
 
Alex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson StoryboardAlex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson Storyboardthephillipta
 
Jagat Puri Call Girls : ☎ 8527673949, Low rate Call Girls
Jagat Puri Call Girls : ☎ 8527673949, Low rate Call GirlsJagat Puri Call Girls : ☎ 8527673949, Low rate Call Girls
Jagat Puri Call Girls : ☎ 8527673949, Low rate Call Girlsashishs7044
 
Call Girls in Islamabad | 03274100048 | Call Girl Service
Call Girls in Islamabad | 03274100048 | Call Girl ServiceCall Girls in Islamabad | 03274100048 | Call Girl Service
Call Girls in Islamabad | 03274100048 | Call Girl ServiceAyesha Khan
 
Akola Call Girls #9907093804 Contact Number Escorts Service Akola
Akola Call Girls #9907093804 Contact Number Escorts Service AkolaAkola Call Girls #9907093804 Contact Number Escorts Service Akola
Akola Call Girls #9907093804 Contact Number Escorts Service Akolasrsj9000
 

Recently uploaded (20)

FULL ENJOY - 9953040155 Call Girls in Shaheen Bagh | Delhi
FULL ENJOY - 9953040155 Call Girls in Shaheen Bagh | DelhiFULL ENJOY - 9953040155 Call Girls in Shaheen Bagh | Delhi
FULL ENJOY - 9953040155 Call Girls in Shaheen Bagh | Delhi
 
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
 
SHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
SHIVNA SAHITYIKI APRIL JUNE 2024 MagazineSHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
SHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
 
Vip Hisar Call Girls #9907093804 Contact Number Escorts Service Hisar
Vip Hisar Call Girls #9907093804 Contact Number Escorts Service HisarVip Hisar Call Girls #9907093804 Contact Number Escorts Service Hisar
Vip Hisar Call Girls #9907093804 Contact Number Escorts Service Hisar
 
FULL ENJOY - 9953040155 Call Girls in Mahipalpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Mahipalpur | DelhiFULL ENJOY - 9953040155 Call Girls in Mahipalpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Mahipalpur | Delhi
 
FULL ENJOY - 9953040155 Call Girls in Noida | Delhi
FULL ENJOY - 9953040155 Call Girls in Noida | DelhiFULL ENJOY - 9953040155 Call Girls in Noida | Delhi
FULL ENJOY - 9953040155 Call Girls in Noida | Delhi
 
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
 
Escort Service in Islamabad | 03070433345 | Islamabad Escort Service
Escort Service in Islamabad | 03070433345 | Islamabad Escort ServiceEscort Service in Islamabad | 03070433345 | Islamabad Escort Service
Escort Service in Islamabad | 03070433345 | Islamabad Escort Service
 
Mandi House Call Girls : ☎ 8527673949, Low rate Call Girls
Mandi House Call Girls : ☎ 8527673949, Low rate Call GirlsMandi House Call Girls : ☎ 8527673949, Low rate Call Girls
Mandi House Call Girls : ☎ 8527673949, Low rate Call Girls
 
Karachi Escorts | +923070433345 | Escort Service in Karachi
Karachi Escorts | +923070433345 | Escort Service in KarachiKarachi Escorts | +923070433345 | Escort Service in Karachi
Karachi Escorts | +923070433345 | Escort Service in Karachi
 
Turn Lock Take Key Storyboard Daniel Johnson
Turn Lock Take Key Storyboard Daniel JohnsonTurn Lock Take Key Storyboard Daniel Johnson
Turn Lock Take Key Storyboard Daniel Johnson
 
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
 
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call GirlsPragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
 
Dxb Call Girls # +971529501107 # Call Girls In Dxb Dubai || (UAE)
Dxb Call Girls # +971529501107 # Call Girls In Dxb Dubai || (UAE)Dxb Call Girls # +971529501107 # Call Girls In Dxb Dubai || (UAE)
Dxb Call Girls # +971529501107 # Call Girls In Dxb Dubai || (UAE)
 
Bur Dubai Call Girls # 971504361175 # Call Girls In Bur Dubai || (UAE)
Bur Dubai Call Girls # 971504361175 # Call Girls In Bur Dubai || (UAE)Bur Dubai Call Girls # 971504361175 # Call Girls In Bur Dubai || (UAE)
Bur Dubai Call Girls # 971504361175 # Call Girls In Bur Dubai || (UAE)
 
Bridge Fight Board by Daniel Johnson dtjohnsonart.com
Bridge Fight Board by Daniel Johnson dtjohnsonart.comBridge Fight Board by Daniel Johnson dtjohnsonart.com
Bridge Fight Board by Daniel Johnson dtjohnsonart.com
 
Alex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson StoryboardAlex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson Storyboard
 
Jagat Puri Call Girls : ☎ 8527673949, Low rate Call Girls
Jagat Puri Call Girls : ☎ 8527673949, Low rate Call GirlsJagat Puri Call Girls : ☎ 8527673949, Low rate Call Girls
Jagat Puri Call Girls : ☎ 8527673949, Low rate Call Girls
 
Call Girls in Islamabad | 03274100048 | Call Girl Service
Call Girls in Islamabad | 03274100048 | Call Girl ServiceCall Girls in Islamabad | 03274100048 | Call Girl Service
Call Girls in Islamabad | 03274100048 | Call Girl Service
 
Akola Call Girls #9907093804 Contact Number Escorts Service Akola
Akola Call Girls #9907093804 Contact Number Escorts Service AkolaAkola Call Girls #9907093804 Contact Number Escorts Service Akola
Akola Call Girls #9907093804 Contact Number Escorts Service Akola
 

TCP_Congestion_Control.ppt

  • 1. Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson and Davie, Morgan Kaufmann, 2003.
  • 2. Computer Networks: TCP Congestion Control 2 TCP Congestion Control • Essential strategy :: The TCP host sends packets into the network without a reservation and then the host reacts to observable events. • Originally TCP assumed FIFO queuing. • Basic idea :: each source determines how much capacity is available to a given flow in the network. • ACKs are used to ‘pace’ the transmission of packets such that TCP is “self-clocking”.
  • 3. Computer Networks: TCP Congestion Control 3 AIMD (Additive Increase / Multiplicative Decrease) • CongestionWindow (cwnd) is a variable held by the TCP source for each connection. • cwnd is set based on the perceived level of congestion. The Host receives implicit (packet drop) or explicit (packet mark) indications of internal congestion. MaxWindow :: min (CongestionWindow , AdvertisedWindow) EffectiveWindow = MaxWindow – (LastByteSent -LastByteAcked)
  • 4. Computer Networks: TCP Congestion Control 4 Additive Increase • Additive Increase is a reaction to perceived available capacity. • Linear Increase basic idea:: For each “cwnd’s worth” of packets sent, increase cwnd by 1 packet. • In practice, cwnd is incremented fractionally for each arriving ACK. increment = MSS x (MSS /cwnd) cwnd = cwnd + increment
  • 5. Computer Networks: TCP Congestion Control 5 Figure 6.8 Additive Increase Source Destination Add one packet each RTT
  • 6. Computer Networks: TCP Congestion Control 6 Multiplicative Decrease * The key assumption is that a dropped packet and the resultant timeout are due to congestion at a router or a switch. Multiplicate Decrease:: TCP reacts to a timeout by halving cwnd. • Although cwnd is defined in bytes, the literature often discusses congestion control in terms of packets (or more formally in MSS == Maximum Segment Size). • cwnd is not allowed below the size of a single packet.
  • 7. Computer Networks: TCP Congestion Control 7 AIMD (Additive Increase / Multiplicative Decrease) • It has been shown that AIMD is a necessary condition for TCP congestion control to be stable. • Because the simple CC mechanism involves timeouts that cause retransmissions, it is important that hosts have an accurate timeout mechanism. • Timeouts set as a function of average RTT and standard deviation of RTT. • However, TCP hosts only sample round-trip time once per RTT using coarse-grained clock.
  • 8. Computer Networks: TCP Congestion Control 8 Figure 6.9 Typical TCP Sawtooth Pattern 60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 Time (seconds) 70 30 40 50 10 10.0
  • 9. Computer Networks: TCP Congestion Control 9 Slow Start • Linear additive increase takes too long to ramp up a new TCP connection from cold start. • Beginning with TCP Tahoe, the slow start mechanism was added to provide an initial exponential increase in the size of cwnd. Remember mechanism by: slow start prevents a slow start. Moreover, slow start is slower than sending a full advertised window’s worth of packets all at once.
  • 10. Computer Networks: TCP Congestion Control 10 Slow Start • The source starts with cwnd = 1. • Every time an ACK arrives, cwnd is incremented. cwnd is effectively doubled per RTT “epoch”. • Two slow start situations:  At the very beginning of a connection {cold start}.  When the connection goes dead waiting for a timeout to occur (i.e, the advertized window goes to zero!)
  • 11. Computer Networks: TCP Congestion Control 11 Figure 6.10 Slow Start Source Destination Slow Start Add one packet per ACK
  • 12. Computer Networks: TCP Congestion Control 12 Slow Start • However, in the second case the source has more information. The current value of cwnd can be saved as a congestion threshold. • This is also known as the “slow start threshold” ssthresh.
  • 13. Computer Networks: TCP Congestion Control 13 Figure 6.11 Behavior of TCP Congestion Control 60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 Time (seconds) 70 30 40 50 10
  • 14. Computer Networks: TCP Congestion Control 14 Fast Retransmit • Coarse timeouts remained a problem, and Fast retransmit was added with TCP Tahoe. • Since the receiver responds every time a packet arrives, this implies the sender will see duplicate ACKs. Basic Idea:: use duplicate ACKs to signal lost packet. Fast Retransmit Upon receipt of three duplicate ACKs, the TCP Sender retransmits the lost packet.
  • 15. Computer Networks: TCP Congestion Control 15 Fast Retransmit • Generally, fast retransmit eliminates about half the coarse-grain timeouts. • This yields roughly a 20% improvement in throughput. • Note – fast retransmit does not eliminate all the timeouts due to small window sizes at the source.
  • 16. Computer Networks: TCP Congestion Control 16 Figure 6.12 Fast Retransmit Packet 1 Packet 2 Packet 3 Packet 4 Packet 5 Packet 6 Retransmit packet 3 ACK 1 ACK 2 ACK 2 ACK 2 ACK 6 ACK 2 Sender Receiver Fast Retransmit Based on three duplicate ACKs
  • 17. Computer Networks: TCP Congestion Control 17 Figure 6.13 TCP Fast Retransmit Trace 60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 Time (seconds) 70 30 40 50 10
  • 18. Computer Networks: TCP Congestion Control 18 Congestion window 10 5 15 20 0 Round-trip times Slow start Congestion avoidance Congestion occurs Threshold Figure 7.63 Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies TCP Congestion Control
  • 19. Computer Networks: TCP Congestion Control 19 Fast Recovery • Fast recovery was added with TCP Reno. • Basic idea:: When fast retransmit detects three duplicate ACKs, start the recovery process from congestion avoidance region and use ACKs in the pipe to pace the sending of packets. Fast Recovery After Fast Retransmit, half cwnd and commence recovery from this point using linear additive increase ‘primed’ by left over ACKs in pipe.
  • 20. Computer Networks: TCP Congestion Control 20 Modified Slow Start • With fast recovery, slow start only occurs: –At cold start –After a coarse-grain timeout • This is the difference between TCP Tahoe and TCP Reno!!
  • 21. Computer Networks: TCP Congestion Control 21 Congestion window 10 5 15 20 0 Round-trip times Slow start Congestion avoidance Congestion occurs Threshold Figure 7.63 Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies TCP Congestion Control Fast recovery would cause a change here.
  • 22. Computer Networks: TCP Congestion Control 22 Adaptive Retransmissions RTT:: Round Trip Time between a pair of hosts on the Internet. • How to set the TimeOut value? – The timeout value is set as a function of the expected RTT. – Consequences of a bad choice?
  • 23. Computer Networks: TCP Congestion Control 23 Original Algorithm • Keep a running average of RTT and compute TimeOut as a function of this RTT. – Send packet and keep timestamp ts . – When ACK arrives, record timestamp ta . SampleRTT = ta - ts
  • 24. Computer Networks: TCP Congestion Control 24 Original Algorithm Compute a weighted average: EstimatedRTT = α x EstimatedRTT + (1- α) x SampleRTT Original TCP spec: α in range (0.8,0.9) TimeOut = 2 x EstimatedRTT
  • 25. Computer Networks: TCP Congestion Control 25 Karn/Partidge Algorithm An obvious flaw in the original algorithm: Whenever there is a retransmission it is impossible to know whether to associate the ACK with the original packet or the retransmitted packet.
  • 26. Computer Networks: TCP Congestion Control 26 Figure 5.10 Associating the ACK? Sender Receiver Original transmission ACK Retransmission Sender Receiver Original transmission ACK Retransmission (a) (b)
  • 27. Computer Networks: TCP Congestion Control 27 Karn/Partidge Algorithm 1. Do not measure SampleRTT when sending packet more than once. 2. For each retransmission, set TimeOut to double the last TimeOut. { Note – this is a form of exponential backoff based on the believe that the lost packet is due to congestion.}
  • 28. Computer Networks: TCP Congestion Control 28 Jaconson/Karels Algorithm The problem with the original algorithm is that it did not take into account the variance of SampleRTT. Difference = SampleRTT – EstimatedRTT EstimatedRTT = EstimatedRTT + (δ x Difference) Deviation = δ (|Difference| - Deviation) where δ is a fraction between 0 and 1.
  • 29. Computer Networks: TCP Congestion Control 29 Jaconson/Karels Algorithm TCP computes timeout using both the mean and variance of RTT TimeOut = µ x EstimatedRTT + Φ x Deviation where based on experience µ = 1 and Φ = 4.