SlideShare a Scribd company logo
1 of 3
Download to read offline
Congestion Control

Slow Start

It operates by observing that the rate at which new packets should be injected into the
network is the rate at which the acknowledgments are returned by the other end.

Slow start adds another window to the sender's TCP: the congestion window, called
"cwnd". When a new connection is established with a host on another network, the
congestion window is initialized to one segment (i.e., the segment size announced by the
other end, or the default, typically 536 or 512). Each time an ACK is received, the
congestion window is increased by one segment. The sender can transmit up to the
minimum of the congestion window and the advertised window. The congestion window
is flow control imposed by the sender, while the advertised window is flow control
imposed by the receiver. The former is based on the sender's assessment of perceived
network congestion; the latter is related to the amount of available buffer space at the
receiver for this connection.

The sender starts by transmitting one segment and waiting for its ACK. When that ACK
is received, the congestion window is incremented from one to two, and two segments
can be sent. When each of those two segments is acknowledged, the congestion window
is increased to four. This provides an exponential growth, although it is not exactly
exponential because the receiver may delay its ACKs, typically sending one ACK for
every two segments that it receives.

At some point the capacity of the internet can be reached, and an intermediate router will
start discarding packets. This tells the sender that its congestion window has gotten too
large.

Early implementations performed slow start only if the other end was on a different
network. Current implementations always perform slow start.

Congestion Avoidance

Congestion can occur when data arrives on a big pipe (a fast LAN) and gets sent out a
smaller pipe (a slower WAN). Congestion can also occur when multiple input streams
arrive at a router whose output capacity is less than the sum of the inputs. Congestion
avoidance is a way to deal with lost packets.

The assumption of the algorithm is that packet loss caused by damage is very small
(much less than 1%), therefore the loss of a packet signals congestion somewhere in the
network between the source and destination. There are two indications of packet loss: a
timeout occurring and the receipt of duplicate ACKs.

Congestion avoidance and slow start are independent algorithms with different
objectives. But when congestion occurs TCP must slow down its transmission rate of
packets into the network, and then invoke slow start to get things going again. In practice
they are implemented together.

Congestion avoidance and slow start require that two variables be maintained for each
connection: a congestion window, cwnd, and a slow start threshold size, ssthresh. The
combined algorithm operates as follows:

1. Initialization for a given connection sets cwnd to one segment and ssthresh to 65535
bytes.

2. The TCP output routine never sends more than the minimum of cwnd and the
receiver's advertised window.

3. When congestion occurs (indicated by a timeout or the reception of duplicate ACKs),
one-half of the current window size (the minimum of cwnd and the receiver's advertised
window, but at least two segments) is saved in ssthresh. Additionally, if the congestion is
indicated by a timeout, cwnd is set to one segment (i.e., slow start).

4. When new data is acknowledged by the other end, increase cwnd, but the way it
increases depends on whether TCP is performing slow start or congestion avoidance.

If cwnd is less than or equal to ssthresh, TCP is in slow start; otherwise TCP is
performing congestion avoidance. Slow start continues until TCP is halfway to where it
was when congestion occurred (since it recorded half of the window size that caused the
problem in step 2), and then congestion avoidance takes over.

Slow start has cwnd begin at one segment, and be incremented by one segment every
time an ACK is received. As mentioned earlier, this opens the window exponentially:
send one segment, then two, then four, and so on. Congestion avoidance dictates that
cwnd be incremented by segsize*segsize/cwnd each time an ACK is received, where
segsize is the segment size and cwnd is maintained in bytes. This is a linear growth of
cwnd, compared to slow start's exponential growth. The increase in cwnd should be at
most one segment each round-trip time (regardless how many ACKs are received in that
RTT), whereas slow start increments cwnd by the number of ACKs received in a round-
trip time.

Fast Retransmit

TCP may generate an immediate acknowledgment (a duplicate ACK) when an out- of-
order segment is received. This duplicate ACK should not be delayed. The purpose of
this duplicate ACK is to let the other end know that a segment was received out of order,
and to tell it what sequence number is expected.

Since TCP does not know whether a duplicate ACK is caused by a lost segment or just a
reordering of segments, it waits for a small number of duplicate ACKs to be received. It
is assumed that if there is just a reordering of the segments, there will be only one or two
duplicate ACKs before the reordered segment is processed, which will then generate a
new ACK. If three or more duplicate ACKs are received in a row, it is a strong indication
that a segment has been lost. TCP then performs a retransmission of what appears to be
the missing segment, without waiting for a retransmission timer to expire.

Fast Recovery

After fast retransmit sends what appears to be the missing segment, congestion
avoidance, but not slow start is performed. This is the fast recovery algorithm. It is an
improvement that allows high throughput under moderate congestion, especially for large
windows.

The reason for not performing slow start in this case is that the receipt of the duplicate
ACKs tells TCP more than just a packet has been lost. Since the receiver can only
generate the duplicate ACK when another segment is received, that segment has left the
network and is in the receiver's buffer. That is, there is still data flowing between the two
ends, and TCP does not want to reduce the flow abruptly by going into slow start.

The fast retransmit and fast recovery algorithms are usually implemented together as
follows.

1. When the third duplicate ACK in a row is received, set ssthresh to one-half the current
congestion window, cwnd, but no less than two segments. Retransmit the missing
segment. Set cwnd to ssthresh plus 3 times the segment size. This inflates the congestion
window by the number of segments that have left the network and which the other end
has cached .

2. Each time another duplicate ACK arrives, increment cwnd by the segment size. This
inflates the congestion window for the additional segment that has left the network.
Transmit a packet, if allowed by the new value of cwnd.

3. When the next ACK arrives that acknowledges new data, set cwnd to ssthresh (the
value set in step 1). This ACK should be the acknowledgment of the retransmission from
step 1, one round-trip time after the retransmission. Additionally, this ACK should
acknowledge all the intermediate segments sent between the lost packet and the receipt of
the first duplicate ACK. This step is congestion avoidance, since TCP is down to one-half
the rate it was at when the packet was lost.

More Related Content

What's hot

What's hot (20)

Multiplexing and switching(TDM ,FDM, Data gram, circuit switching)
Multiplexing and switching(TDM ,FDM, Data gram, circuit switching)Multiplexing and switching(TDM ,FDM, Data gram, circuit switching)
Multiplexing and switching(TDM ,FDM, Data gram, circuit switching)
 
TCP Over Wireless
TCP Over WirelessTCP Over Wireless
TCP Over Wireless
 
link layer
link layerlink layer
link layer
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
 
Week9 lec1
Week9 lec1Week9 lec1
Week9 lec1
 
F06_Lecture7_etherne..
F06_Lecture7_etherne..F06_Lecture7_etherne..
F06_Lecture7_etherne..
 
07 data linkcontrol
07 data linkcontrol07 data linkcontrol
07 data linkcontrol
 
10 Circuit Packet
10 Circuit Packet10 Circuit Packet
10 Circuit Packet
 
Ethernet
EthernetEthernet
Ethernet
 
Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layer
 
3a data link layer
3a data link layer 3a data link layer
3a data link layer
 
Mk ppt chapter 5
Mk ppt chapter 5Mk ppt chapter 5
Mk ppt chapter 5
 
Mobile computing : Indirect TCP
Mobile computing : Indirect TCPMobile computing : Indirect TCP
Mobile computing : Indirect TCP
 
Datalinklayer tanenbaum
Datalinklayer tanenbaumDatalinklayer tanenbaum
Datalinklayer tanenbaum
 
Data link layer
Data link layerData link layer
Data link layer
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 
Transport layer services (cn)
Transport layer services (cn)Transport layer services (cn)
Transport layer services (cn)
 
Transport layer (computer networks)
Transport layer (computer networks)Transport layer (computer networks)
Transport layer (computer networks)
 
Packet Switching
Packet SwitchingPacket Switching
Packet Switching
 
Framing in data link layer
Framing in data link layerFraming in data link layer
Framing in data link layer
 

Viewers also liked

Sreerag what is a web service
Sreerag   what is a web serviceSreerag   what is a web service
Sreerag what is a web serviceSreerag Gopinath
 
Ryan E. Crumley
Ryan E. CrumleyRyan E. Crumley
Ryan E. Crumleyrecrumley
 
Arabia - The New World Center for Hospitality Design
Arabia - The New World Center for Hospitality DesignArabia - The New World Center for Hospitality Design
Arabia - The New World Center for Hospitality Designjbricedesign
 
Getting Started With Xsl Templates
Getting Started With Xsl TemplatesGetting Started With Xsl Templates
Getting Started With Xsl TemplatesWill Trillich
 
SKF First-quarter report 2009
SKF First-quarter report 2009SKF First-quarter report 2009
SKF First-quarter report 2009SKF
 
Retratos Artísticos por Sheila Santos
Retratos Artísticos por Sheila SantosRetratos Artísticos por Sheila Santos
Retratos Artísticos por Sheila Santossheilissima
 
Skf q3 2010_pr_sv
Skf q3 2010_pr_svSkf q3 2010_pr_sv
Skf q3 2010_pr_svSKF
 
мифы и легенды грузия
мифы и легенды грузиямифы и легенды грузия
мифы и легенды грузияMaia Odisharia
 
Us Territories & Protectorates
Us Territories & ProtectoratesUs Territories & Protectorates
Us Territories & ProtectoratesSamantha Jarecki
 
Telstra\'s Climate Change Opportunities Report
Telstra\'s Climate Change Opportunities ReportTelstra\'s Climate Change Opportunities Report
Telstra\'s Climate Change Opportunities ReportTurlough Guerin
 
Career Development 101
Career Development 101Career Development 101
Career Development 101msexysmurf
 
Telstra\'s Sustainability White Paper
Telstra\'s Sustainability White PaperTelstra\'s Sustainability White Paper
Telstra\'s Sustainability White PaperTurlough Guerin
 
Skf Internet Presentation Q3 2009
Skf Internet Presentation Q3 2009Skf Internet Presentation Q3 2009
Skf Internet Presentation Q3 2009SKF
 
Lingkungan presentation - liz
Lingkungan presentation - lizLingkungan presentation - liz
Lingkungan presentation - lizliz
 
Idioma ii powerpoint presentation museums
Idioma ii powerpoint presentation museumsIdioma ii powerpoint presentation museums
Idioma ii powerpoint presentation museumsmaji_martinez
 
Fotos 2 a cbtis
Fotos 2 a cbtisFotos 2 a cbtis
Fotos 2 a cbtisMaru Reyes
 

Viewers also liked (20)

Sreerag what is a web service
Sreerag   what is a web serviceSreerag   what is a web service
Sreerag what is a web service
 
Poster
PosterPoster
Poster
 
Progressive Movement
Progressive MovementProgressive Movement
Progressive Movement
 
Ryan E. Crumley
Ryan E. CrumleyRyan E. Crumley
Ryan E. Crumley
 
Arabia - The New World Center for Hospitality Design
Arabia - The New World Center for Hospitality DesignArabia - The New World Center for Hospitality Design
Arabia - The New World Center for Hospitality Design
 
Getting Started With Xsl Templates
Getting Started With Xsl TemplatesGetting Started With Xsl Templates
Getting Started With Xsl Templates
 
SKF First-quarter report 2009
SKF First-quarter report 2009SKF First-quarter report 2009
SKF First-quarter report 2009
 
Retratos Artísticos por Sheila Santos
Retratos Artísticos por Sheila SantosRetratos Artísticos por Sheila Santos
Retratos Artísticos por Sheila Santos
 
Skf q3 2010_pr_sv
Skf q3 2010_pr_svSkf q3 2010_pr_sv
Skf q3 2010_pr_sv
 
мифы и легенды грузия
мифы и легенды грузиямифы и легенды грузия
мифы и легенды грузия
 
Us Territories & Protectorates
Us Territories & ProtectoratesUs Territories & Protectorates
Us Territories & Protectorates
 
Moodle 2.0 in 4 months at UMontreal
Moodle 2.0 in 4 months at UMontreal Moodle 2.0 in 4 months at UMontreal
Moodle 2.0 in 4 months at UMontreal
 
Telstra\'s Climate Change Opportunities Report
Telstra\'s Climate Change Opportunities ReportTelstra\'s Climate Change Opportunities Report
Telstra\'s Climate Change Opportunities Report
 
Career Development 101
Career Development 101Career Development 101
Career Development 101
 
Telstra\'s Sustainability White Paper
Telstra\'s Sustainability White PaperTelstra\'s Sustainability White Paper
Telstra\'s Sustainability White Paper
 
Skf Internet Presentation Q3 2009
Skf Internet Presentation Q3 2009Skf Internet Presentation Q3 2009
Skf Internet Presentation Q3 2009
 
Lingkungan presentation - liz
Lingkungan presentation - lizLingkungan presentation - liz
Lingkungan presentation - liz
 
Idioma ii powerpoint presentation museums
Idioma ii powerpoint presentation museumsIdioma ii powerpoint presentation museums
Idioma ii powerpoint presentation museums
 
Fotos 2 a cbtis
Fotos 2 a cbtisFotos 2 a cbtis
Fotos 2 a cbtis
 
LIFE - 11/4/09 - Hiking Around Houston
LIFE - 11/4/09 - Hiking Around HoustonLIFE - 11/4/09 - Hiking Around Houston
LIFE - 11/4/09 - Hiking Around Houston
 

Similar to Congestion Control Mechanisms Explained

Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion AvoidanceRam Dutt Shukla
 
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasComparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasIOSR Journals
 
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasComparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasIOSR Journals
 
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdfNetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdfoptokunal1
 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Chandra Meena
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptxECE01AJAYS
 
Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Justin Frankel
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
 
A Packet Drop Guesser Module for Congestion Control Protocols for High speed ...
A Packet Drop Guesser Module for Congestion Control Protocols for High speed ...A Packet Drop Guesser Module for Congestion Control Protocols for High speed ...
A Packet Drop Guesser Module for Congestion Control Protocols for High speed ...ijcseit
 
A packet drop guesser module for congestion Control protocols for high speed ...
A packet drop guesser module for congestion Control protocols for high speed ...A packet drop guesser module for congestion Control protocols for high speed ...
A packet drop guesser module for congestion Control protocols for high speed ...ijcseit
 
09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.pptShaliniKumariGupta1
 
Analytical Research of TCP Variants in Terms of Maximum Throughput
Analytical Research of TCP Variants in Terms of Maximum ThroughputAnalytical Research of TCP Variants in Terms of Maximum Throughput
Analytical Research of TCP Variants in Terms of Maximum ThroughputIJLT EMAS
 
TCP Congestion Control By Owais Jara
TCP Congestion Control By Owais JaraTCP Congestion Control By Owais Jara
TCP Congestion Control By Owais JaraOwaîs Járå
 

Similar to Congestion Control Mechanisms Explained (20)

Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
 
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasComparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
 
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasComparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
 
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdfNetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
 
Congestion control avoidance
Congestion control avoidanceCongestion control avoidance
Congestion control avoidance
 
Congestion control in TCP
Congestion control in TCPCongestion control in TCP
Congestion control in TCP
 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptx
 
Analysis of TCP variants
Analysis of TCP variantsAnalysis of TCP variants
Analysis of TCP variants
 
Mcseminar
McseminarMcseminar
Mcseminar
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Tcp congestion avoidance
Tcp congestion avoidanceTcp congestion avoidance
Tcp congestion avoidance
 
Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Tcp performance simulationsusingns2
Tcp performance simulationsusingns2
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
A Packet Drop Guesser Module for Congestion Control Protocols for High speed ...
A Packet Drop Guesser Module for Congestion Control Protocols for High speed ...A Packet Drop Guesser Module for Congestion Control Protocols for High speed ...
A Packet Drop Guesser Module for Congestion Control Protocols for High speed ...
 
A packet drop guesser module for congestion Control protocols for high speed ...
A packet drop guesser module for congestion Control protocols for high speed ...A packet drop guesser module for congestion Control protocols for high speed ...
A packet drop guesser module for congestion Control protocols for high speed ...
 
Tieu luan qo s
Tieu luan qo sTieu luan qo s
Tieu luan qo s
 
09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt
 
Analytical Research of TCP Variants in Terms of Maximum Throughput
Analytical Research of TCP Variants in Terms of Maximum ThroughputAnalytical Research of TCP Variants in Terms of Maximum Throughput
Analytical Research of TCP Variants in Terms of Maximum Throughput
 
TCP Congestion Control By Owais Jara
TCP Congestion Control By Owais JaraTCP Congestion Control By Owais Jara
TCP Congestion Control By Owais Jara
 

More from Ram Dutt Shukla (20)

Ip Sec Rev1
Ip Sec Rev1Ip Sec Rev1
Ip Sec Rev1
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
 
Shttp
ShttpShttp
Shttp
 
Web Security
Web SecurityWeb Security
Web Security
 
I Pv6 Addressing
I Pv6 AddressingI Pv6 Addressing
I Pv6 Addressing
 
Anycast & Multicast
Anycast & MulticastAnycast & Multicast
Anycast & Multicast
 
Congestion Control
Congestion ControlCongestion Control
Congestion Control
 
Retransmission Tcp
Retransmission TcpRetransmission Tcp
Retransmission Tcp
 
Tcp Immediate Data Transfer
Tcp Immediate Data TransferTcp Immediate Data Transfer
Tcp Immediate Data Transfer
 
Tcp Reliability Flow Control
Tcp Reliability Flow ControlTcp Reliability Flow Control
Tcp Reliability Flow Control
 
Tcp Udp Notes
Tcp Udp NotesTcp Udp Notes
Tcp Udp Notes
 
Transport Layer [Autosaved]
Transport Layer [Autosaved]Transport Layer [Autosaved]
Transport Layer [Autosaved]
 
Transport Layer
Transport LayerTransport Layer
Transport Layer
 
T Tcp
T TcpT Tcp
T Tcp
 
Anycast & Multicast
Anycast & MulticastAnycast & Multicast
Anycast & Multicast
 
Igmp
IgmpIgmp
Igmp
 
Mobile I Pv6
Mobile I Pv6Mobile I Pv6
Mobile I Pv6
 
Mld
MldMld
Mld
 
Mobility And Mobile I Pv4
Mobility And Mobile I Pv4Mobility And Mobile I Pv4
Mobility And Mobile I Pv4
 
Multicast Routing Protocols
Multicast Routing ProtocolsMulticast Routing Protocols
Multicast Routing Protocols
 

Recently uploaded

Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationDianaGray10
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Arti Languages Pre Seed Pitchdeck 2024.pdf
Arti Languages Pre Seed Pitchdeck 2024.pdfArti Languages Pre Seed Pitchdeck 2024.pdf
Arti Languages Pre Seed Pitchdeck 2024.pdfwill854175
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
full stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdffull stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdfHulkTheDevil
 
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...BookNet Canada
 
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2DianaGray10
 
Introduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptxIntroduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptxmprakaash5
 
Bitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactiveBitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactivestartupro
 
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023Joshua Flannery
 
Dublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxDublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxKunal Gupta
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfHCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfROWELL MARQUINA
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Tecnogravura, Cylinder Engraving for Rotogravure
Tecnogravura, Cylinder Engraving for RotogravureTecnogravura, Cylinder Engraving for Rotogravure
Tecnogravura, Cylinder Engraving for RotogravureAntonio de Llamas
 
Software Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey HightowerSoftware Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey HightowerAnchore
 

Recently uploaded (20)

Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automation
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Arti Languages Pre Seed Pitchdeck 2024.pdf
Arti Languages Pre Seed Pitchdeck 2024.pdfArti Languages Pre Seed Pitchdeck 2024.pdf
Arti Languages Pre Seed Pitchdeck 2024.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
full stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdffull stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdf
 
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
 
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
 
Introduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptxIntroduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptx
 
Bitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactiveBitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactive
 
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
 
Dublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxDublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptx
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfHCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Tecnogravura, Cylinder Engraving for Rotogravure
Tecnogravura, Cylinder Engraving for RotogravureTecnogravura, Cylinder Engraving for Rotogravure
Tecnogravura, Cylinder Engraving for Rotogravure
 
Software Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey HightowerSoftware Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey Hightower
 

Congestion Control Mechanisms Explained

  • 1. Congestion Control Slow Start It operates by observing that the rate at which new packets should be injected into the network is the rate at which the acknowledgments are returned by the other end. Slow start adds another window to the sender's TCP: the congestion window, called "cwnd". When a new connection is established with a host on another network, the congestion window is initialized to one segment (i.e., the segment size announced by the other end, or the default, typically 536 or 512). Each time an ACK is received, the congestion window is increased by one segment. The sender can transmit up to the minimum of the congestion window and the advertised window. The congestion window is flow control imposed by the sender, while the advertised window is flow control imposed by the receiver. The former is based on the sender's assessment of perceived network congestion; the latter is related to the amount of available buffer space at the receiver for this connection. The sender starts by transmitting one segment and waiting for its ACK. When that ACK is received, the congestion window is incremented from one to two, and two segments can be sent. When each of those two segments is acknowledged, the congestion window is increased to four. This provides an exponential growth, although it is not exactly exponential because the receiver may delay its ACKs, typically sending one ACK for every two segments that it receives. At some point the capacity of the internet can be reached, and an intermediate router will start discarding packets. This tells the sender that its congestion window has gotten too large. Early implementations performed slow start only if the other end was on a different network. Current implementations always perform slow start. Congestion Avoidance Congestion can occur when data arrives on a big pipe (a fast LAN) and gets sent out a smaller pipe (a slower WAN). Congestion can also occur when multiple input streams arrive at a router whose output capacity is less than the sum of the inputs. Congestion avoidance is a way to deal with lost packets. The assumption of the algorithm is that packet loss caused by damage is very small (much less than 1%), therefore the loss of a packet signals congestion somewhere in the network between the source and destination. There are two indications of packet loss: a timeout occurring and the receipt of duplicate ACKs. Congestion avoidance and slow start are independent algorithms with different objectives. But when congestion occurs TCP must slow down its transmission rate of
  • 2. packets into the network, and then invoke slow start to get things going again. In practice they are implemented together. Congestion avoidance and slow start require that two variables be maintained for each connection: a congestion window, cwnd, and a slow start threshold size, ssthresh. The combined algorithm operates as follows: 1. Initialization for a given connection sets cwnd to one segment and ssthresh to 65535 bytes. 2. The TCP output routine never sends more than the minimum of cwnd and the receiver's advertised window. 3. When congestion occurs (indicated by a timeout or the reception of duplicate ACKs), one-half of the current window size (the minimum of cwnd and the receiver's advertised window, but at least two segments) is saved in ssthresh. Additionally, if the congestion is indicated by a timeout, cwnd is set to one segment (i.e., slow start). 4. When new data is acknowledged by the other end, increase cwnd, but the way it increases depends on whether TCP is performing slow start or congestion avoidance. If cwnd is less than or equal to ssthresh, TCP is in slow start; otherwise TCP is performing congestion avoidance. Slow start continues until TCP is halfway to where it was when congestion occurred (since it recorded half of the window size that caused the problem in step 2), and then congestion avoidance takes over. Slow start has cwnd begin at one segment, and be incremented by one segment every time an ACK is received. As mentioned earlier, this opens the window exponentially: send one segment, then two, then four, and so on. Congestion avoidance dictates that cwnd be incremented by segsize*segsize/cwnd each time an ACK is received, where segsize is the segment size and cwnd is maintained in bytes. This is a linear growth of cwnd, compared to slow start's exponential growth. The increase in cwnd should be at most one segment each round-trip time (regardless how many ACKs are received in that RTT), whereas slow start increments cwnd by the number of ACKs received in a round- trip time. Fast Retransmit TCP may generate an immediate acknowledgment (a duplicate ACK) when an out- of- order segment is received. This duplicate ACK should not be delayed. The purpose of this duplicate ACK is to let the other end know that a segment was received out of order, and to tell it what sequence number is expected. Since TCP does not know whether a duplicate ACK is caused by a lost segment or just a reordering of segments, it waits for a small number of duplicate ACKs to be received. It is assumed that if there is just a reordering of the segments, there will be only one or two
  • 3. duplicate ACKs before the reordered segment is processed, which will then generate a new ACK. If three or more duplicate ACKs are received in a row, it is a strong indication that a segment has been lost. TCP then performs a retransmission of what appears to be the missing segment, without waiting for a retransmission timer to expire. Fast Recovery After fast retransmit sends what appears to be the missing segment, congestion avoidance, but not slow start is performed. This is the fast recovery algorithm. It is an improvement that allows high throughput under moderate congestion, especially for large windows. The reason for not performing slow start in this case is that the receipt of the duplicate ACKs tells TCP more than just a packet has been lost. Since the receiver can only generate the duplicate ACK when another segment is received, that segment has left the network and is in the receiver's buffer. That is, there is still data flowing between the two ends, and TCP does not want to reduce the flow abruptly by going into slow start. The fast retransmit and fast recovery algorithms are usually implemented together as follows. 1. When the third duplicate ACK in a row is received, set ssthresh to one-half the current congestion window, cwnd, but no less than two segments. Retransmit the missing segment. Set cwnd to ssthresh plus 3 times the segment size. This inflates the congestion window by the number of segments that have left the network and which the other end has cached . 2. Each time another duplicate ACK arrives, increment cwnd by the segment size. This inflates the congestion window for the additional segment that has left the network. Transmit a packet, if allowed by the new value of cwnd. 3. When the next ACK arrives that acknowledges new data, set cwnd to ssthresh (the value set in step 1). This ACK should be the acknowledgment of the retransmission from step 1, one round-trip time after the retransmission. Additionally, this ACK should acknowledge all the intermediate segments sent between the lost packet and the receipt of the first duplicate ACK. This step is congestion avoidance, since TCP is down to one-half the rate it was at when the packet was lost.