Вы находитесь на странице: 1из 90

Traffic Behavior and Queuing in a QoS Environment

Session 1813
Traffic Behavior and
Queuing in a QoS
Environment
NetworkingTutorials

Prof.DimitriP.Bertsekas
DepartmentofElectricalEngineering
M.I.T.

Copyright 2002 OPNET Technologies, Inc. 1


Traffic Behavior and Queuing in a QoS Environment

Objectives
Providesomebasicunderstandingofqueuingphenomena
Explaintheavailablesolutionapproachesandassociated
tradeoffs
Giveguidelinesonhowtomatchapplicationsandsolutions

Copyright 2002 OPNET Technologies, Inc. 2


Traffic Behavior and Queuing in a QoS Environment

Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)

Copyright 2002 OPNET Technologies, Inc. 3


Traffic Behavior and Queuing in a QoS Environment

Outline
Basicconcepts
Performancemeasures
Solutionmethodologies
Queuingsystemconcepts
Stabilityandsteadystate
Causesofdelayandbottlenecks
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)

Copyright 2002 OPNET Technologies, Inc. 4


Traffic Behavior and Queuing in a QoS Environment

Performance Measures
Delay
Delayvariation(jitter)
Packetloss
Efficientsharingofbandwidth
Relativeimportancedependsontraffictype(audio/video,
filetransfer,interactive)
Challenge:Provideadequateperformancefor(possibly)
heterogeneoustraffic

Copyright 2002 OPNET Technologies, Inc. 5


Traffic Behavior and Queuing in a QoS Environment

Solution Methodologies
Analyticalresults(formulas)
Pros:Quickanswers,insight
Cons:Ofteninaccurateorinapplicable
Explicitsimulation
Pros:Accurateandrealisticmodels,broadapplicability
Cons:Canbeslow
Hybridsimulation
Intermediatesolutionapproach
Combinesadvantagesanddisadvantagesofanalysisandsimulation

Copyright 2002 OPNET Technologies, Inc. 6


Traffic Behavior and Queuing in a QoS Environment

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

Best Effort Service for LRD/Self-Similar


Yes N/A N/A Yes Yes
Behavior Traffic
"Chancing It" with Best Effort Service for
Yes N/A N/A Yes Yes
Voice, Video and Data
Single Link with QoS-Based Queueing
Using QoS to differentiate service levels for Yes (loss of
N/A N/A Yes Yes
the same type of traffic accuracy)
Using QoS to support different requirements
for different application types given as a Highly
N/A N/A Yes Yes
detailed study of setting Cisco Router approximate
queueing parameters
Network of Queues
Hop-by-hop Yes (some loss of Yes (Run time a Yes [Fast with
General network model extending the
N/A Analysis (loss accuracy - e.g., traffic function of network minimal loss of
previous QoS queueing model
of accuacy) shaping) complexity) accuracy]

Hop-by-hop Yes (Run time a Yes [Fast with


Reduction of the general model to a
N/A Analysis (loss N/A function of network minimal loss of
representative end-to-end path
of accuacy) complexity) accuracy]

Copyright 2002 OPNET Technologies, Inc. 7


Traffic Behavior and Queuing in a QoS Environment

Queuing System Concepts:


Arrival Rate, Occupancy, Time in the
System
Queuingsystem
Datanetworkwherepacketsarrive,waitinvariousqueues,receive
serviceatvariouspoints,andexitaftersometime
Arrivalrate
Longtermnumberofarrivalsperunittime
Occupancy
Numberofpacketsinthesystem(averagedoveralongtime)
Timeinthesystem(delay)
Timefrompacketentrytoexit(averagedovermanypackets)

Copyright 2002 OPNET Technologies, Inc. 8


Traffic Behavior and Queuing in a QoS Environment

Stability and Steady-State


Asinglequeuesystemisstableif
packet arrival rate < system transmission capacity
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. 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

Copyright 2002 OPNET Technologies, Inc. 10


Traffic Behavior and Queuing in a QoS Environment

Explanation of Littles Law


Amusementparkanalogy:peoplearrive,spendtimeat
varioussites,andleave
Theypay$1perunittimeinthepark
Therateatwhichtheparkearnsis$Nperunittime(N:
average#ofpeopleinthepark)
Therateatwhichpeoplepayis$Tperunittime(:traffic
arrivalrate,T:timeperperson)
Overalonghorizon:
Rateofparkearnings=Rateofpeoplespayment
or
N=T

Copyright 2002 OPNET Technologies, Inc. 11


Traffic Behavior and Queuing in a QoS Environment

Delay is Caused by Packet Interference


Ifarrivalsareregularorsufficientlyspacedapart,noqueuing
delayoccurs
Departure
Arrival
T
2
4
3
1 ime Times
Times

RegularTraffic

Departure
Arrival
T
2
4
3
1 ime Times
Times

Irregularbut
SpacedApartTraffic

Copyright 2002 OPNET Technologies, Inc. 12


Traffic Behavior and Queuing in a QoS Environment

Burstiness Causes Interference


Notethatthedeparturesarelessbursty

Queuing
Time
4
3
2
1 Delays
BurstyTraffic

Copyright 2002 OPNET Technologies, Inc. 13


Traffic Behavior and Queuing in a QoS Environment

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

Packet Length Variation Causes


Interference

Time
QueuingDelays

Regulararrivals,irregularpacketlengths

Copyright 2002 OPNET Technologies, Inc. 15


Traffic Behavior and Queuing in a QoS Environment

High Utilization Exacerbates Interference


Time
QueuingDelays

Astheworkarrivalrate:
(packetarrivalrate*packetlength)
increases,theopportunityforinterferenceincreases

Copyright 2002 OPNET Technologies, Inc. 16


Traffic Behavior and Queuing in a QoS Environment

Bottlenecks
Typesofbottlenecks
Ataccesspoints(flowcontrol,prioritization,QoSenforcementneeded)
Atpointswithinthenetworkcore
Isolated(canbeanalyzedinisolation)
Interrelated(networkorchainanalysisneeded)
Bottlenecksresultfromoverloadscausedby:
Highloadsessions,or
Convergenceofsufficientnumberofmoderateloadsessionsatthe
samequeue

Copyright 2002 OPNET Technologies, Inc. 17


Traffic Behavior and Queuing in a QoS Environment

Bottlenecks Cause Shaping

Time

Thedeparturetrafficfromabottleneckismoreregularthanthe
arrivaltraffic
Theinterdeparturetimebetweentwopacketsisatleastas
largeasthetransmissiontimeofthe2ndpacket

Copyright 2002 OPNET Technologies, Inc. 18


Traffic Behavior and Queuing in a QoS Environment

Bottlenecks Cause Shaping


Incomingtraffic Outgoingtraffic

Exponential
interarrivals

gap

Bottleneck
90%utilization

Copyright 2002 OPNET Technologies, Inc. 19


Traffic Behavior and Queuing in a QoS Environment

Incomingtraffic Outgoingtraffic

Small

Medium

Bottleneck
90%utilization
Large

Copyright 2002 OPNET Technologies, Inc. 20


Traffic Behavior and Queuing in a QoS Environment

Packet Trains

Interdeparturetimesforsmallpackets

Copyright 2002 OPNET Technologies, Inc. 21


Traffic Behavior and Queuing in a QoS Environment

Variable packet sizes


Histogramofinterdeparturetimesforsmallpackets

#ofpackets
Variablepacketsizes

Peakssmeared

Constantpacketsizes

sec

Copyright 2002 OPNET Technologies, Inc. 22


Traffic Behavior and Queuing in a QoS Environment

Outline
Basicconcepts
Sourcemodels
Poissontraffic
Batcharrivals
Exampleapplicationsvoice,video,filetransfer
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation(demo)

Copyright 2002 OPNET Technologies, Inc. 23


Traffic Behavior and Queuing in a QoS Environment

Poisson Process with Rate

Interarrivaltimesareindependentand
exponentiallydistributed
Modelswelltheaccumulatedtrafficofmany
independentsources
Theaverageinterarrivaltimeis1/
(secs/packet),soisthearrivalrate
(packets/sec)
Interarrival
Time Times

Copyright 2002 OPNET Technologies, Inc. 24


Traffic Behavior and Queuing in a QoS Environment

Batch Arrivals
Somesourcestransmitinpacketbursts
Maybebettermodeledbyabatcharrivalprocess(e.g.,bursts
ofpacketsarrivingaccordingtoaPoissonprocess)
Thecaseforabatchmodelisweakeratqueuesafterthefirst,
becauseofshaping

Interarrival
Time Times

Copyright 2002 OPNET Technologies, Inc. 25


Traffic Behavior and Queuing in a QoS Environment

Markov Modulated Rate Process (MMRP)


State 0 State 1

OFF ON

Stay in each state an exponentially


distributed time,
Transmit according to different model
(e.g., Poisson, deterministic, etc) at each state

Extension:Modelswithmorethantwostates

Copyright 2002 OPNET Technologies, Inc. 26


Traffic Behavior and Queuing in a QoS Environment

Source Types
Voicesources
Videosources
Filetransfers
Webtraffic
Interactivetraffic
DifferentapplicationtypeshavedifferentQoSrequirements,
e.g.,delay,jitter,loss,throughput,etc.

Copyright 2002 OPNET Technologies, Inc. 27


Traffic Behavior and Queuing in a QoS Environment

Source Type Properties

Characteristics QoS Model


Requirements
Voice *Alternatingtalk Delay<~150ms *Twostate(onoff)Markov
spurtsandsilence Jitter<~30ms ModulatedRateProcess(MMRP)
intervals. Packetloss<~1% *Exponentiallydistributedtimeat
*Talkspurtsproduce eachstate
constantpacketrate
traffic
Video *Highlyburstytraffic Delay<~400ms Kstate(onoff)MarkovModulated
(whenencoded) Jitter<~30ms RateProcess(MMRP)
*Longrange Packetloss<~1%
dependencies
Interactive *Poissontype Zeroornearsero Poisson,Poissonwithbatcharrivals,
*Sometimesbatch packetloss TwostateMMRP
FTP
arrivals,orbursty, Delaymaybe
telnet important
web orsometimesonoff

Copyright 2002 OPNET Technologies, Inc. 28


Traffic Behavior and Queuing in a QoS Environment

Typical Voice Source Behavior

Copyright 2002 OPNET Technologies, Inc. 29


Traffic Behavior and Queuing in a QoS Environment

MPEG1 Video Source Model


TheMPEG1MMRPmodelcanbeextremelybursty,andhas
longrangedependencybehaviorduetothedeterministic
framesequence

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)

Copyright 2002 OPNET Technologies, Inc. 31


Traffic Behavior and Queuing in a QoS Environment

Device Queuing Mechanisms


CommonqueueexamplesforIProuters
FIFO:FirstInFirstOut
PQ:PriorityQueuing
WFQ:WeightedFairQueuing
Combinationsoftheabove
Servicetypesfromaqueuingtheorystandpoint
Singleserver(onequeueonetransmissionline)
Multipleserver(onequeueseveraltransmissionlines)
Priorityserver(severalqueueswithhardprioritiesonetransmission
line)
Sharedserver(severalqueueswithsoftprioritiesonetransmission
line)

Copyright 2002 OPNET Technologies, Inc. 32


Traffic Behavior and Queuing in a QoS Environment

Single Server FIFO


SingletransmissionlineservingpacketsonaFIFO(FirstIn
FirstOut)basis
Eachpacketmustwaitforallpacketsfoundinthesystemto
completetransmission,beforestartingtransmission
DepartureTime=ArrivalTime+WorkloadFoundintheSystem+
Transmissiontime
Packetsarrivingtoafullbufferaredropped

Arrivals
Transmission
Line

Copyright 2002 OPNET Technologies, Inc. 33


Traffic Behavior and Queuing in a QoS Environment

FIFO Queue
PacketsareplacedonoutboundlinktoegressdeviceinFIFOorder
Device(router,switch)multiplexesdifferentflowsarrivingonvariousingress
portsontoanoutputbufferformingaFIFOqueue

Copyright 2002 OPNET Technologies, Inc. 34


Traffic Behavior and Queuing in a QoS Environment

Multiple Servers
Multiplepacketsaretransmittedsimultaneouslyonmultiple
lines/servers
Headofthelineservice:packetswaitinaFIFOqueue,and
whenaserverbecomesfree,thefirstpacketgoesintoservice

Arrivals
Transmission
Lines

Copyright 2002 OPNET Technologies, Inc. 35


Traffic Behavior and Queuing in a QoS Environment

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

Copyright 2002 OPNET Technologies, Inc. 36


Traffic Behavior and Queuing in a QoS Environment

Priority Queuing
Packetsareclassifiedintoseparatequeues
E.g.,basedonsource/destinationIPaddress,source/destinationTCPport,etc.
Allpacketsinahigherpriorityqueueareservedbeforealowerpriority
queueisserved
Typicallyinrouters,ifahigherprioritypacketarriveswhilealowerpriority
packetisbeingtransmitted,itwaitsuntilthelowerprioritypacketcompletes

Copyright 2002 OPNET Technologies, Inc. 37


Traffic Behavior and Queuing in a QoS Environment

Shared Servers
Againwehavemultipleclasses/queues,buttheyareserved
withasoftpriorityscheme
Roundrobin
Weightedfairqueuing

Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Weight
Weight
Line
Weight 1031

Copyright 2002 OPNET Technologies, Inc. 38


Traffic Behavior and Queuing in a QoS Environment

Round-Robin/Cyclic Service
Roundrobinserveseachqueueinsequence
Aqueuethatisemptyisskipped
Eachqueuewhenservedmayhavelimitedservice(atmostkpackets
transmittedwithk=1ork>1)
Roundrobinisfairforallqueues(aslongassomequeuesdo
nothavelongerpacketsthanothers)
Roundrobincannotbeusedtoenforcebandwidthallocation
amongthequeues.

Copyright 2002 OPNET Technologies, Inc. 39


Traffic Behavior and Queuing in a QoS Environment

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

Copyright 2002 OPNET Technologies, Inc. 40


Traffic Behavior and Queuing in a QoS Environment

Weighted Fair Queuing


Fairqueuingcannotbeusedtoimplementbandwidthallocationandsoft
priorities
Weightedfairqueuingisavariationthatcorrectsthisdeficiency
Letwkbetheweightofthekthqueue
Thinkofroundrobinwithqueuektransmittingwkbitsuponitsturn
Ifallqueueshavealwayssomethingtosend,thekthqueuereceivesbandwidth
equaltoafractionwk/iwiofthetotalbandwidth
Fairqueuingcorrespondstowk=1
Priorityqueuingcorrespondstotheweightsbeingveryhighaswemoveto
higherpriorities
Again,todealwiththesegmentationproblem,weapproximateasfollows:
Foreachpacket:
Wecalculateitsfinishtime(undertheweightedbitbybitroundrobin
scheme)
Wenexttransmitthepacketwiththeminimumfinishtime

Copyright 2002 OPNET Technologies, Inc. 41


Traffic Behavior and Queuing in a QoS Environment

Weighted Fair Queuing Illustration


Weights:
Queue 1 = 3
Queue 2 = 1
Queue 3 = 1

Copyright 2002 OPNET Technologies, Inc. 42


Traffic Behavior and Queuing in a QoS Environment

Combination of Several Queuing


Schemes
Examplevoice(PQ),guaranteedb/w(WFQ),BestEffort
(CiscosLLQimplementation)

Copyright 2002 OPNET Technologies, Inc. 43


Traffic Behavior and Queuing in a QoS Environment

Demo: FIFO

FIFO
Bottleneck
90%utilization

Copyright 2002 OPNET Technologies, Inc. 44


Traffic Behavior and Queuing in a QoS Environment

Demo: FIFO Queuing Delay


Applications have different
requirements
Video
delay, jitter
FTP
packet loss

Control beyond best effort


needed
Priority Queuing (PQ)
Weighted Fair Queuing (WFQ)

Copyright 2002 OPNET Technologies, Inc. 45


Traffic Behavior and Queuing in a QoS Environment

Demo: Priority Queuing (PQ)

PQ
Bottleneck
90%utilization

Copyright 2002 OPNET Technologies, Inc. 46


Traffic Behavior and Queuing in a QoS Environment

Demo: PQ Queuing Delays

PQFTP

FIFO

PQVideo

Copyright 2002 OPNET Technologies, Inc. 47


Traffic Behavior and Queuing in a QoS Environment

Demo: Weighted Fair Queuing (WFQ)

WFQ
Bottleneck
90%utilization

Copyright 2002 OPNET Technologies, Inc. 48


Traffic Behavior and Queuing in a QoS Environment

Demo: WFQ Queuing Delays

PQFTP

WFQFTP

FIFO

WFQ/PQVideo

Copyright 2002 OPNET Technologies, Inc. 49


Traffic Behavior and Queuing in a QoS Environment

Queuing: Take Away Points


Choiceofqueuingmechanismcanhaveaprofoundeffecton
performance
Toachievedesiredservicedifferentiation,appropriatequeuing
mechanismscanbeused
Complexqueuingmechanismsmayrequiresimulation
techniquestoanalyzebehavior
Improperconfiguration(e.g.,queuingmechanismselectionor
weights)mayimpactperformanceoflowprioritytraffic

Copyright 2002 OPNET Technologies, Inc. 50


Traffic Behavior and Queuing in a QoS Environment

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)

Copyright 2002 OPNET Technologies, Inc. 51


Traffic Behavior and Queuing in a QoS Environment

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)

Copyright 2002 OPNET Technologies, Inc. 53


Traffic Behavior and Queuing in a QoS Environment

M/M/1 Results
Theanalysisgivesthesteadystateprobabilitiesof
numberofpacketsinqueueortransmission
P{npackets}=n(1)where=/
Fromthiswecangettheaverages:
N=/(1)
T=N/=/(1)=1/()
N
T
1/

1
0

Copyright 2002 OPNET Technologies, Inc. 54


Traffic Behavior and Queuing in a QoS Environment

Example: How Delay Scales with


Bandwidth
Occupancyanddelayformulas
N=/(1) T=1/() =/
Assume:
Trafficarrivalrateisdoubled
Systemtransmissioncapacityisdoubled
Then:
Queuesizesstayatthesamelevel(staysthesame)
Packetdelayiscutinhalf(andaredoubled
Aconclusion:Inhighspeednetworks
propagationdelayincreasesinimportancerelativetodelay
buffersizeandpacketlossmaystillbeaproblem

Copyright 2002 OPNET Technologies, Inc. 55


Traffic Behavior and Queuing in a QoS Environment

M/M/m, M/M/ System


SameasM/M/1,butithasm(or)servers
InM/M/m,thepacketattheheadofthequeuemoves
toservicewhenaserverbecomesfree
Qualitativeresult
Delayincreasestoas=/mapproaches1
Thereareanalyticalformulasfortheoccupancy
probabilitiesandaveragedelayofthesesystems

Copyright 2002 OPNET Technologies, Inc. 56


Traffic Behavior and Queuing in a QoS Environment

Finite Buffer Systems: M/M/m/k


TheM/M/m/ksystem
SameasM/M/m,butthereisbufferspaceforatmostk
packets.Packetsarrivingatafullbufferaredropped
Formulasforaveragedelay,steadystateoccupancy
probabilities,andlossprobability
TheM/M/m/msystemisusedwidelytosize
telephoneorcircuitswitchingsystems

Copyright 2002 OPNET Technologies, Inc. 57


Traffic Behavior and Queuing in a QoS Environment

Characteristics of M/M/. Systems


Advantage:Simpleanalyticalformulas
Disadvantages:
ThePoissonassumptionmaybeviolated
Theexponentialtransmissiontimedistributionisan
approximationatbest
Interarrivalandpackettransmissiontimesmaybe
dependent(particularlyinthenetworkcore)
Headofthelineassumptionprecludesheterogeneousinput
trafficwithpriorities(hardorsoft)

Copyright 2002 OPNET Technologies, Inc. 58


Traffic Behavior and Queuing in a QoS Environment

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


Traffic Behavior and Queuing in a QoS Environment

G/G/1 System
SameasM/G/1butnowthepacketinterarrivaltime
distributionisalsogeneral,withmeanand
variance2
WestillassumeFIFOandindependentinterarrival
timesandpackettransmissiontimes
Heavytrafficapproximation:
Averagetimeinqueue~(2+2)/2(1)
Becomesincreasinglyaccurateas

Copyright 2002 OPNET Technologies, Inc. 60


Traffic Behavior and Queuing in a QoS Environment

Demo: M/G/1

Packetinterarrivaltimes Capacity
exponential(0.02)sec 1Mbps

Packetsize
1250bytes Packetsizedistribution:
(10000bits) exponential
constant
lognormal
Whatistheaveragedelayandqueuesize?

Copyright 2002 OPNET Technologies, Inc. 61


Traffic Behavior and Queuing in a QoS Environment

Demo: M/G/1 Analytical Results

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

Copyright 2002 OPNET Technologies, Inc. 62


Traffic Behavior and Queuing in a QoS Environment

Demo: M/G/1 Simulation Results


AverageDelay(sec) AverageQueueSize(packets)

Copyright 2002 OPNET Technologies, Inc. 63


Traffic Behavior and Queuing in a QoS Environment

Demo: M/G/1 Limitations


Applicationtrafficmixnotmemoryless

Video
constantpacketinterarrivals
Http
burstytraffic

Delay

PKformula

Simulation

Copyright 2002 OPNET Technologies, Inc. 64


Traffic Behavior and Queuing in a QoS Environment

Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Preemptivevs.nonpreemptive
Cyclic,WFQ,PQsystems
Demo:Simulationresults
Networksofqueues
Hybridsimulation(demo)

Copyright 2002 OPNET Technologies, Inc. 65


Traffic Behavior and Queuing in a QoS Environment

Non-preemptive Priority Systems


Wedistinguishbetweendifferentclassesoftraffic(flows)
Nonpreemptivepriority:packetundertransmissionisnot
preemptedbyapacketofhigherpriority
PKformulafordelaygeneralizes

Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Interm.
High
Low
Line
Priority
Priority
Priority

Copyright 2002 OPNET Technologies, Inc. 66


Traffic Behavior and Queuing in a QoS Environment

Cyclic Service Systems


Multipleflows,eachwithitsownqueue
Fairsystem:Eachflowgetsaccesstothetransmissionlinein
turn
Severalpossibleassumptionsabouthowmanypacketseach
flowcantransmitwhenitgetsaccess
FormulasfordelayunderM/G/1typeassumptionsare
available

Transmission
Class 3
2
1
Arrivals
Line

Copyright 2002 OPNET Technologies, Inc. 67


Traffic Behavior and Queuing in a QoS Environment

Weighted Fair Queuing


Acombinationofpriorityandcyclicservice
Noexactanalyticalformulasareavailable

Copyright 2002 OPNET Technologies, Inc. 68


Traffic Behavior and Queuing in a QoS Environment

Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
ViolationofM/M/.assumptions
Effectsondelaysandtrafficshaping
Analyticalapproximations
Hybridsimulation(demo)

Copyright 2002 OPNET Technologies, Inc. 69


Traffic Behavior and Queuing in a QoS Environment

Two Queues in Series


Firstqueueshapesthetrafficintosecondqueue
Arrivaltimesandpacketlengthsarecorrelated
M/M/1andM/G/1formulasyieldsignificanterrorforsecond
queue
FirstQueue
SecondQueue
Time
Time

Copyright 2002 OPNET Technologies, Inc. 70


Traffic Behavior and Queuing in a QoS Environment

Two bottlenecks in series

Exponential
interarrivals

Bottleneck Bottleneck

Noqueuingdelay
Delay

Copyright 2002 OPNET Technologies, Inc. 71


Traffic Behavior and Queuing in a QoS Environment

Approximations
Kleinrockindependenceapproximation
Performadelaycalculationineachqueueindependentlyofother
queues
Addtheresults(includingpropagationdelay)
Note:Intheprecedingexample,theKleinrockindependence
approximationoverestimatesthequeuingdelayby100%
Tendstobemoreaccurateinnetworkswithlotsoftraffic
mixing,e.g.,nodesservingmanyrelativelysmallflowsfrom
severaldifferentlocations

Copyright 2002 OPNET Technologies, Inc. 72


Traffic Behavior and Queuing in a QoS Environment

Outline
Basicconcepts
Sourcemodels
Servicemodels(demo)
Singlequeuesystems
Priority/sharedservicesystems
Networksofqueues
Hybridsimulation
Explicitvs.aggregatedtraffic
ConceptualFramework
Demo:PQandWFQwithaggregatedtraffic

Copyright 2002 OPNET Technologies, Inc. 73


Traffic Behavior and Queuing in a QoS Environment

Basic Concepts of Hybrid Simulation


Aimstocombinethebestofanalyticalresultsandsimulation
Achievesignificantgaininsimulationspeedwithlittlelossof
accuracy
Dividesthetrafficthroughanodeintoexplicitand
background
Explicittrafficissimulatedaccurately
Backgroundtrafficisaggregated
Theinteractionofexplicitandbackgroundismodeledeither
analyticallyorthroughafastsimulation(oracombination)
Explicit
Background

Copyright 2002 OPNET Technologies, Inc. 74


Traffic Behavior and Queuing in a QoS Environment

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

Copyright 2002 OPNET Technologies, Inc. 75


Traffic Behavior and Queuing in a QoS Environment

Aggregated Traffic
Simplifiedmodeling
Wedontkeeptrackofindividualpackets,onlyworkloadcounts
(numberofpacketsorbytes)
Wegenerateworkloadcounts
byprobabilistic/analyticalmodeling,or
bysimplifiedsimulation
Aggregated(orbackground)trafficislocal(perlink)
Shapingeffectsarecomplextoincorporate
Somedependencesbetweenexplicitandbackgroundtraffic
alongachainoflinksarecomplicatedandareignored

Copyright 2002 OPNET Technologies, Inc. 76


Traffic Behavior and Queuing in a QoS Environment

Hybrid Simulation (FIFO Links):


Conceptual Framework
Giventhearrivaltimeakofthekthexplicitpacket
Generatetheworkloadwkfoundinqueuebythekthpacket
Fromakandwkgeneratethedeparturetimeofthekthpacketas
DepartureTimedk=ak+wk+sk
whereskisthetransmissiontimeofthekthpacket
ARRIVAL TIMES
Explicit Explicit

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

Simulating the Background Traffic Effects


Useatrafficdescriptorforthebackgroundtraffic(e.g.,carried
byspecialpackets)
Trafficdescriptorincludes:
Trafficvolumeinformation(e.g.,packets/sec,bits/sec)
Probabilitydistributionofinterarrivaltimes
Probabilitydistributionofpacketlengths
Timeintervalofvalidityofthedescriptor
Generatewkusingoneofseveralideasandcombinations
thereof
Successivesampling(forFIFOcase)
Steadystatequeuelengthdistribution(ifwecangetit)
Simplifiedsimulation(microsimappliestocomplexqueuing
disciplines)

Copyright 2002 OPNET Technologies, Inc. 78


Traffic Behavior and Queuing in a QoS Environment

Hybrid Simulation (FIFO Case)


CriticalQuestion:Givenarrivaltimesakandak+1,workloadwk,andbackground
trafficdescriptor,howdowefindwk+1?
Arrival times/Workload found

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

Short Interval Case (Easy Case)


Shortintervalak+1ak(i.e.,ak+1<dk)
Queueisbusycontinuouslyinak+1ak
Sowk+1isquicklysimulated
Samplethebackgroundtrafficarrivaldistributiontosimulatethenew
workloadarrivalsinak+1ak
Dotheaccounting(addtowkandsubtractthetransmittedworkloadin
ak+1ak)
Short Interval wk+1 = wk + (New bkg arrivals) - (Old bkg transmissions)

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

Long Interval Case

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

Copyright 2002 OPNET Technologies, Inc. 81


Traffic Behavior and Queuing in a QoS Environment

Steady-State Queue Length Distribution


Iftheintervalbetweentwosuccessiveexplicitpacketsisvery
long,wecanassumethatthequeuefoundbythesecond
packetisinsteadystate
So,wecanobtainwk+1bysamplingthesteadystate
distribution
Appliestocaseswherethesteadystatedistributioncanbe
foundorcanbereasonablyapproximated
M/M/1andotherM/M/.Queues
SomeM/G/.systems

Copyright 2002 OPNET Technologies, Inc. 82


Traffic Behavior and Queuing in a QoS Environment

Micro Simulation: Conceptual Framework

Handlescomplexqueuingsystems
Micropacketsaregeneratedtorepresenttrafficloadwithinthecontext
ofthequeueonly(i.e.,theyarenottransmittedtoanyexternallinks)
Forlongintervals,whereconvergencetoasteadystateislikely
Trytodetectconvergenceduringthemicrosim
Estimatesteadystatequeuelengthdistribution
Samplethesteadystatedistributiontoestimatewk+1
Microsimspeedsupthesimulationwithoutsacrificing
accuracy
Microsimprovidesageneralframework
Appliestononstationarybackgroundtraffic
AppliestononFIFOservicemodels(withpropermodification)

Copyright 2002 OPNET Technologies, Inc. 83


Traffic Behavior and Queuing in a QoS Environment

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

Best Effort Service for LRD/Self-Similar


Yes N/A N/A Yes Yes
Behavior Traffic
"Chancing It" with Best Effort Service for
Yes N/A N/A Yes Yes
Voice, Video and Data
Single Link with QoS-Based Queueing
Using QoS to differentiate service levels for Yes (loss of
N/A N/A Yes Yes
the same type of traffic accuracy)
Using QoS to support different requirements
for different application types given as a Highly
N/A N/A Yes Yes
detailed study of setting Cisco Router approximate
queueing parameters
Network of Queues
Hop-by-hop Yes (some loss of Yes (Run time a Yes [Fast with
General network model extending the
N/A Analysis (loss accuracy - e.g., traffic function of network minimal loss of
previous QoS queueing model
of accuacy) shaping) complexity) accuracy]

Hop-by-hop Yes (Run time a Yes [Fast with


Reduction of the general model to a
N/A Analysis (loss N/A function of network minimal loss of
representative end-to-end path
of accuacy) complexity) accuracy]

Copyright 2002 OPNET Technologies, Inc. 84


Traffic Behavior and Queuing in a QoS Environment

Demo End-to-end Delay: Baseline Network

Trafficmodeledas
1)Explicittraffic
2)Backgroundtraffic
Copyright 2002 OPNET Technologies, Inc. 85
Traffic Behavior and Queuing in a QoS Environment

Target Flow: ETE delay as a function of ToS

Targetflow:SeattleHoustonmodeledusingexplicittraffic
VaryingitsTypeofService(ToS)
BestEffort(0)
StreamingMultimedia(4)
Copyright 2002 OPNET Technologies, Inc. 86
Traffic Behavior and Queuing in a QoS Environment

Explicit Simulation Results for Target Flow

Totaltrafficvolume
500Mbps
Timemodeled
35minutes
Simulationduration
31hours

Copyright 2002 OPNET Technologies, Inc. 87


Traffic Behavior and Queuing in a QoS Environment

Hybrid Simulation Results for Target Flow

Totaltrafficvolume
500Mbps
Timemodeled
35minutes
Simulationduration
14minutes

Copyright 2002 OPNET Technologies, Inc. 88


Traffic Behavior and Queuing in a QoS Environment

Comparison: Hybrid vs Explicit Simulation

Copyright 2002 OPNET Technologies, Inc. 89


Traffic Behavior and Queuing in a QoS Environment

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

Вам также может понравиться