Title: TCP Congestion Control Mechanisms II
1TCP Congestion Control Mechanisms II
- For CSE5346/4346 Computer Networks II
- Qingchun (Dustin) Jiang
- Spring 2005
2Outline
- DCCP
- Limited Slow-Start
- NewReno
- A Conservative Selective Acknowledgment (SACK)
- High Speed TCP
- Project
3PART I
- Datagram Congestion Control Protocol
4What is DCCP
- A congestion-controlled, unreliable flow of
datagrams - UDP plus congestion control"
- Also a modern transport protocol
- Partial checksums, mobility, DoS resistance, fast
connections, . . .
5Targeted Applications
- Long-lived flows that prefer timeliness to
reliability - Streaming media, Internet telephony, on-line
games, . . . - UDP not congestion controlled, apps must
implement CC - Apps want
- Buffering control don't deliver old data
- Different congestion cotrol mechanisms (TCP vs.
TFRC) - Low per-packet byte overhead
6DCCP Which Layer?
SCTP
DCCP
Figure 2-11 TCP/IP Protocol Suite, Behrouz A.
Forouzan
7Streaming Media
Source http//streaming.wisconsin.edu/Accessible_
Tutorials/Tutorial1/p1-3.htm
- What streaming media needs?
- Timeliness of data.
- What streaming media doesnt need?
- Retransmissions of lost packets.
8Problems with TCP
- Introduce arbitrary delay
- Retransmission does not helpful and introduce
more traffic to networks
9Streaming media with TCP
Arbitrary Delay
D9-D12
A12
D12-D16
A16
D17-D19
D20-D22
Data is not useful
A16
D17
10Streaming Media with UDP
No Congestion Control in UDP flows. Harmful to
internet health
11Problems with UDP
- From Networks point of view
- Congestion
- Unfairness
- From the applications point of view
- Firewalls and NATs do not always pass UDP traffic
12Solution
- UDP with
- congestion control
- Handshaking during connection setup and teardown
13DCCP Overview
- Connection setup teardown Reliable handshaking
- Unreliable packet flow
- Bi-directional
- Unicast connections
- Reliable feedback from receiver to sender
- Choice of congestion control
- Minimal overhead
14DCCP connection setup
Client
Server
DCCP A
DCCP B
Similar to TCP connection setup
DCCP Request
DCCP Response
DCCP ACK
15DCCP Data transfer phase
Client
Server
DCCP DATA
DCCP ACK
DCCP DATA
DCCP DATA ACK
16DCCP connection termination
Client
Server
DCCP A
DCCP B
DCCP CloseReq
DCCP Close
DCCP Reset
17DCCP data transfer Example
B
A
- Each packet carries a seq
- Seq incremented per packet
- Pure Acks also increment seq
DCCP-DATA(seq 1)
DCCP-DATA(seq 2)
DCCP-ACK(seq 10, ACK 2)
DCCP-DATA ACK(seq 3, ACK 10)
DCCP-ACK(seq 11, ACK 3)
18Congestion Control Mechanisms in DCCP
- TCP Like Congestion Control CCID 2
- TFRC Congestion Control CCID 3
19CCID2 TCP Like Congestion Control
- AIMD behavior exhibited as in TCP/IP
- Slow start
- Timeouts
- Congestion event -gt Halve congestion window
- Abrupt rate changes
20CCID 2 TCP-like Congestion Control
- Applications using this
- Respond quickly to changes in available
bandwidth. - Must tolerate abrupt changes
Online Interactive Games prefer this kind of
congestion control
21CCID 3 TFRC Congestion Control
- TFRC, RFC 3448
- Equation-based congestion control
- Single congestion event does not halve rate
- Minimizes abrupt changes in sending rate
- Maintains longer-term fairness with TCP
Streaming Media doesnt need responsiveness but
prefer steadier less bursty traffic as provided
by TFRC
22PART II
- Limited Slow-Start for TCP with Large Congestion
Windows
23Motivation
- For TCP connections that are able to use
congestion windows of thousands MSS - Increase cwnt by thousands of MSS per RTT
- Result in loss of thousands of packets in one RTT
- consequently
- Counter-productive for the TCP flow itself
- Also hard on the rest of the traffic sharing the
congested link
24Solution Limited Slow Start
- Limited Slow-Start, limiting the number of
segments by which the congestion window is
increased for one window of data during slow-
start phase. - How?
- Using max_ssthresh
25Algorithm for limited slow start
- cwnd lt max_ssthresh
- Normal increase one MSS per ACK
- max_ssthresh lt cwnd lt ssthresh
- the congestion window is increased during
slow-start by at most max_ssthresh/2 MSS per
round- trip time. - ssthresh lt cwnd,
- End of slow start phase enter congestion
avoidance phase.
26Example
- with Limited Slow-Start with
- max_ssthresh 100 MSS, 836 round-trip times to
reach a congestion window of 83,000 packets - the largest transient queue during slow-start
would be 100 packets - Normal slow start
- 16 round-trip times (assuming no packet drops).
- the transient queue during Slow-Start would reach
more than 32,000 packets.
27Question?
- How to choose appropriate value for max_ssthresh
28PART III
- The NewReno Modification to TCP's Fast Recovery
Algorithm
29Motivation
- Typical Fast Retransmit algorithm(RENO) only
retransmits a packet after - a retransmit timeout has occurred,
- after three duplicate acknowledgements have
arrived - if the SACK option is available, the TCP sender
has the information to make intelligent decisions
about which packets to retransmit and which
packets not to retransmit during Fast Recovery.
30Motivation
- If SACK option is not available, after
retransmitting a lost packet. - there had been a single packet drop
- the acknowledgement for this packet will
acknowledge all of the packets transmitted before
Fast Retransmit was entered - there were multiple packet drops
- the acknowledgement for the retransmitted packet
will acknowledge some but not all of the packets
transmitted before the Fast Retransmit. - We call this packet a partial acknowledgment
31The Fast Retransmit and Fast Recovery algorithms
- When the third duplicate ACK is received and the
sender is not already in the Fast Recovery
procedure, set ssthresh max (FlightSize / 2,
2MSS) and record the highest sequence number
transmitted in the variable "recover". - Retransmit the lost segment and set cwnd to
ssthresh plus 3MSS - For each additional duplicate ACK received,
increment cwnd by MSS and transmit a segment if
allows.
32The Fast Retransmit and Fast Recovery algorithms
- 4. When an ACK arrives that acknowledges new
data, this ACK could be - the acknowledgment elicited by the retransmission
of the first lost data - a later retransmission
- If ACK acks all data before retransmitting the
first lost packet. Change cwnt to ssthresh and
exit fast recovery procedure - If it is a partial ACK packet,
- retransmit the first unacknowledged segment
- Adjust cwnt and
33Key idea
- How to respond to a partial ACK.
- Retransmit one segment
- There are a few other options to handle a partial
ACK. - In TCP-Reno, the first partial ACK will bring the
sender out of the fast recovery phase - Results in timeouts when there are multiple
losses - In TCP New-Reno, partial ACK is taken as an
indication of another lost packet (which is
immediately retransmitted). - Sender comes out of fast recovery only after all
outstanding packets (at the time of first loss)
are ACKed
34PART IV
- A Conservative Selective Acknowledgment
(SACK)-based Loss Recovery Algorithm for TCP
35Motivation
- While the TCP SACK RFC2018 is being steadily
deployed in the Internet , there is evidence that
hosts are not using the SACK information when
making retransmission and congestion control
decisions. - Conservative SACK one straightforward method for
TCP implementations to use SACK information to
increase performance
36Main Idea
Scoreboard to keep tracking of information from
ack or sack.
RecoveryPoint
Enter loss recovery phase Dupthresh number of dup
ack received For each ack or sack, Reset ssthresh
cwnd flightsize/2 Retransmit the first
dropped segment
37Part V
38What is High Speed TCP?
- Changes the way TCP behaves at high speed (ie
large cwnd) - Standard TCP has two modes
- Slow start (not very slow)
- Congestion Avoidance
- Focuses on Congestion Avoidance Region ie when
TCP knows (thinks it knows) how well the network
behaves - BUT only when we are at high speeds, else do what
normal Standard TCP does - Readily deployable 1st step towards Equation
Based Congestion Control
39What does it do?
- Standard TCP uses two parameters
- Increase parameter, a
- Decrease parameter, b
- i.e. AIMD( a,b )
- Standard TCP uses
- a1
- b0.5
- High Speed TCP introduces
- a-gta(cwnd)
- b-gtb(cwnd)
- i.e. The value of a and b depends on the current
congestion window size - If we increase a more with larger cwnd we can get
back up to our optimal cwnd size for the
network path - If we decrease b less we dont lose as much
bandwidth due to a small congestion window
40What exactly does it do?
- Based on the TCP response function
- Relates loss and throughput
- Uses the TCP response function to investigate
certain parameters - High_Window, High_Loss largest cwnd needed for x
throughput and the required loss for that
throughput - Low_Window, Low_Loss smallest cwnd when we
actually switch from Standard TCP and the
required loss rate for that cwnd size - High_B the smallest decrease in b when we are at
a large cwnd - Equations to transform this information into a
table for a(cwnd) and b(cwnd)
41PART IV
- Question, Discussion, Project
42Issues
- Disk space issue
- Put all your data except your code to /tmp
directory ( you have to make a directory for
yourself there by mkdir /tmp/your_id - No data between sources and destinations
- Start traffic at different time (i.e., every 0.01
seconds)
43Create Agents
- Create TCP/SACK in ns2
- set tcp new Agent/TCP/Sack1
- set sink new Agent/TCPSink/Sack1
- Create TFRC agent in ns2
- set tcp new Agent/TFRC
- set sink new Agent/TFRCSink
44Tips
- For loops (suppose you name ns nodes as
node_s(0), node_s(1), ..) - set MAX_NUMBER_CONN 10
- for set index_of_conn 0 index_of_conn lt
MAX_NUMBER_AMID_CONN incr index_of_conn - set tcp_(index_of_conn) new Agent/TCP/Sack1
- tcp_(index_of_conn) set packetSize_ 1000
- tcp_(index_of_conn) set increase_num_ a
- tcp_(index_of_conn) set decrease_num_ b
- ns attach-agent node_s( index_of_conn)
tcp_(index_of_conn) - set ftp _(index_of_conn) new Application/FTP
- ftp _(index_of_conn) attach-agent tcp
_(index_of_conn) - set TCPSink _(index_of_conn) new
Agent/TCPSinnk/Sack1 - ns connect tcp_(index_of_conn) TCPSink
_(index_of_conn) -
- Passing arguments
- set a lindex argv 0
- set b lindex argv 1
- set queueType lindex argv 2
- set Bandwidth lindex argv 3
- ns your_tcl_file argv0 argv1 argv2 argv 3
45