Leccongestion.ppt
《Leccongestion.ppt》由会员分享,可在线阅读,更多相关《Leccongestion.ppt(27页珍藏版)》请在冰豆网上搜索。
Spring2002,CS461,1,CongestionControl,OutlineQueuingDisciplineReactingtoCongestionAvoidingCongestion,Spring2002,CS461,2,Issues,Twosidesofthesamecoinpre-allocateresourcessoattoavoidcongestioncontrolcongestionif(andwhen)isoccursTwopointsofimplementationhostsattheedgesofthenetwork(transportprotocol)routersinsidethenetwork(queuingdiscipline)Underlyingservicemodelbest-effort(assumefornow)multiplequalitiesofservice(later),Spring2002,CS461,3,Framework,Connectionlessflowssequenceofpacketssentbetweensource/destinationpairmaintainsoftstateattheroutersTaxonomyrouter-centricversushost-centricreservation-basedversusfeedback-basedwindow-basedversusrate-based,Spring2002,CS461,4,Evaluation,FairnessPower(ratioofthroughputtodelay),Spring2002,CS461,5,QueuingDiscipline,First-In-First-Out(FIFO)doesnotdiscriminatebetweentrafficsourcesFairQueuing(FQ)explicitlysegregatestrafficbasedonflowsensuresnoflowcapturesmorethanitsshareofcapacityvariation:
weightedfairqueuing(WFQ)Problem?
Spring2002,CS461,6,FQAlgorithm,SupposeclocktickseachtimeabitistransmittedLetPidenotethelengthofpacketiLetSidenotethetimewhenstarttotransmitpacketiLetFidenotethetimewhenfinishtransmittingpacketiFi=Si+PiWhendoesrouterstarttransmittingpacketi?
ifbeforerouterfinishedpacketi-1fromthisflow,thenimmediatelyafterlastbitofi-1(Fi-1)ifnocurrentpacketsforthisflow,thenstarttransmittingwhenarrives(callthisAi)Thus:
Fi=MAX(Fi-1,Ai)+Pi,Spring2002,CS461,7,FQAlgorithm(cont),FormultipleflowscalculateFiforeachpacketthatarrivesoneachflowtreatallFisastimestampsnextpackettotransmitisonewithlowesttimestampNotperfect:
cantpreemptcurrentpacketExample,Spring2002,CS461,8,TCPCongestionControl,Ideaassumesbest-effortnetwork(FIFOorFQrouters)eachsourcedeterminesnetworkcapacityforitselfusesimplicitfeedbackACKspacetransmission(self-clocking)Challengedeterminingtheavailablecapacityinthefirstplaceadjustingtochangesintheavailablecapacity,Spring2002,CS461,9,AdditiveIncrease/MultiplicativeDecrease,Objective:
adjusttochangesintheavailablecapacityNewstatevariableperconnection:
CongestionWindowlimitshowmuchdatasourcehasintransitMaxWin=MIN(CongestionWindow,AdvertisedWindow)EffWin=MaxWin-(LastByteSent-LastByteAcked)Idea:
increaseCongestionWindowwhencongestiongoesdowndecreaseCongestionWindowwhencongestiongoesup,Spring2002,CS461,10,AIMD(cont),Question:
howdoesthesourcedeterminewhetherornotthenetworkiscongested?
Answer:
atimeoutoccurstimeoutsignalsthatapacketwaslostpacketsareseldomlostduetotransmissionerrorlostpacketimpliescongestion,Spring2002,CS461,11,AIMD(cont),Inpractice:
incrementalittleforeachACKIncrement=(MSS*MSS)/CongestionWindowCongestionWindow+=Increment,AlgorithmincrementCongestionWindowbyonepacketperRTT(linearincrease)divideCongestionWindowbytwowheneveratimeoutoccurs(multiplicativedecrease),Spring2002,CS461,12,AIMD(cont),Trace:
sawtoothbehavior,Spring2002,CS461,13,SlowStart,Objective:
determinetheavailablecapacityinthefirstIdea:
beginwithCongestionWindow=1packetdoubleCongestionWindoweachRTT(incrementby1packetforeachACK),Source,Destination,Spring2002,CS461,14,SlowStart(cont),Exponentialgrowth,butslowerthanallatonceUsedwhenfirststartingconnectionwhenconnectiongoesdeadwaitingfortimeoutTraceProblem:
loseuptohalfaCongestionWindowsworthofdata,Spring2002,CS461,15,FastRetransmitandFastRecovery,Problem:
coarse-grainTCPtimeoutsleadtoidleperiodsFastretransmit:
useduplicateACKstotriggerretransmission,Spring2002,CS461,16,Results,FastrecoveryskiptheslowstartphasegodirectlytohalfthelastsuccessfulCongestionWindow(ssthresh),Spring2002,CS461,17,CongestionAvoidance,TCPsstrategycontrolcongestiononceithappensrepeatedlyincreaseloadinanefforttofindthepointatwhichcongestionoccurs,andthenbackoffAlternativestrategypredictwhencongestionisabouttohappenreduceratebeforepacketsstartbeingdiscardedcallthiscongestionavoidance,insteadofcongestioncontrolTwopossibilitiesrouter-centric:
DECbitandREDGatewayshost-centric:
TCPVegas,Spring2002,CS461,18,DECbit,AddbinarycongestionbittoeachpacketheaderRoutermonitorsaveragequeuelengthoverlastbusy+idlecyclesetcongestionbitifaveragequeuelength1attemptstobalancethroughoutagainstdelay,Spring2002,CS461,19,EndHosts,DestinationechoesbitbacktosourceSourcerecordshowmanypacketsresultedinsetbitIflessthan50%oflastwindowsworthhadbitsetincreaseCongestionWindowby1packetIf50%ormoreoflastwindowsworthhadbitsetdecreaseCongestionWindowby0.875times,Spring2002,CS461,20,RandomEarlyDetection(RED),Notificationisimplicitjustdropthepacket(TCPwilltimeout)couldmakeexplicitbymarkingthepacketEarlyrandomdroprather