TCP Congestion Control - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

TCP Congestion Control

Description:

maximum achievable throughput. unlimited shared output link buffers. Host A. lin : original data ... School of Information Technologies. Congestion Control ... – PowerPoint PPT presentation

Number of Views:266
Avg rating:3.0/5.0
Slides: 21
Provided by: BjornLa6
Category:

less

Transcript and Presenter's Notes

Title: TCP Congestion Control


1
TCP Congestion Control
  • NETS3303/3603
  • Week 9

2
Outline
  • What is congestion?
  • Approaches to congestion control
  • TCP congestion control
  • TCP vs UDP

3
Principles of Congestion Control
  • Congestion
  • informally too many sources sending too much
    data too fast for network to handle
  • different from flow control!
  • manifestations
  • lost packets (buffer overflow at routers)
  • long delays (queueing in router buffers)
  • a top-10 problem!

4
Causes/costs of congestion
  • two senders, two receivers
  • one router, infinite buffers
  • no retransmission
  • large delays when congested
  • maximum achievable throughput

5
Costs of congestion
  • Reality routers have finite buffers
  • So packets can be lost
  • Congestion causes
  • sender retransmit of lost packet
  • retransmission of delayed (not lost) packet
  • when packets dropped, any transmission capacity
    used for that packet was wasted!

6
Congestion Control
  • routers may drop packets as its service is best
    effort
  • Implies congestion
  • routers dont have effective mechanism to
    indicate congestion to sender
  • ICMP source quench is not it...
  • assumption
  • packet loss due to damage is small, therefore TCP
    assumes it means congestion since ACKs do not
    come back

7
Approaches towards congestion control
Two broad approaches towards congestion control
  • Network-assisted congestion control
  • routers provide feedback to end systems
  • single bit indicating congestion (TCP/IP ECN,
    ATM)
  • explicit rate sender should send at
  • End-end congestion control
  • no explicit feedback from network
  • congestion inferred from end-system observed
    loss, delay
  • approach taken by TCP

8
TCP Congestion Control
  • end-end control (no network assistance)
  • Assumes long delays (packet loss) is due to
    congestion
  • Uses successive retransmissions as measure of
    congestion
  • Reduces effective window as retransmissions
    increase
  • Effective window is minimum of receivers
    advertisement and computed quantity known as the
    congestion window (cwnd)

9
Congestion Control II
  • TCP uses slow start and multiplicative decrease
    to deal with congestion
  • Van Jacobson 1988 outlined these ideas
  • slow-start roughly whenever starting traffic or
    recovering from congestion, start cwnd at the
    size of a single segment and increase it (up to a
    point) as ACKs show up

10
Slow Start
  • Used when starting traffic or when recovering
    from congestion
  • Self-clocking startup to increase transmission
    rate rapidly as long as no packets are lost
  • When starting traffic, initialize the cwnd to the
    size of a single MSS
  • Increase cwnd by size of 1 segment each time an
    ACK arrives without retransmission till ssthresh

11
Slow Start II
Host A
Host B
  • When connection begins, increase rate
    exponentially until first loss event
  • double cwnd every RTT
  • done by incrementing cwnd for every ACK received
  • Summary initial rate is slow but ramps up
    exponentially fast

one segment
RTT
two segments
four segments
12
Congestion Avoidance
  • Slow start is used until cwnd reaches ssthresh
  • Exponential growth is stopped
  • Above threshold, slow down and increase cwnd by
    1 segment per RTT

13
TCP Congestion control
CW Size
ssthresh
Time
congestion avoidance
slow-start
14
Retransmissions
  • TCP uses both Go back-N and selective repeat for
    retransmissions
  • If timeout (gt congestion)
  • Go Back-N and go into slow start
  • If an isolated error (more next slide)
  • Selective repeat and go to ssthresh, enter
    congestion avoidance

15
Fast Retransmit Rule
  • RTO expires up to secs after segment dropped
  • If an isolated error, may be can do better than
    being too conservative!
  • Fast retransmission
  • Sender uses three duplicate ACKs as trigger
  • Sender retransmits early before timeout
  • Sender reduces cwnd to half (instead of 1)

16
CC Refinements
  • After 3 dup ACKs
  • cwnd is cut in half
  • window then grows linearly
  • But after timeout event
  • cwnd instead set to 1 MSS
  • window then grows exponentially
  • to a threshold, then grows linearly

17
Summary of TCP Congestion Control
  • When cwin is below SSThresh, sender in slow-start
    phase, window grows exponentially.
  • When cwin is above SSThresh, sender is in
    congestion-avoidance phase, window grows
    linearly.
  • When a triple duplicate ACK occurs, SSThresh set
    to cwin/2 and cwin set to SSThresh.
  • When timeout occurs, SSThresh set to cwin/2 and
    cwin is set to 1 MSS.

18
Congestion and Routers with RED
  • routers might use an obvious queue-drop mechanism
  • too many packets drop packets at end of queue
    call this atail-drop policy
  • on heavily multiplexed router TCP connections may
    lose many packets and be forced into slow-start
  • routers may use Random Early Detection (or RED) -
    basically randomly discard packets in queue at
    certain thresholds
  • thus avoid tail-drop policy

19
Comparison Of UDP and TCP
20
Summary Of TCP
  • Major transport service in the Internet (85 of
    traffic)
  • Connection oriented
  • Provides end-to-end reliability
  • Uses adaptive retransmission
  • Includes facilities for flow control and
    congestion avoidance
  • Uses 3-way handshake for connection startup and
    shutdown
Write a Comment
User Comments (0)
About PowerShow.com