06 router cong
DESCRIPTION
SC CongestionTRANSCRIPT
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 1/29
Router Congestion Control:
RED, ECN, and XCP
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 2/29
Where we left off
• Signal of congestion: Packet loss
• Fairness: Cooerating end!hosts using
"#$D % Ne&t lecture: Enforce'ent for (oS, rate,
dela), *itter guarantees
• +ut note: " acket dro is a er) -lunt
indicator of congestion
• Routers know 'ore than the).re telling/
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 3/29
What Would Router Do0
• Congestion Signaling:
% Dro, 'ark, send e&licit 'essages
• +uffer 'anage'ent: % Which ackets to dro0
% When to signal congestion0
• Scheduling % #f 'ultile connections, which one.s ackets to
send at an) gien ti'e0
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 4/29
Congestion Signaling
• Dros 1we.e coered2
• #n!-and 'arking % 3ne -it 1congested or not2: ECN
% $ultile -its 1how congested 4 how 'uchaaila-le2: XCP
• 3ut!of!-and notification
% #P Source (uench• Pro-le': #t sends more ackets when things are
congested/
• Not widel) used5
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 5/29
When to 'ark ackets0
• Dro!tail: % When the -uffer is full
% 6he de!facto 'echanis' toda)
% 7er) eas) to i'le'ent % Causes ackets to -e lost in -ursts
• Can lose 'an) ackets fro' a single flow/
• Can cause s)nchroni8ation of flows
% 9ees aerage ueue length high• ; full5 dela)
% Note relation to F#F3 1first!in!first out2: a schedulingdisciline, N36 a dro olic), -ut the).re often -undled
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 6/29
"ctie (ueue $g't5 w4RED
• E&licitl) tries to kee ueue s'all
% <ow dela), -ut still high throughut under -ursts
% 16his is =ower>: throughut 4 dela)2
• "ssu'es that hosts resond to lost ackets
• 6echniue:
% Rando'i8ation to aoid s)nchroni8ation
• 1Recall that if 'an) flows, don.t need as 'uch -uffer sace?2
% Dro before the ueue is actuall) full
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 7/29
RED algorith'
• #f a @ 'in
% <et all ackets through
• #f a A 'a& % Dro all ackets
• #f a A 'in BB a @ 'a&
% $ark or dro w4ro-a-ilit) a• ow to co'ute a0 ow to co'ute a0
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 8/29
RED 3eration
$in thresh$a& thresh
"erage (ueue <ength
minth maxth
maxP
5
Avg queue length
P(drop)
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 9/29
Co'uting a
• What to use as the ueue occuanc)0 % +alance fast resonse to changes
% With a-ilit) to tolerate transient -urs
% Secial case for idle eriods/• EW$" to the rescue again/
% (a G 1 % w2Ha I w H
• +ut what alue of w0
% +ack of the eneloe: 5J % RED is sensitie to this alue, and it.s one of the things
that 'akes it a -it of a ain in ractice
% See htt:44www5aciri5org4flo)d4red5ht'l
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 10/29
Co'uting a
• P- ia linear interolation
% P- G 'a& H 1a % 'in 4 'a& % 'in2
• $ethod : a G -
% Keo'etric rando' aria-le for inter!arrials -etweendros5
% 6ends to 'ark in -atches 1 S)nc2
• $ethod J:
% Lnifor' r55 X -e unifor' in M, J, / 4-!
% Set a G -41!count H -2
• Count G O un'arked ackets since last 'ark
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 11/29
RED ara'eter sensitiit)
• RED can -e er) sensitie to ara'eters % 6uning the' is a -it of a -lack art?
• 3ne thing: =gentle> RED
% 'a& @G - @G as % 'a&thresh @G a @G JH'a&thresh
% instead of =cliff> effect5 $akes RED 'ore ro-ust tochoice of 'a&thresh, 'a&
•+ut note: Still 'ust choose w, 'inthresh/• RED is not er) widel) delo)ed, -ut testingagainst -oth RED and Dro6ail is er) co''on inresearch, -ecause it could -e5
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 12/29
=$arking>, =Detection>
• RED is =Rando' Earl) Detection”
% Could 'ean 'arking, not droing
•$arking0 % DEC-it: =congestion indication> -inar)
feed-ack sche'e5
% #f ag ueue len Athresh, set the -it
% #f A half of ackets 'arked, e&onential
decrease, otherwise linear increase
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 13/29
$arking J: ECN
• #n #P!land % #nstead of dropping a acket, set a -it
% #f -it set, react the sa'e wa) as if it had -een droed 1-ut )ou don.thae to retrans'it or risk losing "C9 clocking2
• Where does it hel0 % Dela)!sensitie as, articularl) low!-w ones
% S'all window scenarios
• So'e co'le&it): % ow to send in legac) #P ackets 1#P 6oS field2
% Deter'ining ECN suort: two -its 1one =ECN works>, one =congestionor not>
% ow to echo -its to sender 16CP header -it2
• $ore co'le&it): Cheating? % We.ll co'e -ack to this later5 :2
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 14/29
+e)ond congestion indication
• Wh) do we want to do 'ore0
• 6CP doesn.t do so well in a few scenarios: % igh -andwidth!dela) roduct eniron'ents
• "dditie increase w4 acket window
• Could take 'an) R66s to fill u after congestion
• =not a ro-le'> with a single flow with 'assie -uffers 1in theor)2
• a real ro-le' with real routers and -urst) cross!traffic
% Short connections• 6CP neer has a chance to oen its window
% 3ne caeat: " ractical work!around to 'an) of thesero-le's is oening 'ultile 6CP connections5 6heeffects of this are still so'ewhat une&lored with regard tosta-ilit), glo-al fairnes and efficienc), etc5
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 15/29
XCP
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 16/29
Feed-ack G
I 5 acket
Round 6ri 6i'e
Congestion Window
Feed-ack G
! 5 acket
ow does XCP Work0
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 17/29
ow Does an XCP Router Co'ute
the Feed-ack0
Congestion Controller Fairness ControllerGoal: Divides ∆ betweenflows to converge to fairness
Looks at a flow’s state inCongestion Header
Algorithm:
If ∆ > ⇒ Divide ∆ e!"all#between flows
If ∆ $ ⇒ Divide ∆ betweenflows %ro%ortionall# to theirc"rrent rates
&I&D AI&D
Goal: &atches in%"t traffic tolink ca%acit# ' drains the !"e"e
Looks at aggregate traffic '!"e"e
Algorithm:
Aggregate traffic changes b# ∆
∆ ( )%are *andwidth
∆ ( + ,"e"e )i-e
)o. ∆ / α d avg )%are + β ,"e"e
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 18/29
∆ / α d avg )%are + β ,"e"e
2
24
0 2α β
π α =<< ανδ
0heorem: )#stem convergesto o%timal "tili-ation 1i2e2.stable3 for an# link bandwidth.dela#. n"mber of so"rces if:
14roof based on 5#!"istCriterion3
Ketting the deil out of the details /
Congestion ControllerFairness Controller
5o 4arameter 0"ning
5o 4arameter 0"ning
Algorithm:
If ∆ > ⇒ Divide ∆ e!"all# between flows
If ∆ $ ⇒ Divide ∆ between flows%ro%ortionall# to their c"rrent rates
5eed to estimate n"mber offlows 5
∑ ×
=
T in pkts
pkt pkt RTT Cwnd T N
)/(
1
600 %kt : 6o"nd 0ri% 0ime in header
Cwnd %kt : Congestion 7indow in header
0 : Co"nting Interval
5o 4er+Flow )tate
5o 4er+Flow )tate
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 19/29
"ortioning feed-ack
• 6rick) -it: Router sees ueue si8es andthroughutsQ hosts deal in cwnd5 $ustconert5
• Ne&t trick) -it: Router sees acketsQhost.s resonse is the sum of feed-ackreceied across its ackets5 $ust
aortion feed-ack onto ackets5• Reuire'ent: No er!flow state at router
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 20/29
XCP: Positie Feed-ack
• sare -4w to allocate
• N flows
• er!flow: ∆ roto rtt % <arger R66 needs 'ore cwnd increase to add
sa'e a'ount of -4w
•er!acket: % O ackets o-sered in ti'e d cwnd4rtt
% co'-ining the': i sare4N H rttJ 4 cwnd
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 21/29
+ut 'ust allocate to a flow
• ow 'an) ackets does flow # send in ti'e 60 % 6 H cwnd# 4 R664#
• So to count O of flows
% counter IG 4 16 H cwndkt 4 R66kt2 % eer) ti'e )ou receie a acket
• So: er!flow increase sare 4 counter
• 6his is a cute trick for statelessl) counting the O
of flows5• Si'ilar to tricks used in CSF( 1Core Stateless
Fair (ueueing2, which we.ll -e hitting ne&t ti'e
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 22/29
XCP decrease
• $ultilicatie Decrease % cwnd G -eta H cwndold 1sa'e -eta for all
flows2
% 6his is like the reerse of the slow!start'echanis'
• Slow start: Each "C9, increase cwnd -) % Results in e&onential increase
• XCP decrease: Each acket, decrease cwnd• +L6: $ust account for rtt# ?G ag R66, so
nor'ali8e % ni G total decrease H 1rtt# 4 agrtt2
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 23/29
XCP -enefits B issues
• Reuires =olicers> at edge if )ou don.t trust hosts toreort cwnd4rtt correctl) % $uch like CSF(/
• Doesn.t roide 'uch -enefit in today’s co''on case % +ut 'a) -e er) significant for tomorrow’s5
% igh -wHrtt eniron'ents 1KigE co'ing to a deskto near)ou/2
% Short flows, highl) d)na'ic workloads
• Cool insight: Decouled fairness and congestioncontrol
• Prett) -ig architectural change
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 24/29
+e)ond RED
• What if )ou want to use RED to tr) to
enforce fairness0
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 25/29
C39e
• C3se and 9ee49ill 1#nfoco' J2
% E&isting sche'es to enali8e unresonsie flows
1FRED4enalt) -o&2 introduce additional co'le&it)
% Si'le, stateless sche'e• During congested eriods
% Co'are new acket with rando' kt in ueue
% #f fro' sa'e flow, dro -oth
% #f not, use RED to decide fate of new acket
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 26/29
C39e
• Can i'roe -ehaior -) selecting 'ore
than one co'arison acket
% Needed when 'ore than one 'is-ehaing
flow
• Does not co'letel) sole ro-le'
% "ggressie flows are unished -ut not li'ited
to fair share % Not good for low degree of 'ultile&ing
wh)0
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 27/29
Stochastic Fair +lue
• Sa'e o-*ectie as RED Penalt) +o&
% #dentif) and enali8e 'is-ehaing flows
• Create < hashes with N -ins each
% Each -in kees track of searate 'arking rate 1'2
% Rate is udated using standard techniue and a -in si8e
% Flow uses 'ini'u' ' of all < -ins it -elongs to
% Non!'is-ehaing flows hoefull) -elong to at least one -in
without a -ad flow
• <arge nu'-ers of -ad flows 'a) cause false osities
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 28/29
Stochastic Fair +lue
• False osities can continuousl) enali8e
sa'e flow
• Solution: 'oing hash function oer ti'e
% +ad flow no longer shares -in with sa'e flows
% #s histor) resetdoes -ad flow get to 'ake
trou-le until detected again0
• No, can erfor' hash war'u in -ackground
7/18/2019 06 Router Cong
http://slidepdf.com/reader/full/06-router-cong 29/29
"cknowledge'ents
• Seeral of the XCP slides are fro' Dina
9ata-i. S#KC3$$ resentation slides5
• htt:44www5ana5lcs5'it5edu4dina4XCP4