A s
P b
P r
P b
A r
Receiver Sender
Figure 4.1: Sliding Window FlowControl
4.2.1 Slow Start
TCP is a sliding window protool. The sliding window represents the amount of
data that may be unaknowledged and on ight in the network at any given time
in the ourse of aommuniation.
Slow-Startisanalgorithmforslidingwindowmanagement(termed inTCP
onges-tion window)forthe purpose ofrapidlyreahingthe stateofequilibrium. Given the
unknown apaity of all intermediate links in the ommuniation path, Slow-Start
initialisesthe ongestion windowto a minimalvalue.
Rapid inrease inthe ongestionwindow ismanaged by imitatingthe rate atwhih
aknowledgements are returned wheninjeting new pakets intothe network. This
aspires in reahing quikly the network apaity.
Wheneveranewonnetionisestablished,Slow-Startinitialisesthe ongestion
win-dowtothevalue ofonesegment. Eahtime anew aknowledgementisreeived, the
value of the ongestion window variable is inreased by the value of one additional
segment. This guaranties an almostexponential growth of the ongestion window.
At any given time the sender's usable window is dened as the minimum between
the reeiver's buer (advertised window) and the ongestion window [39℄. In this
manner, the sender obviates transmitting more data than an be handled by the
network orthe reeiver.
As the ongestion window surpasses the apaity of the network in size it auses
extended buering and overow. The realisation of data loss (e.g. by means of a
timeout)funtionsas anindiationtothe senderthat the ongestionwindowistoo
high.
Although Slow-Start is an independent algorithm, it is never implemented alone.
That is, after reahing equilibrium a ommuniation has to maintain equilibrium
while remaining apable of reating to alterations in network apaity. That is
the purpose of the Congestion Avoidane algorithm. The individual properties of
this algorithm and how it interats with Slow-Start are presented in the following
setions.
4.2.2 Congestion Avoidane
As desribed in the previous setion, Slow-Start aims to lead a ommuniation
to-wards equilibrium. However, it does not provide any mehanisms for preserving
equilibriumor adapting the usable window tohangingnetwork onditions.
The purpose of the Congestion Avoidane algorithmis to reognise the possibility
of large-saleongestion andtake appropriatestepstoprevent it. Meanwhile,when
sensing the potential for expansion, Congestion Avoidane has to make use of this
opportunity. Just like Slow-Start, the Congestion Avoidane algorithm fouses on
the management of the ongestion window to ahieve the aforementioned tasks.
This setionis devoted todesribing how existing researh has analytiallydened
the Congestion Avoidane algorithmand to show the parameters that ne-tune its
Aording to [69℄ the tra ona network an be modelledas:
L i = N + γ · L i − 1
(4.1)where
L i
is the load at intervali
,N
is aonstant that denotes the onstant trainjeted regularly to the network and
γ
is a perentage gure that represents afration of tra, left overfrom the previous interval. If noongestion takesplae,
then
γ
islose tozero,otherwiseL
willwitnessanexponentialinrease. Inorderto ounteragainstnetworkongestionthesourehastomaththe exponentialinreasein the network load with a similar derease in the ongestion window. This should
takeplaebeforeongestionmanagestoaet theommuniation'sthroughputbut
not tooearly tostarve the network for tra.
TCP is based on the fundamental assumption that on most network paths loss
due todamageis rare (
<<
1%) [69℄. As suh allpaket loss isalways aredited tonetworkongestion. TCPdeterminespaketlosswiththehelp ofthe retransmission
timeoutorthereeiptof several subsequent dupliate aknowledgements(dupaks).
Suhareregularaknowledgementsthatontaininthesequene numbereldof the
TCP header, the sequene numberof the last paket that was suessfully reeived
in-sequene.
The eventof aretransmissiontimeoutorthe reeiptofdupliate aknowledgements
is interpreted by TCP as the indiation of ongestion in the ommuniation path.
[24, 14℄ have shown that even though this assumption may be valid for wire-lined
networks it doesnot hold for wireless networks and mobileommuniations.
The loadinjetedbythesoureisregulatedwiththe helpoftheongestionwindow.
Network ongestion an be prevented by pursuing an exponential derease in the
oered load. This has been modelled in[69℄ as:
W i = d · W i − 1
(4.2)where
W
is the window size at intervali
andd
is the rate by whih the windowshould be redued inthe event of ongestion (
d <
1). The ongestion window mayhave tobe redued for several onsequent intervalsuntilongestion is eradiated.
The apaity of Congestion Avoidane to take advantage of available network
re-soures without ompromising its autious stane depends on the rate of inrease
in the ongestion window. In [69℄it is presented that Congestion Avoidaneshould
pursue a linear and not an exponential inrease in order to obviate overestimates
that are harateristi of Slow-Start. As suh, in the absene of ongestion, the
progress of the ongestion window ismodelledas:
W i = W i − 1 + u
(4.3)where
u
isaonstantthat denotesthe amountbywhihthe windowshouldinrease(
u << W max )
.The main reason behind network ongestion is the inrease in oered load aused
that ase, Congestion Avoidane should retreat and redue its ongestion window
size, sharing resoures with other ommuniations. For this [69℄ ditates that the
onstant
d
shouldtakeonthe value1 / 2
indiatingthatinthe eventof ongestiontheongestion window should be redued toone halfof its previous size.
In order tomaintain autiousnesswhen inreasing the ongestion window, the
on-stant
u
is set to the value1
. This means that the inrease per new ongestionwindow is going to be the size of one additional data unit (paket). It is stated in
[69℄ that initiallyit was aimed for a1% inrease rate but it was observed that this
rate eventuallyyielded
1
paket inrementspernew ongestion window.Although Slow-Start and Congestion Avoidane are two dierent algorithms that
serve a dierent purpose (the one to inrease the usable window until the state of
equilibrium and the other to adapt the ongestion windowto hanging onditions)
they are always implemented together [133, 143℄. The following setion is devoted
to desribing their interation.
4.2.3 The Combined Slow-Start with Congestion Avoidane Algorithm
For the ombination of the Congestion Avoidane and Slow-Start algorithms two
variables are introdued to eah TCP ommuniation. The rst is the ongestion
window(wnd) and the other is aSlow-Startthreshold (ssthresh).
The ongestionwindowrepresentsthe amountofdatathatmaybeunaknowledged
on ight in the network at any given time in the ourse of a ommuniation while
the Slow-Start threshold indiates when Slow-Start is terminated and Congestion
Avoidane takes over.
The usable window [39℄ is dened as the minimum between the reeiver's buer
(advertised window) and the ongestionwindow. In this manner, the sender avoids
transmitting more data than an be handled by the network or the reeiver. The
usable windowisthe value utilisedbythe TCP outputroutinewhilethe ongestion
windowis onlyused internallyto determine the usable window.
The ombined algorithmoperates asfollows:
1. During initialisationthe wnd is set to the size of one data unit whilessthresh
takes onthe maximum possible value.
2. Intheevent ofnetworkongestion(timeoutorreeiptofdupaks),thessthresh
is set to one half the usable window but at least equal to two data units. If
ongestionwasindiated by atimeout,thenwnd isset tothe size ofone data
unit.
3. When new data is aknowledged, wnd is inreased. The amount by whih it
is inreased depends on whether TCP is performing Slow-Startor Congestion
Avoidane.
In the rst ase wnd inreases exponential (one data unit per aknowledgement
4.2.4 Fast Retransmit
The original TCP [120℄ speiation did not inlude any information about the
protool'sreationtothereeiptbythereeiverofoutofsequene data(pakets). In
[31, 29℄itisstated that aTCP reeiver mayonly aknowledgesuessfully reeived
and in-sequene data. Consequently, when reeiving out of sequene data, TCP
responds with dupliate aknowledgements. These are regular aknowledgements
that ontain inthe sequene numbereld of theTCP header, thesequene number
of the last paket that was suessfully reeived in-sequene /iteJaobson1990.
An out of bound paketwould result inthe return of adupliate aknowledgement
while several of them would result in several dupliate aknowledgements. If the
numberof interepted dupliate aknowledgements supersedes apredened
thresh-old (usually three), then the sender pereives this as an indiation of data loss.
In that ase Fast Retransmit [68℄ ditates that TCP should perform an
immedi-ate retransmissionof what appears tobethe missingpaket, withoutwaiting for a
retransmission timer toexpire.
Paket loss is not the only reason for triggering the transmission of dupliate
a-knowledgements. The dynami harater of IP routingmay ause TCP pakets to
bedeliveredoutofsequene. Inthisase dupliateaknowledgements willbe
trans-mitted but it is expeted that the amount of dupliate aknowledgements will not
supersede the predened threshold and therefore willnot invokeFastRetransmit.
AswithSlow-StartandCongestionAvoidane,FastRetransmitisanalgorithmthat
is seldom used on itsown rather in onjuntion with the Fast Reovery Algorithm
presented inthe following setion.
4.2.5 Fast Reovery
Aordingtosetion4.2.3,upondeterminingnetworkongestionTCPisrequiredto
proeedwithimmediateredutionoftheongestionwindow. However, thefatthat
some of the transmitted data have managed to get to the reeiver and trigger the
transmissionofdupliateaknowledgementsisanindiationthatnetworkongestion
may be temporaryorof limited eet and Slow-Startshouldbeprevented.
Aording to Fast Reovery [68℄, after Fast Retransmit has identied and
retrans-mittedthe missingpaket, the ommuniationshouldavoidSlow-Startand proeed
with the invoation of Congestion Avoidane. This approah attempts to prevent
the pipefromstarving for tra following the disoveryof data loss.
4.2.6 Combining Fast Retransmit with Fast Reovery
The FastRetransmit algorithmappearedrstinthe4.3BSD Tahoeimplementation
and was followedby the entry ofthe FastReovery inthe 4.3BSD Reno
implemen-tation[134,39℄. Theoperationof theombinedFastRetransmitand FastReovery
•
Whenthe numberof dupliate aknowledgements isgreaterthanthree (prede-ned threshold), ssthresh should be set to one half of the ongestion window,but not less than two segments.
•
Lost segmentshouldberetransmittedand wnd shouldbe set tossthresh plus the size of three segments (the three reeived dupliate aknowledgements).•
Foreverydupliateaknowledgementreeivedthewnd shouldbeinremented byafullpaketsize. Ifpermittedbythenewvalueofwnd newpakets shouldbetransmitted.
•
The rst non dupliate aknowledgement to arrive will aknowledge all out-standingdatapakets (theretransmittedandthosethattriggeredthedupaks).Atthat pointthe wnd must beset tothevalueof ssthresh and theTCP
om-muniation must resume with Congestion Avoidane[134, 133℄.