Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack:...

72
TCP Tahoe, Reno, NewReno, SACK, and Vegas

Transcript of Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack:...

Page 1: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

TCPTahoe, Reno, NewReno,

SACK, and Vegas

Page 2: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

cwnd: congestion windowswnd: usable sending windowrwnd: advertised receiver’s windowssthresh: slow-start threshold

Page 3: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

RFC793

Page 4: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

No cwndOn timeout: retransmitswnd = rwnd

Page 5: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

TCP Tahoe

Page 6: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 7: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 8: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

new ack:if (cwnd < sstresh) cwnd += 1else cwnd += 1/cwnd

Page 9: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

timeout/3rd dup ack:retransmit all unackedssthresh = cwnd/2cwnd = 1

Page 10: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Improving TCP Tahoe:

Packets still gettingthrough in dup ack -- noneed to reset the clock!

Page 11: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

TCP Reno

Page 12: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

new ack:if (cwnd < sstresh) cwnd += 1else cwnd += 1/cwnd

Page 13: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

timeout:retransmit 1st unackedssthresh = cwnd/2cwnd = 1

Page 14: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

3rd dup ack:retransmit 1st unackedssthresh = cwnd/2cwnd = cwnd/2 + 3

Page 15: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Fast Recovery:the pipe is still

almost full -- noneed to restart

Page 16: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

subsequent dup ack:cwnd++

new ack:cwnd = ssthresh

Page 17: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

U U+W-1

Suppose U is lost (oldest unacked) and allother packets are not. At time t, cwnd isW, and packets [U, U+W-1] are in thepipe.

Page 18: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Between time t and t+RTT, we would haveretransmitted U and received W-1duplicate ACK.

U U+W-1

Page 19: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Between time t and t+RTT, the cwndbecomes W/2 + W-1. So we get to sendW/2 new packets during the time. (Sooncwnd is going to become W/2 anyway..)

U U+W-1 U+W/2+W-1

Page 20: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

At time t+RTT, we receive ACK forpackets [U,U+W-1], set cwnd to W/2.

U U+W-1 U+W/2+W-1

Page 21: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 22: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Simulationof TCP

Tahoe/Reno

Page 23: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

R1S1 S2

Page 24: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Enteringqueue

Exitingqueue

ACKed

Page 25: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 26: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 27: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 28: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 29: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 30: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 31: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Improving TCP Reno:

Timeout if multiple lossesin a window

Page 32: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

TCP NewReno

Page 33: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Fast recovery starts.

are the outstandingpackets at this time.

Partial ACK

Idea: stays in fast recovery until all havebeen ACKed.

Page 34: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Perhaps the nextpacket is lost?

Page 35: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

3rd dup ack:retransmit 1st unackedssthresh = cwnd/2cwnd = cwnd/2 + 3remember highest

Page 36: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

subsequent dup ack:cwnd++

“complete” ack:(all are acked)cwnd = ssthresh

Page 37: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

“partial” ack:retransmitcwnd = ssthresh (?)

Page 38: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 39: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Note: RFC2581/RFC2582 give theaccurate/gory details. Simplifiedversion is presented here (eg. cwnd vsFlightSize, update of cwnd upon partialACK).

Page 40: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

TCP SACK

Page 41: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Coarse Feedback

Page 42: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Go-Back-Nvs

Selective Repeat

Page 43: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Use TCP headeroptions to reportreceived segments.

Page 44: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

SACK Blocks:

1st block - report mostrecently received segments

subsequent blocks - repeatmost recent previous blocks

Page 45: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

pipe: num of outstandingpackets in the path.

send only if pipe < cwnd

Page 46: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

scoreboard: whichpackets have beenreceived?

Page 47: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

3rd dup ack:pipe = cwnd - 3retransmit 1st unackedssthresh = cwnd/2cwnd = cwnd/2 + 3

Page 48: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

subsequent dup ack:cwnd++pipe--

(if send new packet, pipe++)

Page 49: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

“partial” ack:retransmitcwnd = ssthreshpipe -= 2

Page 50: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 51: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still
Page 52: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Power of SACK:Which packet has left the network?Where is the gap?Decouple when to send and what tosend.

Page 53: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

TCP Vegas

Page 54: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

So far,

packet loss assignal of congestion.

Page 55: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

But, already overcongested when

packets are dropped

Page 56: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

What other signalsare there?

Page 57: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

RTT

Load

Page 58: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Expected Sending Rate

E = cwnd/BaseRTT

Page 59: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

BaseRTT: RTT whenno congestion

(take min measured RTT inpractice)

Page 60: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Actual Sending Rate

A = cwnd/RTT

RTT:

Page 61: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

If (E-A) < alphacwnd++

else if (E-A) > betacwnd--

Page 62: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Intuition:(E-A) x BaseRTTrepresents extrabuffers occupied inthe network

Page 63: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Picking alpha/beta

alpha: small but non-zeroto take advantage ofavailable bandwidthimmediately. ( = 1/BaseRTT)

Page 64: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Picking alpha/beta

beta: beta-alpha shouldnot be too small toprevent oscillation.( = 3/BaseRTT)

Page 65: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Deployment

Page 66: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Feb 2004

Page 67: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

70%SACK capable

Page 68: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Where is TCP Vegas?

Page 69: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Problem 1.Can’t compete with

TCP Reno.

Page 70: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Problem 2.Sensitive to RTT

estimation.

Page 71: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

TCP BIC/CUBICLinux 2.6.x

Page 72: Tahoe, Reno, NewReno, SACK, and Vegas - NUS …ooiwt/cs5229/archives/0708s...timeout/3rd dup ack: retransmit all unacked ssthresh = cwnd/2 cwnd = 1 Improving TCP Tahoe: Packets still

Compound TCPMS Windows Vista