Professional Documents
Culture Documents
OPNET Full Presentation
OPNET Full Presentation
OPNET Full Presentation
Session 1813
Traffic Behavior and
Queuing in a QoS
Environment
NetworkingTutorials
Prof.DimitriP.Bertsekas
DepartmentofElectricalEngineering
M.I.T.
Copyright 2002 OPNET Technologies, Inc.
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
with Explicit
DES only with
and
Explicit Traffic
Background
Traffic
M/G/./. &
G/G/./.
FIFO
Analysis
M/G/./. &
G/G/./.
Priority
Analysis
Decomposition
with Kleinrock
Independence
Assumption
Yes
N/A
N/A
Yes
Yes
Yes
N/A
N/A
Yes
Yes
Yes
N/A
N/A
Yes
Yes
N/A
Yes (loss of
accuracy)
N/A
Yes
Yes
N/A
Highly
approximate
N/A
Yes
Yes
N/A
Hop-by-hop
Analysis (loss
of accuacy)
N/A
Hop-by-hop
Analysis (loss
of accuacy)
Analysis Scenarios
Network of Queues
N/A
Queuingsystem
Datanetworkwherepacketsarrive,waitinvariousqueues,receive
serviceatvariouspoints,andexitaftersometime
Arrivalrate
Longtermnumberofarrivalsperunittime
Occupancy
Numberofpacketsinthesystem(averagedoveralongtime)
Timeinthesystem(delay)
Timefrompacketentrytoexit(averagedovermanypackets)
Forasinglequeue,theratio
packet arrival rate / system transmission capacity
iscalledtheutilizationfactor
Describestheloadingofaqueue
Inanunstablesystempacketsaccumulateinvariousqueues
and/orgetdropped
Forunstablesystemswithlargebufferssomepacketdelays
becomeverylarge
Flow/admissioncontrolmaybeusedtolimitthepacketarrivalrate
Prioritizationofflowskeepsdelaysboundedfortheimportanttraffic
Stablesystemswithtimestationaryarrivaltrafficapproacha
steadystate
Copyright 2002 OPNET Technologies, Inc.
Littles Law
Foragivenarrivalrate,thetimeinthesystemisproportional
topacketoccupancy
N=T
where
N:average#ofpacketsinthesystem
:packetarrivalrate(packetsperunittime)
T:averagedelay(timeinthesystem)perpacket
Examples:
Onrainydays,streetsandhighwaysaremorecrowded
Fastfoodrestaurantsneedasmallerdiningroomthanregular
restaurantswiththesamecustomerarrivalrate
Largebufferingtogetherwithlargearrivalratecauselargedelays
Copyright 2002 OPNET Technologies, Inc.
10
11
Times
RegularTraffic
T
2
4
3
1
ime Times
Arrival
Departure
Times
Irregularbut
SpacedApartTraffic
12
13
Burstiness Example
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
QueuingDelays
Regulararrivals,irregularpacketlengths
15
QueuingDelays
Astheworkarrivalrate:
(packetarrivalrate*packetlength)
increases,theopportunityforinterferenceincreases
Copyright 2002 OPNET Technologies, Inc.
16
Bottlenecks
Typesofbottlenecks
Ataccesspoints(flowcontrol,prioritization,QoSenforcementneeded)
Atpointswithinthenetworkcore
Isolated(canbeanalyzedinisolation)
Interrelated(networkorchainanalysisneeded)
Bottlenecksresultfromoverloadscausedby:
Highloadsessions,or
Convergenceofsufficientnumberofmoderateloadsessionsatthe
samequeue
17
Time
Thedeparturetrafficfromabottleneckismoreregularthanthe
arrivaltraffic
Theinterdeparturetimebetweentwopacketsisatleastas
largeasthetransmissiontimeofthe2ndpacket
Copyright 2002 OPNET Technologies, Inc.
18
Outgoingtraffic
Exponential
interarrivals
gap
Bottleneck
90%utilization
Copyright 2002 OPNET Technologies, Inc.
19
Incomingtraffic
Outgoingtraffic
Small
Medium
Bottleneck
90%utilization
Large
Copyright 2002 OPNET Technologies, Inc.
20
Packet Trains
Interdeparturetimesforsmallpackets
21
Variablepacket
Peakssmeared
sizes
Constantpacketsizes
sec
22
Outline
Basicconcepts
Sourcemodels
Poissontraffic
Batcharrivals
Exampleapplicationsvoice,video,filetransfer
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)
23
Times
24
Batch Arrivals
Somesourcestransmitinpacketbursts
Maybebettermodeledbyabatcharrivalprocess(e.g.,bursts
ofpacketsarrivingaccordingtoaPoissonprocess)
Thecaseforabatchmodelisweakeratqueuesafterthefirst,
becauseofshaping
Time
Interarrival
Times
25
State 1
OFF
ON
Extension:Modelswithmorethantwostates
26
Source Types
Voicesources
Videosources
Filetransfers
Webtraffic
Interactivetraffic
DifferentapplicationtypeshavedifferentQoSrequirements,
e.g.,delay,jitter,loss,throughput,etc.
27
Video
Interactive
FTP
telnet
web
QoS
Requirements
Model
*Alternatingtalk
spurtsandsilence
intervals.
*Talkspurtsproduce
constantpacketrate
traffic
Delay<~150ms
Jitter<~30ms
Packetloss<~1%
*Twostate(onoff)Markov
ModulatedRateProcess(MMRP)
*Exponentiallydistributedtimeat
eachstate
*Highlyburstytraffic
(whenencoded)
*Longrange
dependencies
Delay<~400ms
Jitter<~30ms
Kstate(onoff)MarkovModulated
RateProcess(MMRP)
*Poissontype
*Sometimesbatch
arrivals,orbursty,
orsometimesonoff
Zeroornearsero
packetloss
Delaymaybe
important
Packetloss<~1%
Poisson,Poissonwithbatcharrivals,
TwostateMMRP
28
29
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
Outline
Basicconcepts
Sourcemodels
Servicemodels
Singlevs.multipleservers
FIFO,priority,andsharedservers
Demo
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)
31
FIFO:FirstInFirstOut
PQ:PriorityQueuing
WFQ:WeightedFairQueuing
Combinationsoftheabove
Servicetypesfromaqueuingtheorystandpoint
Singleserver(onequeueonetransmissionline)
Multipleserver(onequeueseveraltransmissionlines)
Priorityserver(severalqueueswithhardprioritiesonetransmission
line)
Sharedserver(severalqueueswithsoftprioritiesonetransmission
line)
32
Packetsarrivingtoafullbufferaredropped
Arrivals
Transmission
Line
33
FIFO Queue
PacketsareplacedonoutboundlinktoegressdeviceinFIFOorder
Device(router,switch)multiplexesdifferentflowsarrivingonvariousingress
portsontoanoutputbufferformingaFIFOqueue
34
Multiple Servers
Multiplepacketsaretransmittedsimultaneouslyonmultiple
lines/servers
Headofthelineservice:packetswaitinaFIFOqueue,and
whenaserverbecomesfree,thefirstpacketgoesintoservice
Arrivals
Transmission
Lines
35
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
36
Priority Queuing
Packetsareclassifiedintoseparatequeues
E.g.,basedonsource/destinationIPaddress,source/destinationTCPport,etc.
Allpacketsinahigherpriorityqueueareservedbeforealowerpriority
queueisserved
Typicallyinrouters,ifahigherprioritypacketarriveswhilealowerpriority
packetisbeingtransmitted,itwaitsuntilthelowerprioritypacketcompletes
37
Shared Servers
Againwehavemultipleclasses/queues,buttheyareserved
withasoftpriorityscheme
Roundrobin
Weightedfairqueuing
Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Weight
Weight
Line
Weight
10
31
38
Round-Robin/Cyclic Service
Roundrobinserveseachqueueinsequence
Aqueuethatisemptyisskipped
Eachqueuewhenservedmayhavelimitedservice(atmostkpackets
transmittedwithk=1ork>1)
Roundrobinisfairforallqueues(aslongassomequeuesdo
nothavelongerpacketsthanothers)
Roundrobincannotbeusedtoenforcebandwidthallocation
amongthequeues.
39
Fair Queuing
Thisschedulingmethodisinspiredbythemostfairofmethods:
Transmitonebitfromeachqueueincyclicorder(bitbybitroundrobin)
Skipqueuesthatareempty
Toapproximatethebitbybitprocessingbehavior,foreachpacket
Wecalculateuponarrivalitsfinishtimeunderbitbybitroundrobin
assumingallotherqueuesarecontinuouslybusy,andwetransmitbyFIFO
withineachqueue
Transmitnextthepacketwiththeminimumfinishtime
Importantproperties:
Priorityisgiventoshortpackets
Equalbandwidthisallocatedtoallqueuesthatarecontinuouslybusy
Finish
Arrival
i-1
iDeparture
-1
Time
times
times
of Packet i
40
Fairqueuingcorrespondstowk=1
Priorityqueuingcorrespondstotheweightsbeingveryhighaswemoveto
higherpriorities
Again,todealwiththesegmentationproblem,weapproximateasfollows:
Foreachpacket:
Wecalculateitsfinishtime(undertheweightedbitbybitroundrobin
scheme)
Wenexttransmitthepacketwiththeminimumfinishtime
Copyright 2002 OPNET Technologies, Inc.
41
42
Examplevoice(PQ),guaranteedb/w(WFQ),BestEffort
(CiscosLLQimplementation)
43
Demo: FIFO
FIFO
Bottleneck
90%utilization
44
FTP
packet loss
45
PQ
Bottleneck
90%utilization
46
PQFTP
FIFO
PQVideo
47
WFQ
Bottleneck
90%utilization
48
PQFTP
WFQFTP
FIFO
WFQ/PQVideo
49
50
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)
51
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
Delay Calculation
Let
Q=Averagetimespentwaitinginqueue
T=Averagepacketdelay(transmissionplusqueuing)
NotethatT=1/+Q
AlsobyLittleslaw
N=TandNq=Q
where
Nq=Averagenumberwaitinginqueue
Thesequantitiescanbecalculatedwithformulasderivedby
Markovchainanalysis(seereferences)
53
M/M/1 Results
Theanalysisgivesthesteadystateprobabilitiesof
numberofpacketsinqueueortransmission
P{npackets}=n(1)where=/
Fromthiswecangettheaverages:
N=/(1)
T=N/=/(1)=1/()
1
0
1/m
m
N
T
54
=/
Queuesizesstayatthesamelevel(staysthesame)
Packetdelayiscutinhalf(andaredoubled
Aconclusion:Inhighspeednetworks
propagationdelayincreasesinimportancerelativetodelay
buffersizeandpacketlossmaystillbeaproblem
Copyright 2002 OPNET Technologies, Inc.
55
Thereareanalyticalformulasfortheoccupancy
probabilitiesandaveragedelayofthesesystems
56
Formulasforaveragedelay,steadystateoccupancy
probabilities,andlossprobability
TheM/M/m/msystemisusedwidelytosize
telephoneorcircuitswitchingsystems
57
58
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
Copyright 2002 OPNET Technologies, Inc.
59
G/G/1 System
SameasM/G/1butnowthepacketinterarrivaltime
distributionisalsogeneral,withmeanand
variance2
WestillassumeFIFOandindependentinterarrival
timesandpackettransmissiontimes
Heavytrafficapproximation:
Averagetimeinqueue~(2+2)/2(1)
Becomesincreasinglyaccurateas
60
Demo: M/G/1
Packetinterarrivaltimes
exponential(0.02)sec
Packetsize
1250bytes
(10000bits)
Capacity
1Mbps
Packetsizedistribution:
exponential
constant
lognormal
Whatistheaveragedelayandqueuesize?
Copyright 2002 OPNET Technologies, Inc.
61
DelayT(sec)
QueueSize(packets)
Exponential
mean=10000
variance =1.0*108
0.02
1.0
Constant
mean=10000
variance=N/A
0.015
0.75
Lognormal
mean=10000
variance=9.0*108
0.06
3.0
62
AverageQueueSize(packets)
63
Video
constantpacketinterarrivals
Http
burstytraffic
Delay
PKformula
Simulation
Copyright 2002 OPNET Technologies, Inc.
64
Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Preemptivevs.nonpreemptive
Cyclic,WFQ,PQsystems
Demo:Simulationresults
Networksofqueues
Hybridsimulation(demo)
65
66
67
68
Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
ViolationofM/M/.assumptions
Effectsondelaysandtrafficshaping
Analyticalapproximations
Hybridsimulation(demo)
69
70
Bottleneck
Delay
Bottleneck
Noqueuing
delay
71
Approximations
Kleinrockindependenceapproximation
Performadelaycalculationineachqueueindependentlyofother
queues
Addtheresults(includingpropagationdelay)
Note:Intheprecedingexample,theKleinrockindependence
approximationoverestimatesthequeuingdelayby100%
Tendstobemoreaccurateinnetworkswithlotsoftraffic
mixing,e.g.,nodesservingmanyrelativelysmallflowsfrom
severaldifferentlocations
72
Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation
Explicitvs.aggregatedtraffic
ConceptualFramework
Demo:PQandWFQwithaggregatedtraffic
73
Theinteractionofexplicitandbackgroundismodeledeither
analyticallyorthroughafastsimulation(oracombination)
Explicit
Background
74
Explicit Traffic
Modeledindetail,includingtheeffectsofvariousprotocols
Eachpacketsarrivalanddeparturetimesarerecorded(together
withotherdataofinterest,e.g.,loss,etc.)alongeachlinkthatit
traverses
Departuretimesatalinkarethearrivaltimesatthenextlink(plus
propagationdelay)
Objective:Ateachlink,giventhearrivaltimes(andthepacket
lengths),determinethedeparturetimes
.. .
Time
a
d
Delay
Departure
Arrival
times
times
at aatlink
the link
1
4
2
3
75
Aggregated Traffic
Simplifiedmodeling
Wedontkeeptrackofindividualpackets,onlyworkloadcounts
(numberofpacketsorbytes)
Wegenerateworkloadcounts
byprobabilistic/analyticalmodeling,or
bysimplifiedsimulation
Aggregated(orbackground)trafficislocal(perlink)
Shapingeffectsarecomplextoincorporate
Somedependencesbetweenexplicitandbackgroundtraffic
alongachainoflinksarecomplicatedandareignored
76
Explicit
aK
wK
Explicit
a K+1
w K+1
Time
Background
Explicit
Background
Explicit
d K = aK + wK + sK
Copyright 2002 OPNET Technologies, Inc.
DEPARTURE TIMES
77
Trafficvolumeinformation(e.g.,packets/sec,bits/sec)
Probabilitydistributionofinterarrivaltimes
Probabilitydistributionofpacketlengths
Timeintervalofvalidityofthedescriptor
Generatewkusingoneofseveralideasandcombinations
thereof
Successivesampling(forFIFOcase)
Steadystatequeuelengthdistribution(ifwecangetit)
Simplifiedsimulation(microsimappliestocomplexqueuing
disciplines)
78
w1
a2
w2
d1 = a1 + w1 + s1
a3
.
.
.
w
3
d2 = a2 + w2 + s2
.. .
Time
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
Short Interval
a k w k a k+1 w k+1
.. .
dk
Copyright 2002 OPNET Technologies, Inc.
Time
d k+1
80
Canbedonebysamplingthebackgroundarrivaldistributionineachbusy
period
Time
Long
a
w
d
Idle
Busy
Periods
Periods
Interval
k Otheralternativesarepossible
k+1
kk+1
.. .
81
82
Microsimspeedsupthesimulationwithoutsacrificing
accuracy
Microsimprovidesageneralframework
Appliestononstationarybackgroundtraffic
AppliestononFIFOservicemodels(withpropermodification)
83
Examples of Applications
Analytical Modeling
Discrete-Event Simulation
Hybrid DES
with Explicit
DES only with
and
Explicit Traffic
Background
Traffic
M/G/./. &
G/G/./.
FIFO
Analysis
M/G/./. &
G/G/./.
Priority
Analysis
Decomposition
with Kleinrock
Independence
Assumption
Yes
N/A
N/A
Yes
Yes
Yes
N/A
N/A
Yes
Yes
Yes
N/A
N/A
Yes
Yes
N/A
Yes (loss of
accuracy)
N/A
Yes
Yes
N/A
Highly
approximate
N/A
Yes
Yes
N/A
Hop-by-hop
Analysis (loss
of accuacy)
N/A
Hop-by-hop
Analysis (loss
of accuacy)
Analysis Scenarios
Network of Queues
N/A
84
Trafficmodeledas
1)Explicittraffic
2)Backgroundtraffic
Copyright 2002 OPNET Technologies, Inc.
85
Targetflow:SeattleHoustonmodeledusingexplicittraffic
VaryingitsTypeofService(ToS)
BestEffort(0)
StreamingMultimedia(4)
Copyright 2002 OPNET Technologies, Inc.
86
Timemodeled
35minutes
Simulationduration
31hours
87
Timemodeled
35minutes
Simulationduration
14minutes
88
89
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
Copyright 2002 OPNET Technologies, Inc.
90