TCP Variations: Tahoe, Reno, New Reno, Vegas, Sack: Paul D. Amer, Professor
TCP Variations: Tahoe, Reno, New Reno, Vegas, Sack: Paul D. Amer, Professor
Poor Efficiency
In telnet-like applications, TCP sends 1 byte of data
with 4000% overhead.
Sending too much, too soon
Unnecessary retransmits
Send window too big
Very little change in behavior due to congestion
Self-clocking or ACK Clock
Pb Pr
Sender Receiver
Ab
As
Ar
t=3r
cwnd=8
Congestion Avoidance Packet
Ack
After cwnd reaches
a certain threshold TCP
TCP
Sender
t=xr Receiver
cwnd=4
t=(x+3)r
cwnd=7
S R
cwnd = 1
Example: Slow Start/Congestion Avoidance
cwnd = 2
assume ssthresh = 8*MSS
cwnd = 4
12
congestion window size
10
ssthresh cnwd = 8
8
(in MSS)
2
cwnd = 9
0
1 2 3 4 5 6 7
transmission number
cwnd = 10
cwnd = 11
Slow Start & Congestion Avoidance
Initally:
- cwnd = 1*MSS
- ssthresh = very high cwnd (initial) ssthresh
t=xr
t=(x+1)r
3 dup acks
Fast
Retransmit
TCP Tahoes Fast Retransmit
S R
1. Sender cwnd = 1
receives 3
dupACKS. cwnd = 2
2. Sender infers
that the cwnd = 4
segment is
lost.
3. Sender re- 3 duplicate
sends the ACKs
segment
immediately!
4. Sender returns
fast-retransmit
to slow-start.
of segment 4
TCP Variants :
TCP-Tahoe:
implements the slow start, congestion avoidance, and
fast retransmit algorithms
TCP-Reno:
implements the slow start, congestion avoidance, fast
retransmit, and fast recovery algorithms
Sent Segment 44
ACK'ed Segment
480000 cwnd 40
ssthresh
36
460000 32
Lost segment
Fast Retransmit
Sequence #
28
MSS
440000 24
20
Begin congestion
420000 avoidance 16
Begin slow-start
12
400000 8
380000 0
4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7
Time (s)
TCP Tahoe Trace
(with one dropped segment)
500000 48
Sent Segment 44
ACK'ed Segment
480000 cwnd 40
ssthresh
36
460000 32
Sequence #
28
MSS
440000 24
20
420000 16
12
400000 8
380000 0
4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7
Time (s)
Could Tahoe be Improved?
Problems:
Sender has too many
outstanding segments.
How does sender transmit
packets on a dupACK? Time
Slow Start Congestion Avoidance
Need to use a trick -
inflate cwnd.
inflating cwnd with dupACKs
Sent Segment
44
ACK'ed Segment
cwnd
480000 40
ssthresh
cwnd+ndupacks
36
460000 32
Sequence #
28
MSS
440000 24
20
420000 16
12
400000 8
380000 0
4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7
Time (s)
TCP Tahoe & Reno Trace
(with two dropped segments)
500000
Tahoe
Reno
480000 Tahoe & Reno
460000
Sequence #
440000
420000
400000
380000
4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7
Time(s)
What if There are Multiple
Losses in a Window?
With two losses in a window, Reno will
occasionally timeout.
Sent Segment
44
ACK'ed Segment
cwnd
480000 40
ssthresh
cwnd+ndupacks
36
460000 32
Sequence #
28
MSS
440000 24
20
420000 16
12
400000 8
380000 0
4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7
Time (s)
TCP Variation: TCP NewReno
Sent Segment
44
ACK'ed Segment
cwnd
480000 40
ssthresh
cwnd+ndupacks
36
460000 32
Sequence #
28
MSS
440000 24
20
420000 16
12
400000 8
380000 0
4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7
Time(s)
Tahoe, Reno & NewReno Trace
(with two dropped segments)
500000
NewReno
Reno
480000 Tahoe
Reno & NewReno
All
460000
Sequence #
440000
420000
400000
380000
4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7
Time (s)
Is There a Better Way?
The only way Tahoe, Reno and NewReno can
detect congestion is by creating congestion!
They carefully probe for congestion by slowly
increasing their sending rate.
When they find (create), congestion, they cut sending
rate at least in half!
This slow advance and rapid retreat approach
results in a saw-toothed sending rate, and highly
erratic throughput.
What if TCP could detect congestion without
causing congestion?
TCP Variation: TVP Vegas
(True Congestion Avoidance)
Source: Padhye and Floyd, SIGCOMM 01, August 27-31, San Diego, CA
Summary of TCP Behavior
TCP Response to Partial
Response to 3 Response to full ACK
Variatio ACK of Fast
dupACKs of Fast Retransmission
n Retransmission
Do fast
Tahoe retransmit, ++cwnd ++cwnd
enter slow start
Do fast
Exit fast recovery, Exit fast recovery, deflate
retransmit,
Reno deflate window, enter window, enter congestion
enter fast
congestion avoidance avoidance
recovery
Do fast Fast retransmit and Exit modified fast
NewRen retransmit, deflate window recovery, deflate window,
When entering slow start, if connection is new, When entering either fast recovery or
o ssthreshenter modified
= arbitrarily remain in modified
large value fastfast recovery,
modified enter congestion
cwnd = fast
1. recovery recovery ssthresh = max(flight avoidance
size/2, 2*MSS)
else, cwnd = ssthresh.
ssthresh = max(flight size/2, 2*MSS) In congestion avoidance
cwnd = 1. cwnd += 1*MSS per RTT
In slow start ++cwnd on new ACK
TCP without SACK
34
TCP with Selective Ack (SACK)
35
SACK Example
receivers buffer
1-100 101-200
sender
receiver
36
SACK Rules
37
Generating SACKs data receiver behavior
If the data receiver has not received a SACK-Permitted Option for a given
connection, the receiver must not send SACK options on that connection
The receiver should send an ACK for every valid segment that arrives
containing new data
The data receiver should include as many distinct SACK blocks as possible
in the SACK option
SACK option should be filled out by repeating the most recently reported
SACK blocks
The data receiver provides the sender with the most up-to-date info about
the state of the network and the receivers queue
38
Interpreting SACKs - Data Sender behavior
39
Another SACK Example
Receiver Buffer
100 299
receiver
sender
40
Another SACK Example (contd)
receiver
sender
1100
41
Without SACK vs. With SACK
receiver
receiver
sender
sender
42
SACK Observations
SACK TCP follows standard TCP congestion control; Adding SACK to TCP
does not change the basic underlying congestion control algorithms
SACK TCP has major advantages when compared TCP Tahoe, Reno,
Vegas and New Reno, as PDUs have been provided with additional
information due to the SACK
Difference in behavior when multiple packets are dropped from one window
of data
SACK information allows the sender to better decide what to retransmit and
what not to
43
Any questions ?
Data Receiver Reneging
Data receiver is permitted to discard data in its queue that has not been
acknowledged to the data sender, even if the data has already been SACKed
Such discarding of SACKed segments is discouraged, but may occur if the
receiver must give buffer space back to the OS
If reneging occurs
first SACK should reflect the newest segment even if its going to be discarded
Except for the newest segment, all SACK blocks MUST NOT report any old data
which is no longer actually held by the receiver
45
Reneging Example
100 199
receiver
200 reneg occurs; window decreases
sender
46
Consequences of Reneging
47
SACK-Permitted Option
SackPermitted option
is allowed only in a SYN Segment.
indicates sender handles SACKs, and receiver should send SACKs if possible.
SENDER RECEIVER
TCP
connection
establishment
phase
Source
Sourceport
portaddress
address Destination
Destinationport
portaddress
address
Source port address
SequenceDestination
Sequence Number port address
Number
Sequence Ack
Cumulative
CumulativeNumber
AckNo.
No.
data
transfer 1Cumulative
11 AckWindow
No.
Window size
size
phase Window size
Checksum
Checksum
1 Urgent
Urgentpointer
pointer
Checksum
kind=4
kind=4 length=2
length=2 Urgent
kind=1 pointer
kind=1 kind=1
kind=1 options
options
SYN bit
ACK bit
SACK-
SACK-
49 kind=1 kind=1
ACK bit NOP
NOP NOP
NOP
SACK Option
Source port address Destination port address Length of SACK with n blocks?
= (2 + 8 * n) bytes
Sequence
Number Ack No.
Cumulative
HLEN Window size Max number bytes available
for TCP Options?
Checksum Urgent pointer = 40 bytes
Kind=1 Kind=1 Kind=5 Length=??
Left edge of 1st block Max number of SACK blocks
possible?
Right edge of 1st block
= 4 SACK blocks
(barring no other TCP
Options)