Академический Документы
Профессиональный Документы
Культура Документы
Session 1813
Traffic Behavior and
Queuing in a QoS
Environment
NetworkingTutorials
Prof.DimitriP.Bertsekas
DepartmentofElectricalEngineering
M.I.T.
Objectives
Providesomebasicunderstandingofqueuingphenomena
Explaintheavailablesolutionapproachesandassociated
tradeoffs
Giveguidelinesonhowtomatchapplicationsandsolutions
Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)
Outline
Basicconcepts
Performancemeasures
Solutionmethodologies
Queuingsystemconcepts
Stabilityandsteadystate
Causesofdelayandbottlenecks
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)
Performance Measures
Delay
Delayvariation(jitter)
Packetloss
Efficientsharingofbandwidth
Relativeimportancedependsontraffictype(audio/video,
filetransfer,interactive)
Challenge:Provideadequateperformancefor(possibly)
heterogeneoustraffic
Solution Methodologies
Analyticalresults(formulas)
Pros:Quickanswers,insight
Cons:Ofteninaccurateorinapplicable
Explicitsimulation
Pros:Accurateandrealisticmodels,broadapplicability
Cons:Canbeslow
Hybridsimulation
Intermediatesolutionapproach
Combinesadvantagesanddisadvantagesofanalysisandsimulation
Examples of Applications
Analytical Modeling Discrete-Event Simulation
Hybrid DES
M/G/./. & M/G/./. & Decomposition
Analysis Scenarios with Explicit
G/G/./. G/G/./. with Kleinrock DES only with
and
FIFO Priority Independence Explicit Traffic
Background
Analysis Analysis Assumption
Traffic
Single Link with FIFO Service
Best Effort Service for Standard Data Traffic Yes N/A N/A Yes Yes
iscalledtheutilizationfactor
Describestheloadingofaqueue
Inanunstablesystempacketsaccumulateinvariousqueues
and/orgetdropped
Forunstablesystemswithlargebufferssomepacketdelays
becomeverylarge
Flow/admissioncontrolmaybeusedtolimitthepacketarrivalrate
Prioritizationofflowskeepsdelaysboundedfortheimportanttraffic
Stablesystemswithtimestationaryarrivaltrafficapproacha
steadystate
Copyright 2002 OPNET Technologies, Inc. 9
Traffic Behavior and Queuing in a QoS Environment
Littles Law
Foragivenarrivalrate,thetimeinthesystemisproportional
topacketoccupancy
N=T
where
N:average#ofpacketsinthesystem
:packetarrivalrate(packetsperunittime)
T:averagedelay(timeinthesystem)perpacket
Examples:
Onrainydays,streetsandhighwaysaremorecrowded
Fastfoodrestaurantsneedasmallerdiningroomthanregular
restaurantswiththesamecustomerarrivalrate
Largebufferingtogetherwithlargearrivalratecauselargedelays
RegularTraffic
Departure
Arrival
T
2
4
3
1 ime Times
Times
Irregularbut
SpacedApartTraffic
Queuing
Time
4
3
2
1 Delays
BurstyTraffic
Burstiness Example
Different Burstiness Levels at Same Packet Rate
Source: Fei Xue and S. J. Ben Yoo, UCDavis, On the Generation and Shaping Self-similar Traffic in Optical Packet-switched Networks, OPNETWORK 2002
Copyright 2002 OPNET Technologies, Inc. 14
Traffic Behavior and Queuing in a QoS Environment
Time
QueuingDelays
Regulararrivals,irregularpacketlengths
Astheworkarrivalrate:
(packetarrivalrate*packetlength)
increases,theopportunityforinterferenceincreases
Bottlenecks
Typesofbottlenecks
Ataccesspoints(flowcontrol,prioritization,QoSenforcementneeded)
Atpointswithinthenetworkcore
Isolated(canbeanalyzedinisolation)
Interrelated(networkorchainanalysisneeded)
Bottlenecksresultfromoverloadscausedby:
Highloadsessions,or
Convergenceofsufficientnumberofmoderateloadsessionsatthe
samequeue
Time
Thedeparturetrafficfromabottleneckismoreregularthanthe
arrivaltraffic
Theinterdeparturetimebetweentwopacketsisatleastas
largeasthetransmissiontimeofthe2ndpacket
Exponential
interarrivals
gap
Bottleneck
90%utilization
Incomingtraffic Outgoingtraffic
Small
Medium
Bottleneck
90%utilization
Large
Packet Trains
Interdeparturetimesforsmallpackets
#ofpackets
Variablepacketsizes
Peakssmeared
Constantpacketsizes
sec
Outline
Basicconcepts
Sourcemodels
Poissontraffic
Batcharrivals
Exampleapplicationsvoice,video,filetransfer
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)
Interarrivaltimesareindependentand
exponentiallydistributed
Modelswelltheaccumulatedtrafficofmany
independentsources
Theaverageinterarrivaltimeis1/
(secs/packet),soisthearrivalrate
(packets/sec)
Interarrival
Time Times
Batch Arrivals
Somesourcestransmitinpacketbursts
Maybebettermodeledbyabatcharrivalprocess(e.g.,bursts
ofpacketsarrivingaccordingtoaPoissonprocess)
Thecaseforabatchmodelisweakeratqueuesafterthefirst,
becauseofshaping
Interarrival
Time Times
OFF ON
Extension:Modelswithmorethantwostates
Source Types
Voicesources
Videosources
Filetransfers
Webtraffic
Interactivetraffic
DifferentapplicationtypeshavedifferentQoSrequirements,
e.g.,delay,jitter,loss,throughput,etc.
Diagram Source: Mark W. Garrett and Walter Willinger, Analysis, Modeling, and Generation of Self-Similar VBR Video Traffic, BELLCORE, 1994
Copyright 2002 OPNET Technologies, Inc. 30
Traffic Behavior and Queuing in a QoS Environment
Outline
Basicconcepts
Sourcemodels
Servicemodels
Singlevs.multipleservers
FIFO,priority,andsharedservers
Demo
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)
Arrivals
Transmission
Line
FIFO Queue
PacketsareplacedonoutboundlinktoegressdeviceinFIFOorder
Device(router,switch)multiplexesdifferentflowsarrivingonvariousingress
portsontoanoutputbufferformingaFIFOqueue
Multiple Servers
Multiplepacketsaretransmittedsimultaneouslyonmultiple
lines/servers
Headofthelineservice:packetswaitinaFIFOqueue,and
whenaserverbecomesfree,thefirstpacketgoesintoservice
Arrivals
Transmission
Lines
Priority Servers
Packetsformpriorityclasses(eachmayhaveseveralflows)
ThereisaseparateFIFOqueueforeachpriorityclass
Packetsoflowerprioritystarttransmissiononlyifnohigher
prioritypacketiswaiting
Prioritytypes:
Nonpreemptive(highprioritypacketmustwaitforalowerpriority
packetfoundundertransmissionuponarrival)
Preemptive(highprioritypacketdoesnothavetowait)
Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Interm.
High
Low
Line
Priority
Priority
Priority
Priority Queuing
Packetsareclassifiedintoseparatequeues
E.g.,basedonsource/destinationIPaddress,source/destinationTCPport,etc.
Allpacketsinahigherpriorityqueueareservedbeforealowerpriority
queueisserved
Typicallyinrouters,ifahigherprioritypacketarriveswhilealowerpriority
packetisbeingtransmitted,itwaitsuntilthelowerprioritypacketcompletes
Shared Servers
Againwehavemultipleclasses/queues,buttheyareserved
withasoftpriorityscheme
Roundrobin
Weightedfairqueuing
Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Weight
Weight
Line
Weight 1031
Round-Robin/Cyclic Service
Roundrobinserveseachqueueinsequence
Aqueuethatisemptyisskipped
Eachqueuewhenservedmayhavelimitedservice(atmostkpackets
transmittedwithk=1ork>1)
Roundrobinisfairforallqueues(aslongassomequeuesdo
nothavelongerpacketsthanothers)
Roundrobincannotbeusedtoenforcebandwidthallocation
amongthequeues.
Fair Queuing
Thisschedulingmethodisinspiredbythemostfairofmethods:
Transmitonebitfromeachqueueincyclicorder(bitbybitroundrobin)
Skipqueuesthatareempty
Toapproximatethebitbybitprocessingbehavior,foreachpacket
Wecalculateuponarrivalitsfinishtimeunderbitbybitroundrobin
assumingallotherqueuesarecontinuouslybusy,andwetransmitbyFIFO
withineachqueue
Transmitnextthepacketwiththeminimumfinishtime
Importantproperties:
Priorityisgiventoshortpackets
Equalbandwidthisallocatedtoallqueuesthatarecontinuouslybusy
i-1
iDeparture
-1
Finish
Arrival Time
timestimes
of Packet i
Demo: FIFO
FIFO
Bottleneck
90%utilization
PQ
Bottleneck
90%utilization
PQFTP
FIFO
PQVideo
WFQ
Bottleneck
90%utilization
PQFTP
WFQFTP
FIFO
WFQ/PQVideo
Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
M/M/1M/M/m/k
M/G/1G/G/1
Demo:Analyticsvs.simulation
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)
M/M/1 System
Nomenclature:MstandsforMemoryless(apropertyofthe
exponentialdistribution)
M/M/1standsforPoissonarrivalprocess(whichismemoryless)
M/M/1standsforexponentiallydistributedtransmissiontimes
Assumptions:
ArrivalprocessisPoissonwithratepackets/sec
Packettransmissiontimesareexponentiallydistributedwithmean1/
Oneserver
Independentinterarrivaltimesandpackettransmissiontimes
Transmissiontimeisproportionaltopacketlength
Note1/issecs/packetsoispackets/sec(packet
transmissionrateofthequeue)
Utilizationfactor:=/stablesystemif1)
Copyright 2002 OPNET Technologies, Inc. 52
Traffic Behavior and Queuing in a QoS Environment
Delay Calculation
Let
Q=Averagetimespentwaitinginqueue
T=Averagepacketdelay(transmissionplusqueuing)
NotethatT=1/+Q
AlsobyLittleslaw
N=TandNq=Q
where
Nq=Averagenumberwaitinginqueue
Thesequantitiescanbecalculatedwithformulasderivedby
Markovchainanalysis(seereferences)
M/M/1 Results
Theanalysisgivesthesteadystateprobabilitiesof
numberofpacketsinqueueortransmission
P{npackets}=n(1)where=/
Fromthiswecangettheaverages:
N=/(1)
T=N/=/(1)=1/()
N
T
1/
1
0
M/G/1 System
SameasM/M/1butthepackettransmissiontime
distributionisgeneral,withgivenmean1/and
variance2
Utilizationfactor=/
PollaczekKinchineformulafor
Averagetimeinqueue=(2+1/2)/2(1)
Averagedelay=1/+(2+1/2)/2(1)
Theformulasforthesteadystateoccupancy
probabilitiesaremorecomplicated
Insight:As2increases,delayincreases
G/G/1 System
SameasM/G/1butnowthepacketinterarrivaltime
distributionisalsogeneral,withmeanand
variance2
WestillassumeFIFOandindependentinterarrival
timesandpackettransmissiontimes
Heavytrafficapproximation:
Averagetimeinqueue~(2+2)/2(1)
Becomesincreasinglyaccurateas
Demo: M/G/1
Packetinterarrivaltimes Capacity
exponential(0.02)sec 1Mbps
Packetsize
1250bytes Packetsizedistribution:
(10000bits) exponential
constant
lognormal
Whatistheaveragedelayandqueuesize?
PacketSize
DelayT(sec) QueueSize(packets)
Distribution
Exponential
mean=10000 0.02 1.0
variance =1.0*108
Constant
mean=10000 0.015 0.75
variance=N/A
Lognormal
mean=10000 0.06 3.0
variance=9.0*108
Video
constantpacketinterarrivals
Http
burstytraffic
Delay
PKformula
Simulation
Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Preemptivevs.nonpreemptive
Cyclic,WFQ,PQsystems
Demo:Simulationresults
Networksofqueues
Hybridsimulation(demo)
Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Interm.
High
Low
Line
Priority
Priority
Priority
Transmission
Class 3
2
1
Arrivals
Line
Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
ViolationofM/M/.assumptions
Effectsondelaysandtrafficshaping
Analyticalapproximations
Hybridsimulation(demo)
Exponential
interarrivals
Bottleneck Bottleneck
Noqueuingdelay
Delay
Approximations
Kleinrockindependenceapproximation
Performadelaycalculationineachqueueindependentlyofother
queues
Addtheresults(includingpropagationdelay)
Note:Intheprecedingexample,theKleinrockindependence
approximationoverestimatesthequeuingdelayby100%
Tendstobemoreaccurateinnetworkswithlotsoftraffic
mixing,e.g.,nodesservingmanyrelativelysmallflowsfrom
severaldifferentlocations
Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation
Explicitvs.aggregatedtraffic
ConceptualFramework
Demo:PQandWFQwithaggregatedtraffic
Explicit Traffic
Modeledindetail,includingtheeffectsofvariousprotocols
Eachpacketsarrivalanddeparturetimesarerecorded(together
withotherdataofinterest,e.g.,loss,etc.)alongeachlinkthatit
traverses
Departuretimesatalinkarethearrivaltimesatthenextlink(plus
propagationdelay)
Objective:Ateachlink,giventhearrivaltimes(andthepacket
lengths),determinethedeparturetimes
.. .
Departure
Arrival
Time
a
d
Delay
1
4
2
3 times
times
at aatlink
the link
Aggregated Traffic
Simplifiedmodeling
Wedontkeeptrackofindividualpackets,onlyworkloadcounts
(numberofpacketsorbytes)
Wegenerateworkloadcounts
byprobabilistic/analyticalmodeling,or
bysimplifiedsimulation
Aggregated(orbackground)trafficislocal(perlink)
Shapingeffectsarecomplextoincorporate
Somedependencesbetweenexplicitandbackgroundtraffic
alongachainoflinksarecomplicatedandareignored
aK wK a K+1 w K+1
Time
Background Background
Explicit Explicit
d K = aK + wK + sK
DEPARTURE TIMES 77
Copyright 2002 OPNET Technologies, Inc.
Traffic Behavior and Queuing in a QoS Environment
a1 w1 a2 w2 a3 w
. . .
3
.. . Time
d1 = a1 + w1 + s1 d2 = a2 + w2 + s2 d3 = a3 + w3 + s3
Departure times
Note:wk+1consistsofwkandtwomoreterms:
Backgroundarrivalsinintervalak+1ak
(Minus)transmittedworkloadinintervalak+1ak
Mustcalculate/simulatethetwoterms
Thefirsttermissimulatedbasedonthetrafficdescriptorofthebackgroundtraffic
Thesecondtermiseasilycalculatedifthequeueiscontinuouslybusyinak+1ak
Copyright 2002 OPNET Technologies, Inc. 79
Traffic Behavior and Queuing in a QoS Environment
a k w k a k+1 w k+1
.. . Time
dk d k+1
Copyright 2002 OPNET Technologies, Inc. 80
Traffic Behavior and Queuing in a QoS Environment
Longintervalak+1ak(i.e.,ak+1>dk)
Queuemaybeidleduringportionsoftheintervala k+1ak
Needtogenerate/simulate
Thenewarrivalsinak+1ak
Thelengthsofthebusyperiodsandtheidleperiods
Canbedonebysamplingthebackgroundarrivaldistributionineachbusy
period
.. .
Time
Long
a
w
d
Idle
Busy
kk+1 Periods
Periods
Interval
k Otheralternativesarepossible
k+1
Handlescomplexqueuingsystems
Micropacketsaregeneratedtorepresenttrafficloadwithinthecontext
ofthequeueonly(i.e.,theyarenottransmittedtoanyexternallinks)
Forlongintervals,whereconvergencetoasteadystateislikely
Trytodetectconvergenceduringthemicrosim
Estimatesteadystatequeuelengthdistribution
Samplethesteadystatedistributiontoestimatewk+1
Microsimspeedsupthesimulationwithoutsacrificing
accuracy
Microsimprovidesageneralframework
Appliestononstationarybackgroundtraffic
AppliestononFIFOservicemodels(withpropermodification)
Examples of Applications
Analytical Modeling Discrete-Event Simulation
Hybrid DES
M/G/./. & M/G/./. & Decomposition
Analysis Scenarios with Explicit
G/G/./. G/G/./. with Kleinrock DES only with
and
FIFO Priority Independence Explicit Traffic
Background
Analysis Analysis Assumption
Traffic
Single Link with FIFO Service
Best Effort Service for Standard Data Traffic Yes N/A N/A Yes Yes
Trafficmodeledas
1)Explicittraffic
2)Backgroundtraffic
Copyright 2002 OPNET Technologies, Inc. 85
Traffic Behavior and Queuing in a QoS Environment
Targetflow:SeattleHoustonmodeledusingexplicittraffic
VaryingitsTypeofService(ToS)
BestEffort(0)
StreamingMultimedia(4)
Copyright 2002 OPNET Technologies, Inc. 86
Traffic Behavior and Queuing in a QoS Environment
Totaltrafficvolume
500Mbps
Timemodeled
35minutes
Simulationduration
31hours
Totaltrafficvolume
500Mbps
Timemodeled
35minutes
Simulationduration
14minutes
References
Networking
BertsekasandGallager,DataNetworks,PrenticeHall,1992
DeviceQueuingImplementations
Vegesna,IPQualityofService,Ciscopress.com,2001
http://www.juniper.net/techcenter/techpapers/200020.pdf
ProbabilityandQueuingModels
BertsekasandTsitsiklis,IntroductiontoProbability,AthenaScientific,2002,
http://www.athenasc.com/probbook.html
Cohen,TheSingleServerQueue,NorthHolland,1992
Takagi,QueuingAnalysis:AFoundationofPerformanceEvaluation.(3
Volumes),NorthHolland,1991
GrossandHarris,FundamentalsofQueuingTheory,Wiley,1985
Cooper,IntroductiontoQueuingTheory,CEEPress,1981
OPNETHybridSimulationandMicroSimulation
SeeCaseStudiespapersin
http://secure.opnet.com/services/muc/mtdlogis_cse_stdies_81.html