SlideShare a Scribd company logo
Computer Networks: TCP 1
TCPTCP
Congestion ControlCongestion Control
Lecture material taken from
“Computer Networks A Systems Approach”,
Third Ed.,Peterson and Davie,
Morgan Kaufmann, 2003.
Computer Networks: TCP 2
TCP Congestion ControlTCP 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 3
AIMDAIMD
(Additive Increase / Multiplicative(Additive Increase / Multiplicative
Decrease)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 4
Additive IncreaseAdditive 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 5
Figure 6.8 Additive IncreaseFigure 6.8 Additive Increase
Source Destination
Add one packet
each RTT
Computer Networks: TCP 6
Multiplicative DecreaseMultiplicative 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 7
AIMDAIMD
(Additive Increase / Multiplicative(Additive Increase / Multiplicative
Decrease)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 8
Figure 6.9 Typical TCPFigure 6.9 Typical TCP
Sawtooth PatternSawtooth 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 9
Slow StartSlow 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 10
SloSloww StartStart
• 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 11
Figure 6.10 Slow StartFigure 6.10 Slow Start
Source Destination
Slow Start
Add one packet
per ACK
Computer Networks: TCP 12
Slow StartSlow 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 13
Figure 6.11 Behavior of TCPFigure 6.11 Behavior of TCP
Congestion ControlCongestion 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 14
Fast RetransmitFast 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 15
Fast RetransmitFast 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 16
Figure 6.12 Fast RetransmitFigure 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 17
Figure 6.13 TCP Fast Retransmit TraceFigure 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 18
Congestion
window
10
5
15
20
0
Round-trip times
Slow
start
Congestion
avoidance
Congestion occurs
Threshold
Figure 7.63Leon-Garcia & Widjaja: Communication Networks
Copyright ©2000 The McGraw Hill Companies
TCP Congestion Control
Computer Networks: TCP 19
Fast RecoveryFast 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 20
ModifiedModified Slow StartSlow 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 21
Congestion
window
10
5
15
20
0
Round-trip times
Slow
start
Congestion
avoidance
Congestion occurs
Threshold
Figure 7.63Leon-Garcia & Widjaja: Communication Networks
Copyright ©2000 The McGraw Hill Companies
TCP Congestion Control
Fast recovery
would cause a
change here.
Computer Networks: TCP 22
Adaptive RetransmissionsAdaptive 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 23
Original AlgorithmOriginal 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 24
Original AlgorithmOriginal Algorithm
Compute a weighted average:
EstimatedRTT =EstimatedRTT = αα xx EstimatedRTT +EstimatedRTT +
((1-1- αα) x SampleRTT) x SampleRTT
Original TCP spec: αα in range (0.8,0.9)in range (0.8,0.9)
TimeOut = 2 xTimeOut = 2 x EstimatedRTTEstimatedRTT
Computer Networks: TCP 25
Karn/Partidge AlgorithmKarn/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 26
Figure 5.10Figure 5.10
Associating the ACK?Associating the ACK?
Sender Receiver
Original transmission
ACK
Retransmission
Sender Receiver
Original transmission
ACK
Retransmission
(a) (b)
Computer Networks: TCP 27
Karn/Partidge AlgorithmKarn/Partidge Algorithm
1. Do not measure SampleRTTSampleRTT when
sending packet more than once.
2. For each retransmission, set TimeOutTimeOut
to double the last TimeOutTimeOut.
{ Note – this is a form of exponential
backoff based on the believe that the
lost packet is due to congestion.}
Computer Networks: TCP 28
Jaconson/Karels AlgorithmJaconson/Karels Algorithm
The problem with the original algorithm is that it did not
take into account the variance of SampleRTT.
Difference = SampleRTT – EstimatedRTTDifference = SampleRTT – EstimatedRTT
EstimatedRTT = EstimatedRTT +EstimatedRTT = EstimatedRTT +
((δδ x Difference)x Difference)
Deviation =Deviation = δδ (|Difference| - Deviation)(|Difference| - Deviation)
where δδ is a fraction between 0 and 1.
Computer Networks: TCP 29
Jaconson/Karels AlgorithmJaconson/Karels Algorithm
TCP computes timeout using both the mean
and variance of RTT
TimeOut =TimeOut = µµ x EstimatedRTTx EstimatedRTT
++ ΦΦ x Deviationx Deviation
where based on experience µ = 1µ = 1 and ΦΦ = 4= 4.

More Related Content

What's hot

TCP Congestion Control By Owais Jara
TCP Congestion Control By Owais JaraTCP Congestion Control By Owais Jara
TCP Congestion Control By Owais Jara
Owaîs Járå
 
TCP congestion control
TCP congestion controlTCP congestion control
TCP congestion control
Shubham Jain
 
Analysis of TCP variants
Analysis of TCP variantsAnalysis of TCP variants
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcp
samarai_apoc
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
Ram Dutt Shukla
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
NYversity
 
Congestion control
Congestion controlCongestion control
Congestion control
Abhay Pai
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IP
vijai s
 
Comparative Analysis of Different TCP Variants in Mobile Ad-Hoc Network
Comparative Analysis of Different TCP Variants in Mobile Ad-Hoc Network Comparative Analysis of Different TCP Variants in Mobile Ad-Hoc Network
Comparative Analysis of Different TCP Variants in Mobile Ad-Hoc Network
partha pratim deb
 
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
The Linux Foundation
 
Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Tcp performance simulationsusingns2
Tcp performance simulationsusingns2
Justin Frankel
 
Adoptive flowcontrol in TCP
Adoptive flowcontrol in TCPAdoptive flowcontrol in TCP
Adoptive flowcontrol in TCP
selvakumar_b1985
 
Mobile computing-tcp data flow control
Mobile computing-tcp data flow controlMobile computing-tcp data flow control
Mobile computing-tcp data flow control
Sushant Kushwaha
 
Adoptive retransmission in TCP
Adoptive retransmission in TCPAdoptive retransmission in TCP
Adoptive retransmission in TCP
selvakumar_b1985
 
Congestion control in TCP
Congestion control in TCPCongestion control in TCP
Congestion control in TCP
selvakumar_b1985
 
Congestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCPCongestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCPAttila Balazs
 
Network and TCP performance relationship workshop
Network and TCP performance relationship workshopNetwork and TCP performance relationship workshop
Network and TCP performance relationship workshop
Kae Hsu
 
Connection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion ControlConnection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion Control
Adeel Rasheed
 
Xtcp Performance Brochure
Xtcp Performance BrochureXtcp Performance Brochure
Xtcp Performance Brochure
Tarik KUCUK
 

What's hot (20)

TCP Congestion Control By Owais Jara
TCP Congestion Control By Owais JaraTCP Congestion Control By Owais Jara
TCP Congestion Control By Owais Jara
 
TCP congestion control
TCP congestion controlTCP congestion control
TCP congestion control
 
TCP Westwood
TCP WestwoodTCP Westwood
TCP Westwood
 
Analysis of TCP variants
Analysis of TCP variantsAnalysis of TCP variants
Analysis of TCP variants
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcp
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IP
 
Comparative Analysis of Different TCP Variants in Mobile Ad-Hoc Network
Comparative Analysis of Different TCP Variants in Mobile Ad-Hoc Network Comparative Analysis of Different TCP Variants in Mobile Ad-Hoc Network
Comparative Analysis of Different TCP Variants in Mobile Ad-Hoc Network
 
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
 
Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Tcp performance simulationsusingns2
Tcp performance simulationsusingns2
 
Adoptive flowcontrol in TCP
Adoptive flowcontrol in TCPAdoptive flowcontrol in TCP
Adoptive flowcontrol in TCP
 
Mobile computing-tcp data flow control
Mobile computing-tcp data flow controlMobile computing-tcp data flow control
Mobile computing-tcp data flow control
 
Adoptive retransmission in TCP
Adoptive retransmission in TCPAdoptive retransmission in TCP
Adoptive retransmission in TCP
 
Congestion control in TCP
Congestion control in TCPCongestion control in TCP
Congestion control in TCP
 
Congestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCPCongestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCP
 
Network and TCP performance relationship workshop
Network and TCP performance relationship workshopNetwork and TCP performance relationship workshop
Network and TCP performance relationship workshop
 
Connection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion ControlConnection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion Control
 
Xtcp Performance Brochure
Xtcp Performance BrochureXtcp Performance Brochure
Xtcp Performance Brochure
 

Viewers also liked

B+tree
B+treeB+tree
B+tree
jasscheema
 
Splay trees
Splay treesSplay trees
Splay trees
Amaan Shaikh
 
Presentation on binary search, quick sort, merge sort and problems
Presentation on binary search, quick sort, merge sort  and problemsPresentation on binary search, quick sort, merge sort  and problems
Presentation on binary search, quick sort, merge sort and problems
Sumita Das
 
Divide and Conquer - Part II - Quickselect and Closest Pair of Points
Divide and Conquer - Part II - Quickselect and Closest Pair of PointsDivide and Conquer - Part II - Quickselect and Closest Pair of Points
Divide and Conquer - Part II - Quickselect and Closest Pair of Points
Amrinder Arora
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
anuragjagetiya
 
Merge sort code in C explained
Merge sort code in C explained Merge sort code in C explained
Merge sort code in C explained
Mohit Tare
 
Splay Tree
Splay TreeSplay Tree
Splay tree
Splay treeSplay tree
Splay tree
Rajendran
 
Network Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerNetwork Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport Layer
Abdelkhalik Mosa
 
Transport layer (computer networks)
Transport layer (computer networks)Transport layer (computer networks)
Transport layer (computer networks)
Fatbardh Hysa
 

Viewers also liked (10)

B+tree
B+treeB+tree
B+tree
 
Splay trees
Splay treesSplay trees
Splay trees
 
Presentation on binary search, quick sort, merge sort and problems
Presentation on binary search, quick sort, merge sort  and problemsPresentation on binary search, quick sort, merge sort  and problems
Presentation on binary search, quick sort, merge sort and problems
 
Divide and Conquer - Part II - Quickselect and Closest Pair of Points
Divide and Conquer - Part II - Quickselect and Closest Pair of PointsDivide and Conquer - Part II - Quickselect and Closest Pair of Points
Divide and Conquer - Part II - Quickselect and Closest Pair of Points
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
 
Merge sort code in C explained
Merge sort code in C explained Merge sort code in C explained
Merge sort code in C explained
 
Splay Tree
Splay TreeSplay Tree
Splay Tree
 
Splay tree
Splay treeSplay tree
Splay tree
 
Network Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerNetwork Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport Layer
 
Transport layer (computer networks)
Transport layer (computer networks)Transport layer (computer networks)
Transport layer (computer networks)
 

Similar to Tcp congestion control (1)

TCP_Congestion_Control.ppt
TCP_Congestion_Control.pptTCP_Congestion_Control.ppt
TCP_Congestion_Control.ppt
19UCSA032ASANJAYKUMA
 
NE #1.pptx
NE #1.pptxNE #1.pptx
NE #1.pptx
tahaniali27
 
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
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptx
Tekle12
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
Maulik Patel
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptx
ECE01AJAYS
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDPsangusajjan
 
TCP Traffic Control Chapter12
TCP Traffic Control Chapter12TCP Traffic Control Chapter12
TCP Traffic Control Chapter12
daniel ayalew
 
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
IOSR Journals
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
Dilum Bandara
 
TCP Theory
TCP TheoryTCP Theory
TCP Theory
soohyunc
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layer
SonaliAjankar
 
Mobile comn.pptx
Mobile comn.pptxMobile comn.pptx
Mobile comn.pptx
DAMANDEEPSINGH61
 
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
soohyunc
 
Mcseminar
McseminarMcseminar
Mcseminar
Ankit Anand
 
6610-l14.pptx
6610-l14.pptx6610-l14.pptx
6610-l14.pptx
ArvindRamesh22
 
Congestion control in TCP.pptx
Congestion control in TCP.pptxCongestion control in TCP.pptx
Congestion control in TCP.pptx
kamalakantas
 
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
IUA
 
Congestion Control
Congestion ControlCongestion Control
Congestion Control
Ram Dutt Shukla
 

Similar to Tcp congestion control (1) (20)

TCP_Congestion_Control.ppt
TCP_Congestion_Control.pptTCP_Congestion_Control.ppt
TCP_Congestion_Control.ppt
 
NE #1.pptx
NE #1.pptxNE #1.pptx
NE #1.pptx
 
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
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptx
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptx
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
 
TCP Traffic Control Chapter12
TCP Traffic Control Chapter12TCP Traffic Control Chapter12
TCP Traffic Control Chapter12
 
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
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
 
Tcp traffic control and red ecn
Tcp traffic control and red ecnTcp traffic control and red ecn
Tcp traffic control and red ecn
 
TCP Theory
TCP TheoryTCP Theory
TCP Theory
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layer
 
Mobile comn.pptx
Mobile comn.pptxMobile comn.pptx
Mobile comn.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
 
Mcseminar
McseminarMcseminar
Mcseminar
 
6610-l14.pptx
6610-l14.pptx6610-l14.pptx
6610-l14.pptx
 
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
 
Congestion Control
Congestion ControlCongestion Control
Congestion Control
 

More from Abdo sayed

Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441
Abdo sayed
 
I pv6 migration_strategies_for_mobile_networks_whitepaper
I pv6 migration_strategies_for_mobile_networks_whitepaperI pv6 migration_strategies_for_mobile_networks_whitepaper
I pv6 migration_strategies_for_mobile_networks_whitepaper
Abdo sayed
 
Fast020702
Fast020702Fast020702
Fast020702
Abdo sayed
 
Tcp (1)
Tcp (1)Tcp (1)
Tcp (1)
Abdo sayed
 
Lect9 (1)
Lect9 (1)Lect9 (1)
Lect9 (1)
Abdo sayed
 

More from Abdo sayed (6)

Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441
 
I pv6 migration_strategies_for_mobile_networks_whitepaper
I pv6 migration_strategies_for_mobile_networks_whitepaperI pv6 migration_strategies_for_mobile_networks_whitepaper
I pv6 migration_strategies_for_mobile_networks_whitepaper
 
Fast020702
Fast020702Fast020702
Fast020702
 
Tcp
TcpTcp
Tcp
 
Tcp (1)
Tcp (1)Tcp (1)
Tcp (1)
 
Lect9 (1)
Lect9 (1)Lect9 (1)
Lect9 (1)
 

Recently uploaded

Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
Himani415946
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
TristanJasperRamos
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
ShahulHameed54211
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 

Recently uploaded (16)

Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 

Tcp congestion control (1)

  • 1. Computer Networks: TCP 1 TCPTCP Congestion ControlCongestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson and Davie, Morgan Kaufmann, 2003.
  • 2. Computer Networks: TCP 2 TCP Congestion ControlTCP 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 3 AIMDAIMD (Additive Increase / Multiplicative(Additive Increase / Multiplicative Decrease)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 4 Additive IncreaseAdditive 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 5 Figure 6.8 Additive IncreaseFigure 6.8 Additive Increase Source Destination Add one packet each RTT
  • 6. Computer Networks: TCP 6 Multiplicative DecreaseMultiplicative 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 7 AIMDAIMD (Additive Increase / Multiplicative(Additive Increase / Multiplicative Decrease)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 8 Figure 6.9 Typical TCPFigure 6.9 Typical TCP Sawtooth PatternSawtooth 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 9 Slow StartSlow 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 10 SloSloww StartStart • 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 11 Figure 6.10 Slow StartFigure 6.10 Slow Start Source Destination Slow Start Add one packet per ACK
  • 12. Computer Networks: TCP 12 Slow StartSlow 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 13 Figure 6.11 Behavior of TCPFigure 6.11 Behavior of TCP Congestion ControlCongestion 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 14 Fast RetransmitFast 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 15 Fast RetransmitFast 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 16 Figure 6.12 Fast RetransmitFigure 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 17 Figure 6.13 TCP Fast Retransmit TraceFigure 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 18 Congestion window 10 5 15 20 0 Round-trip times Slow start Congestion avoidance Congestion occurs Threshold Figure 7.63Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies TCP Congestion Control
  • 19. Computer Networks: TCP 19 Fast RecoveryFast 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 20 ModifiedModified Slow StartSlow 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 21 Congestion window 10 5 15 20 0 Round-trip times Slow start Congestion avoidance Congestion occurs Threshold Figure 7.63Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies TCP Congestion Control Fast recovery would cause a change here.
  • 22. Computer Networks: TCP 22 Adaptive RetransmissionsAdaptive 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 23 Original AlgorithmOriginal 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 24 Original AlgorithmOriginal Algorithm Compute a weighted average: EstimatedRTT =EstimatedRTT = αα xx EstimatedRTT +EstimatedRTT + ((1-1- αα) x SampleRTT) x SampleRTT Original TCP spec: αα in range (0.8,0.9)in range (0.8,0.9) TimeOut = 2 xTimeOut = 2 x EstimatedRTTEstimatedRTT
  • 25. Computer Networks: TCP 25 Karn/Partidge AlgorithmKarn/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 26 Figure 5.10Figure 5.10 Associating the ACK?Associating the ACK? Sender Receiver Original transmission ACK Retransmission Sender Receiver Original transmission ACK Retransmission (a) (b)
  • 27. Computer Networks: TCP 27 Karn/Partidge AlgorithmKarn/Partidge Algorithm 1. Do not measure SampleRTTSampleRTT when sending packet more than once. 2. For each retransmission, set TimeOutTimeOut to double the last TimeOutTimeOut. { Note – this is a form of exponential backoff based on the believe that the lost packet is due to congestion.}
  • 28. Computer Networks: TCP 28 Jaconson/Karels AlgorithmJaconson/Karels Algorithm The problem with the original algorithm is that it did not take into account the variance of SampleRTT. Difference = SampleRTT – EstimatedRTTDifference = SampleRTT – EstimatedRTT EstimatedRTT = EstimatedRTT +EstimatedRTT = EstimatedRTT + ((δδ x Difference)x Difference) Deviation =Deviation = δδ (|Difference| - Deviation)(|Difference| - Deviation) where δδ is a fraction between 0 and 1.
  • 29. Computer Networks: TCP 29 Jaconson/Karels AlgorithmJaconson/Karels Algorithm TCP computes timeout using both the mean and variance of RTT TimeOut =TimeOut = µµ x EstimatedRTTx EstimatedRTT ++ ΦΦ x Deviationx Deviation where based on experience µ = 1µ = 1 and ΦΦ = 4= 4.

Editor's Notes

  1. <number>
  2. <number>