SlideShare a Scribd company logo
1 of 29
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 JaraOwaîs Járå
 
TCP congestion control
TCP congestion controlTCP congestion control
TCP congestion controlShubham Jain
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcpsamarai_apoc
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion AvoidanceRam Dutt Shukla
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)NYversity
 
Congestion control
Congestion controlCongestion control
Congestion controlAbhay Pai
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IPvijai 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 simulationsusingns2Justin Frankel
 
Adoptive flowcontrol in TCP
Adoptive flowcontrol in TCPAdoptive flowcontrol in TCP
Adoptive flowcontrol in TCPselvakumar_b1985
 
Mobile computing-tcp data flow control
Mobile computing-tcp data flow controlMobile computing-tcp data flow control
Mobile computing-tcp data flow controlSushant Kushwaha
 
Adoptive retransmission in TCP
Adoptive retransmission in TCPAdoptive retransmission in TCP
Adoptive retransmission in TCPselvakumar_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 workshopKae Hsu
 
Connection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion ControlConnection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion ControlAdeel Rasheed
 
Xtcp Performance Brochure
Xtcp Performance BrochureXtcp Performance Brochure
Xtcp Performance BrochureTarik 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

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 problemsSumita 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 PointsAmrinder 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
 
Network Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerNetwork Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerAbdelkhalik 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)

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.pptxTekle12
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot LayerMaulik Patel
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptxECE01AJAYS
 
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 Chapter12daniel 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 ProtocolsIOSR Journals
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPDilum Bandara
 
TCP Theory
TCP TheoryTCP Theory
TCP Theorysoohyunc
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layerSonaliAjankar
 
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
 
Congestion control in TCP.pptx
Congestion control in TCP.pptxCongestion control in TCP.pptx
Congestion control in TCP.pptxkamalakantas
 
Studying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfStudying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfIUA
 

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 1361827441Abdo 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_whitepaperAbdo 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

办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Personfurqan222004
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 

Recently uploaded (20)

Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Person
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 

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>