UNIVERSITY OF OSLO Department of Informatics Experimentally finding the right aggressiveness for retransmissions in thin TCP streams How hard can it be? Master thesis Jonas Sæther Markussen 18. August 2014 i Experimentally finding the right aggressiveness for retransmissions in thin TCP streams JonasSætherMarkussen 18. August2014 ii iii Abstract ThetraditionalconceptoffairnessinTCPisbasedonbeinglimitedbycongestioncontrol. Today, however,weseethatTCPisbeingusedastransportforinteractiveapplicationsthathavelatencyre- quirements.Theseapplicationscreateapplication-limited,thinstreamswhereretransmissions,rather thancongestioncontrol,isthefactorcontrollingtheperformanceoftheflow. Keepingthemaximum delayaslowaspossibleiscrucialtoimprovingtheQualityofExperienceforinteractive,thin-stream applications. As there is little existing work and no clear consensus on how time-dependent, thin- streamsshouldbetreated,weattempttoassesshowaggressivethesethinTCPstreamscanandshould beonretransmissioninordertoreducetheirretransmissionlatencywhenlossoccurs. Inthisthesis, wediscusshowwehavecreatedaLinuxnetworkingenvironmentandconductedourexperimentsin ordertofindareasonabletrade-offbetweenaggressivenessandfairness. Ourfindingsindicatethat an increased aggressiveness can be justified in competition with greedy streams, and we highlight someissuessurroundingthinstreambehaviourneedstobefurtherstudied. iv v Acknowledgements What seemed like a relatively simple requests from my supervisors – set up a networking testbed and run some tests in order to assess how modifications to the congestion control for thin streams affectothertraffic–turnedouttobeenoughtears,latenightsandoutrightdesperationtobeatopic for a thesis on its own. After much frustration and many dead-ends, accompanied by unexpected and, sometimes, weird results, as well as a recurring reminder that I did not understand network behaviouraswellasIthoughtIdidtobeginwith1,wasIfinallyabletoturnmyworkintosomething thatresemblesamaster’sthesis. First,Iwouldliketothankmysupervisors,Dr. AndreasPetlundandDr. CarstenGriwodz,fortheir guidanceandfeedbackonmywork,patientlyansweringmyquestions,andtakingtimetoreviewand discussmyobservationsandtestresults.Bothofthemhaveprovidedmewithalotinformationabout newfindingsandresultsfromtherestofthethin-streamgrouphereatSimulaaswellaskeepingme updated about research going on both at the networking group at the Department of Informatics at UniversityofOsloandbyothersworkingontheRITEproject. IwouldalsoliketothankDr. PålHalvorsenforhisvaluableinputonmytestresults,andespecially for helping me concretise my thesis and narrowing down my test scenarios to something that was manageable. HeandDr. PetlundreallyhelpedmetietogetherallthelooseendsIhad. AspecialthankstoBendikRønningOpstad. Withouthispatchingofstreamzeroandourcom- binedeffortstofixandimproveanalyseTCP,myworksimplywouldn’thavebeenpossible.Ihave alsolearnedagreatdealfromourdiscussionsonvarioustopicsandproblems;everythingfromhow theLinuxkernelworks,howTCPbehavesandwhatisactuallypassedtothenetworkdriverandput "onthewire",tootherissuessuchasbestpracticesinsoftwaredevelopmentandsourcecontrol. Additionally,IwouldliketothankMarkusFuchsandDr.DavidRosfortheirindividualcomparisons oftheirsimulationresultsandmyownobservationsfromemulation, andespeciallyforconfirming myobservations.Ialsowanttothankthembothforourdiscussionsaboutdifferencesandsimilarities intheobservationsaswellashypothesisingaboutpossibleexplanations,whichgavemealotofnew ideastotryout. MythanksalsogoestoØysteinGylandforkick-startingmyLinuxnetworkingskills,andgettingme startedonsettingupmytestbed,PrebenNensethOlsenforalotoftipsonhowtowriteathesis,and to Tor Ivar Johannesen for getting me started with LATEX as well as spending the entire summer in solitudewithmeouthereonFornebu,wheneverythingwascloseddownforthesummerholidays. MygratitudeisalsoduetoAndersMoeandChristianTrytiforourfriendlytalksandfrequenttripsto thestore. ThankstoMortenØdegaard,AndersEllefsen,KarolineKlever,NoraRaaum,AxelSanner, HeleneCederstolpeAndresen,ChrisCarlmarandStåleKristoffersen,aswellasallmyfriendsand familyforbelievinginmeandconstantlynaggingmetogetmythesisdone. 1...andIprobablystilldon’t! vi vii Contents ExperimentallyfindingtherightaggressivenessforretransmissionsinthinTCPstreams i Abstract iv Acknowledgements vi Contents viii ListofFigures xii ListofTables xiv ListofAbbreviations xv 1 Introduction 1 1.1 Backgroundandrelatedwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Problemstatement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Scopeandlimitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.4 Researchmethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.5 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.6 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 Thinstreams 6 2.1 Trafficcharacteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 viii 2.2 Latencyrequirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.1 Onlinegames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2.2 Real-timemultimediaapplications . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2.3 Administratingremotesystems . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2.4 High-frequencyalgorithmictrading . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Thin-streamtransportprotocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3.1 UserDatagramProtocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3.2 Real-TimeTransportProtocol . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4 TransmissionControlProtocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.4.1 Headerlayout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4.2 Connectionmanagement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.4.3 Datatransfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.4.4 Flowcontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.5 CongestioncontrolinTCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.5.1 Nagle’salgorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.5.2 Delayedacknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.5.3 Congestionwindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.5.4 Windowalgorithmvariants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.5.5 Retransmissiontime-outcalculation . . . . . . . . . . . . . . . . . . . . . . . . 27 2.6 Thin-streammodificationstoTCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.6.1 TCPsmartframing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.6.2 Earlyretransmit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.6.3 Modifiedfastretransmit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.6.4 Linearretransmissiontime-out . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.6.5 Taillossprobe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.6.6 Redundantdatabundling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.7 TCPfairness. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ix
Description: