ECS503 Transport Layer: Reliable Transfer, TCP and Conges On Control
ECS503 Transport Layer: Reliable Transfer, TCP and Conges On Control
increase ?
finite shared output
link buffers
Host A
%
out
Causes]costs of congesnon:
scenar|o 3
Host B
Host C
Host D
%
in
: original data
%'
in
: original data, plus
retransmitted data
A: as red %
in
s
e
n
d
e
r
c
o
n
g
e
s
u
o
n
w
l
n
d
o
w
s
l
z
e
AlMu saw LooLh
behavlor: problng
for bandwldLh
addluvely lncrease wlndow slze .
.. unul loss occurs (Lhen cuL wlndow ln half)
ume
80
School of Electronic Engineering and Computer Science
TCP Congestion Control:
details
sender llmlLs Lransmlsslon:
cwnd ls dynamlc, funcuon of
percelved neLwork
congesuon
1cl seoJloq tote.
tooqbly. send cwnd
byLes, walL 811 for
ACkS, Lhen send more
byLes
lasL byLe
ACked senL, noL-
yeL ACked
(ln-lghL)
lasL byLe
senL
cwnd
Last8yteSent-
Last8yteAcked
< cwnd
seoJet sepoeoce oombet spoce
raLe
cwnd
811
byLes/sec
81
School of Electronic Engineering and Computer Science
1C S|ow Start
When connecuon
beglns, lncrease raLe
exponenually unul rsL
loss evenL:
lnlually cwnd = 1 MSS
double cwnd every 811
done by lncremenung cwnd
for every ACk recelved
5ommoty. lnlual raLe ls
slow buL ramps up
exponenually fasL
PosL A
one segmenL
8
1
1
PosL 8
ume
Lwo segmenLs
four segmenLs
82
School of Electronic Engineering and Computer Science
1C: detecnng, reacnng to |oss
Loss lndlcaLed by umeouL:
cwnd seL Lo 1 MSS,
wlndow Lhen grows exponenually (as ln slow sLarL) Lo
Lhreshold, Lhen grows llnearly
Loss lndlcaLed by 3 dupllcaLe ACks: 1C 8LnC
dup ACks lndlcaLe neLwork capable of dellverlng some
segmenLs
cwnd ls cuL ln half wlndow Lhen grows llnearly
1C 1ahoe always seLs cwnd Lo 1 (umeouL or 3
dupllcaLe acks)
83
School of Electronic Engineering and Computer Science
C: when should Lhe
exponenual
lncrease swlLch Lo
llnear?
A: when cwnd geLs
Lo 1/2 of lLs value
before umeouL.
lmplemenLauon:
varlable ssthresh
on loss evenL, ssthresh ls seL
Lo 1/2 of cwnd [usL before
loss evenL
1C: sw|tch|ng from s|ow start
to CA
84
School of Electronic Engineering and Computer Science
Summary: 1C Congesnon
Contro|
umeouL
ssLhresh = cwnd/2
cwnd = 1 MSS
dupACkcounL = 0
tettoosmlt mlssloq seqmeot
!
cwnd > ssLhresh
congesuon
avoldance
cwnd = cwnd + MSS (MSS/cwnd)
dupACkcounL = 0
ttoosmlt oew seqmeot(s), os olloweJ
new ACk
.
dupACkcounL++
dupllcaLe ACk
fasL
recovery
cwnd = cwnd + MSS
ttoosmlt oew seqmeot(s), os olloweJ
dupllcaLe ACk
ssLhresh= cwnd/2
cwnd = ssLhresh + 3
tettoosmlt mlssloq seqmeot
dupACkcounL == 3
umeouL
ssLhresh = cwnd/2
cwnd = 1
dupACkcounL = 0
tettoosmlt mlssloq seqmeot
ssLhresh= cwnd/2
cwnd = ssLhresh + 3
tettoosmlt mlssloq seqmeot
dupACkcounL == 3 cwnd = ssLhresh
dupACkcounL = 0
new ACk
slow
sLarL
umeouL
ssLhresh = cwnd/2
cwnd = 1 MSS
dupACkcounL = 0
tettoosmlt mlssloq seqmeot
cwnd = cwnd+MSS
dupACkcounL = 0
ttoosmlt oew seqmeot(s), os olloweJ
new ACk
dupACkcounL++
dupllcaLe ACk
!
cwnd = 1 MSS
ssLhresh = 64 k8
dupACkcounL = 0
%&'
()*+
%&'
()*+
%&'
()*+
85
School of Electronic Engineering and Computer Science
1C throughput
Avg. 1C LhroupuL as funcuon of wlndow slze, 811?
lgnore slow sLarL, assume always daLa Lo send
W: wlndow slze (measured ln byLes) where loss occurs
avg. wlndow slze (# ln-lghL byLes) ls W
avg. LhrupuL ls 3/4W per 811
W
W/2
avg 1C LhrupuL =
3
4
W
811
byLes/sec
86
School of Electronic Engineering and Computer Science
Transport Layer 3-86
1C Iutures: 1C over |ong,
fat p|pes
Lxample: 1300 byLe segmenLs, 100ms 811, wanL
10 Cbps LhroughpuL
requlres W = 83,333 ln-lghL segmenLs
LhroughpuL ln Lerms of segmenL loss probablllLy,
L [MaLhls 1997]:
Lo achleve 10 Cbps LhroughpuL, need a loss raLe of L =
210
-10
- o vety smoll loss tote!
new verslons of 1C for hlgh-speed
1C LhroughpuL =
1.22
.
MSS
811
L
87
School of Electronic Engineering and Computer Science
foltoess qool. lf k 1C sesslons share same
bouleneck llnk of bandwldLh 8, each should have
average raLe of 8/k
1C connecuon 1
bouleneck
rouLer
capaclLy 8
1C Ia|rness
1C connecuon 2
88
School of Electronic Engineering and Computer Science
Why |s 1C fa|r?
Lwo compeung sesslons:
addluve lncrease glves slope of 1, as LhroughouL lncreases
mulupllcauve decrease decreases LhroughpuL proporuonally
8
8
equal bandwldLh share
Connecuon 1 LhroughpuL
C
o
n
n
e
c
u
o
n
2
L
h
r
o
u
g
h
p
u
L
congesuon avoldance: addluve lncrease
loss: decrease wlndow by facLor of 2
congesuon avoldance: addluve lncrease
loss: decrease wlndow by facLor of 2
89
School of Electronic Engineering and Computer Science
Ia|rness (more)
loltoess ooJ uul
Mulumedla apps
oen do noL use 1C
do noL wanL raLe
Lhrouled by
congesuon conLrol
lnsLead use uu:
send audlo/vldeo aL
consLanL raLe, LoleraLe
packeL loss
loltoess, potollel 1cl
coooecuoos
Appllcauon can open
muluple parallel
connecuons beLween Lwo
hosLs
Web browsers do Lhls
e.g., llnk of raLe 8 wlLh 9
exlsung connecuons:
new app asks for 1 1C, geLs raLe 8/10
new app asks for 11 1Cs, geLs 8/2