SlideShare a Scribd company logo
1 of 42
Introduction
to
Congestion Control
1
Principles of Congestion Control
Congestion:
• informally: “too many sources sending too much data
too fast for the network to handle”
• different from flow control!
• manifestations:
– lost packets (buffer overflow at routers)
– long delays (queueing in router buffers)
• a major problem in networking!
Computer Networks: TCP Congestion Control 2
Causes/Costs of Congestion
Scenario 1
• two senders, two
receivers
• one router, infinite
buffers
• no retransmission
• large delays
when congested
• maximum
achievable
throughput
unlimited shared
output link buffers
Host A
lin : original data
Host B
lout
Computer Networks: TCP Congestion Control 3
Causes/Costs of Congestion
Scenario 2
• one router, finite buffers
• sender retransmission of lost packet
finite shared output
link buffers
Host A lin : original
data
Host B
lout
l'in : original data, plus
retransmitted data
Computer Networks: TCP Congestion Control 4
• always: (goodput)
• “perfect” retransmission only when loss:
• retransmission of delayed (not lost) packet makes larger (than
perfect case) for same
l
in
lout
=
l
in
lout
>
l
in
lout
“costs” of congestion:
 more work (retransmissions) for a given “goodput”
 unneeded retransmissions: link carries multiple copies of packet
R/2
R/2
lin
l
out
b.
R/2
R/2
lin
l
out
a.
R/2
R/2
lin
l
out
c.
R/4
R/3
Causes/Costs of Congestion
Scenario 2
Computer Networks: TCP Congestion Control 5
Approaches towards Congestion Control
end-end congestion
control:
• no explicit feedback from
network
• congestion inferred from
end-system observed loss,
delay
• approach taken by TCP
network-assisted
congestion control:
• routers provide feedback to
end systems
– single bit indicating
congestion (SNA,
DECbit, TCP/IP ECN,
ATM)
– explicit rate sender
should use for sending.
Two broad approaches towards congestion control:
Computer Networks: TCP Congestion Control 6
Computer Networks: TCP Congestion Control 7
TCP
Congestion Control
Lecture material taken from
“Computer Networks A Systems Approach”,
Fourth Edition,Peterson and Davie,
Morgan Kaufmann, 2007.
Computer Networks: TCP Congestion Control 8
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 9
TCP Congestion Control
• Goal: TCP sender should transmit as fast as
possible, but without congesting network.
• issue - how to find rate just below congestion
level?
• Each TCP sender sets its window size, based
on implicit feedback:
• ACK segment received  network is not
congested, so increase sending rate.
• lost segment - assume loss due to
congestion, so decrease sending rate.
K & R
TCP Congestion Control
• “probing for bandwidth”: increase transmission rate on
receipt of ACK, until eventually loss occurs, then decrease
transmission rate
• continue to increase on ACK, decrease on loss (since available
bandwidth is changing, depending on other connections in network).
ACKs being received,
so increase rate
X
X
X
X
X loss, so decrease rate
sending
rate
time
• Q: how fast to increase/decrease?
TCP’s
“sawtooth”
behavior
Computer Networks: TCP Congestion Control 10
K & R
Computer Networks: TCP Congestion Control 11
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 12
Additive Increase (AI)
• Additive Increase is a reaction to perceived available
capacity (referred to as congestion avoidance stage).
• Frequently in the literature, additive increase is defined
by parameter α (where the default is α = 1).
• Linear Increase :: 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 13
Figure 6.8 Additive Increase
Source Destination
Add one packet
each RTT
Computer Networks: TCP Congestion Control 14
Multiplicative Decrease (MD)
* Key assumption :: a dropped packet and resultant
timeout are due to congestion at a router.
• Frequently in the literature, multiplicative decrease
is defined by parameter β (where the default is β =
0.5)
Multiplicate Decrease:: TCP reacts to a timeout by
halving cwnd.
• Although defined in bytes, the literature often
discusses cwnd 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 15
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 16
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 17
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 18
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, when the advertized
window goes to zero!)
Computer Networks: TCP Congestion Control 19
Figure 6.10 Slow Start
Source Destination
Slow Start
Add one packet
per ACK
Computer Networks: TCP Congestion Control 20
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.
ssthresh
Computer Networks: TCP Congestion Control 21
Computer Networks: TCP Congestion Control 22
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 23
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 24
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 25
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 26
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 27
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 28
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!!
Many TCP ‘flavors’
• TCP New Reno
• TCP SACK
– requires sender and receiver both to
support TCP SACK
– possible state machine is complex.
• TCP Vegas
– adjusts window size based on difference
between expected and actual RTT.
• TCP Cubic
Computer Networks: TCP Congestion Control 29
Figure 5.6 Three-way TCP
Handshake
Computer Networks: TCP Congestion Control 30
Computer Networks: TCP Congestion Control 31
Adaptive Retransmissions
RTT:: Round Trip Time between a pair of
hosts on the Internet.
• How to set the TimeOut value (RTO)?
– The timeout value is set as a function of
the expected RTT.
– Consequences of a bad choice?
Computer Networks: TCP Congestion Control 32
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 33
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 34
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 35
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 36
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 37
Jacobson/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 38
Jacobson/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.
TCP Congestion Control
Summary
• TCP interacts with routers in the subnet
and reacts to implicit congestion
notification (packet drop) by reducing the
TCP sender’s congestion window.
• TCP increases congestion window using
slow start or congestion avoidance.
• Currently, the two most common versions
of TCP are New Reno and Cubic.
Computer Networks: TCP Congestion Control 39
TCP New Reno
• Two problem scenarios with TCP Reno
– bursty losses, Reno cannot recover from
bursts of 3+ losses
– Packets arriving out-of-order can yield
duplicate acks when in fact there is no
loss.
• New Reno solution – try to determine
the end of a burst loss.
Computer Networks: TCP Congestion Control 40
TCP New Reno
• When duplicate ACKs trigger a
retransmission for a lost packet,
remember the highest packet sent from
window in recover.
• Upon receiving an ACK,
– if ACK < recover => partial ACK
– If ACK ≥ recover => new ACK
Computer Networks: TCP Congestion Control 41
TCP New Reno
• Partial ACK implies another lost packet:
retransmit next packet, inflate window
and stay in fast recovery.
• New ACK implies fast recovery is over:
starting from 0.5 x cwnd proceed with
congestion avoidance (linear increase).
• New Reno recovers from n losses in n
round trips.
Computer Networks: TCP Congestion Control 42

More Related Content

Similar to Introduction to TCP Congestion Control

tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxtcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxGOKULKANNANMMECLECTC
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control anuragjagetiya
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxTekle12
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion AvoidanceRam Dutt Shukla
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcpsamarai_apoc
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)NYversity
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IPvijai s
 
What every Java developer should know about network?
What every Java developer should know about network?What every Java developer should know about network?
What every Java developer should know about network?aragozin
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPDilum Bandara
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDPsangusajjan
 
TCP Over Wireless
TCP Over WirelessTCP Over Wireless
TCP Over WirelessFarooq Khan
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layerSonaliAjankar
 
Congestion control in TCP.pptx
Congestion control in TCP.pptxCongestion control in TCP.pptx
Congestion control in TCP.pptxkamalakantas
 
Designing TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion ControlDesigning TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion Controlsoohyunc
 
features of tcp important for the web
features of tcp  important for the webfeatures of tcp  important for the web
features of tcp important for the webrinnocente
 

Similar to Introduction to TCP Congestion Control (20)

tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxtcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
 
6610-l14.pptx
6610-l14.pptx6610-l14.pptx
6610-l14.pptx
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptx
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcp
 
Tieu luan qo s
Tieu luan qo sTieu luan qo s
Tieu luan qo s
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IP
 
Congestion control avoidance
Congestion control avoidanceCongestion control avoidance
Congestion control avoidance
 
What every Java developer should know about network?
What every Java developer should know about network?What every Java developer should know about network?
What every Java developer should know about network?
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
 
TCP Over Wireless
TCP Over WirelessTCP Over Wireless
TCP Over Wireless
 
Cubic
CubicCubic
Cubic
 
Mcseminar
McseminarMcseminar
Mcseminar
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layer
 
Congestion control in TCP.pptx
Congestion control in TCP.pptxCongestion control in TCP.pptx
Congestion control in TCP.pptx
 
Designing TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion ControlDesigning TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion Control
 
features of tcp important for the web
features of tcp  important for the webfeatures of tcp  important for the web
features of tcp important for the web
 

More from tahaniali27

Chapter 1- Signals and Systems Classification.pptx
Chapter 1- Signals and Systems Classification.pptxChapter 1- Signals and Systems Classification.pptx
Chapter 1- Signals and Systems Classification.pptxtahaniali27
 
VirtualPrivateNetwork.ppt
VirtualPrivateNetwork.pptVirtualPrivateNetwork.ppt
VirtualPrivateNetwork.ppttahaniali27
 
lec21-security.ppt
lec21-security.pptlec21-security.ppt
lec21-security.ppttahaniali27
 
Congestion_Control09.ppt
Congestion_Control09.pptCongestion_Control09.ppt
Congestion_Control09.ppttahaniali27
 
مفهوم شبكات الحاسب.ppt
مفهوم شبكات الحاسب.pptمفهوم شبكات الحاسب.ppt
مفهوم شبكات الحاسب.ppttahaniali27
 
antenna2-140117111353-phpapp02.pptx
antenna2-140117111353-phpapp02.pptxantenna2-140117111353-phpapp02.pptx
antenna2-140117111353-phpapp02.pptxtahaniali27
 
criticalfrequency-191012041913.pptx
criticalfrequency-191012041913.pptxcriticalfrequency-191012041913.pptx
criticalfrequency-191012041913.pptxtahaniali27
 
CS553_ST7_Ch04-TransmissionMedia (2).ppt
CS553_ST7_Ch04-TransmissionMedia (2).pptCS553_ST7_Ch04-TransmissionMedia (2).ppt
CS553_ST7_Ch04-TransmissionMedia (2).ppttahaniali27
 
مهم جدا هوائيات.pptx
مهم جدا هوائيات.pptxمهم جدا هوائيات.pptx
مهم جدا هوائيات.pptxtahaniali27
 
lecture6_16.360.ppt
lecture6_16.360.pptlecture6_16.360.ppt
lecture6_16.360.ppttahaniali27
 
Chapter 2 - Types of Computer Networks-converted e.pptx
Chapter 2 - Types of Computer Networks-converted e.pptxChapter 2 - Types of Computer Networks-converted e.pptx
Chapter 2 - Types of Computer Networks-converted e.pptxtahaniali27
 
Chapter3-4 Networks Topologies and Devices.ppt
Chapter3-4 Networks Topologies and Devices.pptChapter3-4 Networks Topologies and Devices.ppt
Chapter3-4 Networks Topologies and Devices.ppttahaniali27
 
Chapter 5 OSI Model.ppt
Chapter 5 OSI  Model.pptChapter 5 OSI  Model.ppt
Chapter 5 OSI Model.ppttahaniali27
 

More from tahaniali27 (20)

network.ppt
network.pptnetwork.ppt
network.ppt
 
signal.ppt
signal.pptsignal.ppt
signal.ppt
 
Chapter 1- Signals and Systems Classification.pptx
Chapter 1- Signals and Systems Classification.pptxChapter 1- Signals and Systems Classification.pptx
Chapter 1- Signals and Systems Classification.pptx
 
TOPIC7.pptx
TOPIC7.pptxTOPIC7.pptx
TOPIC7.pptx
 
VirtualPrivateNetwork.ppt
VirtualPrivateNetwork.pptVirtualPrivateNetwork.ppt
VirtualPrivateNetwork.ppt
 
lec21-security.ppt
lec21-security.pptlec21-security.ppt
lec21-security.ppt
 
nv.ppt
nv.pptnv.ppt
nv.ppt
 
Congestion_Control09.ppt
Congestion_Control09.pptCongestion_Control09.ppt
Congestion_Control09.ppt
 
مفهوم شبكات الحاسب.ppt
مفهوم شبكات الحاسب.pptمفهوم شبكات الحاسب.ppt
مفهوم شبكات الحاسب.ppt
 
physical.ppt
physical.pptphysical.ppt
physical.ppt
 
antenna2-140117111353-phpapp02.pptx
antenna2-140117111353-phpapp02.pptxantenna2-140117111353-phpapp02.pptx
antenna2-140117111353-phpapp02.pptx
 
criticalfrequency-191012041913.pptx
criticalfrequency-191012041913.pptxcriticalfrequency-191012041913.pptx
criticalfrequency-191012041913.pptx
 
CS553_ST7_Ch04-TransmissionMedia (2).ppt
CS553_ST7_Ch04-TransmissionMedia (2).pptCS553_ST7_Ch04-TransmissionMedia (2).ppt
CS553_ST7_Ch04-TransmissionMedia (2).ppt
 
physical.ppt
physical.pptphysical.ppt
physical.ppt
 
مهم جدا هوائيات.pptx
مهم جدا هوائيات.pptxمهم جدا هوائيات.pptx
مهم جدا هوائيات.pptx
 
lecture6_16.360.ppt
lecture6_16.360.pptlecture6_16.360.ppt
lecture6_16.360.ppt
 
UNIT4_IN.ppt
UNIT4_IN.pptUNIT4_IN.ppt
UNIT4_IN.ppt
 
Chapter 2 - Types of Computer Networks-converted e.pptx
Chapter 2 - Types of Computer Networks-converted e.pptxChapter 2 - Types of Computer Networks-converted e.pptx
Chapter 2 - Types of Computer Networks-converted e.pptx
 
Chapter3-4 Networks Topologies and Devices.ppt
Chapter3-4 Networks Topologies and Devices.pptChapter3-4 Networks Topologies and Devices.ppt
Chapter3-4 Networks Topologies and Devices.ppt
 
Chapter 5 OSI Model.ppt
Chapter 5 OSI  Model.pptChapter 5 OSI  Model.ppt
Chapter 5 OSI Model.ppt
 

Recently uploaded

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 

Introduction to TCP Congestion Control

  • 2. Principles of Congestion Control Congestion: • informally: “too many sources sending too much data too fast for the network to handle” • different from flow control! • manifestations: – lost packets (buffer overflow at routers) – long delays (queueing in router buffers) • a major problem in networking! Computer Networks: TCP Congestion Control 2
  • 3. Causes/Costs of Congestion Scenario 1 • two senders, two receivers • one router, infinite buffers • no retransmission • large delays when congested • maximum achievable throughput unlimited shared output link buffers Host A lin : original data Host B lout Computer Networks: TCP Congestion Control 3
  • 4. Causes/Costs of Congestion Scenario 2 • one router, finite buffers • sender retransmission of lost packet finite shared output link buffers Host A lin : original data Host B lout l'in : original data, plus retransmitted data Computer Networks: TCP Congestion Control 4
  • 5. • always: (goodput) • “perfect” retransmission only when loss: • retransmission of delayed (not lost) packet makes larger (than perfect case) for same l in lout = l in lout > l in lout “costs” of congestion:  more work (retransmissions) for a given “goodput”  unneeded retransmissions: link carries multiple copies of packet R/2 R/2 lin l out b. R/2 R/2 lin l out a. R/2 R/2 lin l out c. R/4 R/3 Causes/Costs of Congestion Scenario 2 Computer Networks: TCP Congestion Control 5
  • 6. Approaches towards Congestion Control end-end congestion control: • no explicit feedback from network • congestion inferred from end-system observed loss, delay • approach taken by TCP network-assisted congestion control: • routers provide feedback to end systems – single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM) – explicit rate sender should use for sending. Two broad approaches towards congestion control: Computer Networks: TCP Congestion Control 6
  • 7. Computer Networks: TCP Congestion Control 7 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth Edition,Peterson and Davie, Morgan Kaufmann, 2007.
  • 8. Computer Networks: TCP Congestion Control 8 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”.
  • 9. Computer Networks: TCP Congestion Control 9 TCP Congestion Control • Goal: TCP sender should transmit as fast as possible, but without congesting network. • issue - how to find rate just below congestion level? • Each TCP sender sets its window size, based on implicit feedback: • ACK segment received  network is not congested, so increase sending rate. • lost segment - assume loss due to congestion, so decrease sending rate. K & R
  • 10. TCP Congestion Control • “probing for bandwidth”: increase transmission rate on receipt of ACK, until eventually loss occurs, then decrease transmission rate • continue to increase on ACK, decrease on loss (since available bandwidth is changing, depending on other connections in network). ACKs being received, so increase rate X X X X X loss, so decrease rate sending rate time • Q: how fast to increase/decrease? TCP’s “sawtooth” behavior Computer Networks: TCP Congestion Control 10 K & R
  • 11. Computer Networks: TCP Congestion Control 11 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)
  • 12. Computer Networks: TCP Congestion Control 12 Additive Increase (AI) • Additive Increase is a reaction to perceived available capacity (referred to as congestion avoidance stage). • Frequently in the literature, additive increase is defined by parameter α (where the default is α = 1). • Linear Increase :: 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
  • 13. Computer Networks: TCP Congestion Control 13 Figure 6.8 Additive Increase Source Destination Add one packet each RTT
  • 14. Computer Networks: TCP Congestion Control 14 Multiplicative Decrease (MD) * Key assumption :: a dropped packet and resultant timeout are due to congestion at a router. • Frequently in the literature, multiplicative decrease is defined by parameter β (where the default is β = 0.5) Multiplicate Decrease:: TCP reacts to a timeout by halving cwnd. • Although defined in bytes, the literature often discusses cwnd in terms of packets (or more formally in MSS == Maximum Segment Size). • cwnd is not allowed below the size of a single packet.
  • 15. Computer Networks: TCP Congestion Control 15 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.
  • 16. Computer Networks: TCP Congestion Control 16 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
  • 17. Computer Networks: TCP Congestion Control 17 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.
  • 18. Computer Networks: TCP Congestion Control 18 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, when the advertized window goes to zero!)
  • 19. Computer Networks: TCP Congestion Control 19 Figure 6.10 Slow Start Source Destination Slow Start Add one packet per ACK
  • 20. Computer Networks: TCP Congestion Control 20 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.
  • 21. ssthresh Computer Networks: TCP Congestion Control 21
  • 22. Computer Networks: TCP Congestion Control 22 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
  • 23. Computer Networks: TCP Congestion Control 23 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.
  • 24. Computer Networks: TCP Congestion Control 24 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.
  • 25. Computer Networks: TCP Congestion Control 25 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
  • 26. Computer Networks: TCP Congestion Control 26 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
  • 27. Computer Networks: TCP Congestion Control 27 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.
  • 28. Computer Networks: TCP Congestion Control 28 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!!
  • 29. Many TCP ‘flavors’ • TCP New Reno • TCP SACK – requires sender and receiver both to support TCP SACK – possible state machine is complex. • TCP Vegas – adjusts window size based on difference between expected and actual RTT. • TCP Cubic Computer Networks: TCP Congestion Control 29
  • 30. Figure 5.6 Three-way TCP Handshake Computer Networks: TCP Congestion Control 30
  • 31. Computer Networks: TCP Congestion Control 31 Adaptive Retransmissions RTT:: Round Trip Time between a pair of hosts on the Internet. • How to set the TimeOut value (RTO)? – The timeout value is set as a function of the expected RTT. – Consequences of a bad choice?
  • 32. Computer Networks: TCP Congestion Control 32 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
  • 33. Computer Networks: TCP Congestion Control 33 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
  • 34. Computer Networks: TCP Congestion Control 34 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.
  • 35. Computer Networks: TCP Congestion Control 35 Figure 5.10 Associating the ACK? Sender Receiver Original transmission ACK Retransmission Sender Receiver Original transmission ACK Retransmission (a) (b)
  • 36. Computer Networks: TCP Congestion Control 36 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.}
  • 37. Computer Networks: TCP Congestion Control 37 Jacobson/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.
  • 38. Computer Networks: TCP Congestion Control 38 Jacobson/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.
  • 39. TCP Congestion Control Summary • TCP interacts with routers in the subnet and reacts to implicit congestion notification (packet drop) by reducing the TCP sender’s congestion window. • TCP increases congestion window using slow start or congestion avoidance. • Currently, the two most common versions of TCP are New Reno and Cubic. Computer Networks: TCP Congestion Control 39
  • 40. TCP New Reno • Two problem scenarios with TCP Reno – bursty losses, Reno cannot recover from bursts of 3+ losses – Packets arriving out-of-order can yield duplicate acks when in fact there is no loss. • New Reno solution – try to determine the end of a burst loss. Computer Networks: TCP Congestion Control 40
  • 41. TCP New Reno • When duplicate ACKs trigger a retransmission for a lost packet, remember the highest packet sent from window in recover. • Upon receiving an ACK, – if ACK < recover => partial ACK – If ACK ≥ recover => new ACK Computer Networks: TCP Congestion Control 41
  • 42. TCP New Reno • Partial ACK implies another lost packet: retransmit next packet, inflate window and stay in fast recovery. • New ACK implies fast recovery is over: starting from 0.5 x cwnd proceed with congestion avoidance (linear increase). • New Reno recovers from n losses in n round trips. Computer Networks: TCP Congestion Control 42