Escolar Documentos
Profissional Documentos
Cultura Documentos
Session 1813
Traffic Behavior and
Queuing in a QoS Environment
Networking Tutorials
Objectives
• Provide some basic understanding of queuing phenomena
• Explain the available solution approaches and associated
trade-offs
• Give guidelines on how to match applications and solutions
Outline
• Basic concepts
• Source models
• Service models (demo)
• Single-queue systems
• Priority/shared service systems
• Networks of queues
• Hybrid simulation (demo)
Outline
• Basic concepts
– Performance measures
– Solution methodologies
– Queuing system concepts
– Stability and steady-state
– Causes of delay and bottlenecks
• Source models
• Service models (demo)
• Single-queue systems
• Priority/shared service systems
• Networks of queues
• Hybrid simulation (demo)
Performance Measures
• Delay
• Delay variation (jitter)
• Packet loss
• Efficient sharing of bandwidth
• Relative importance depends on traffic type (audio/video,
file transfer, interactive)
• Challenge: Provide adequate performance for (possibly)
heterogeneous traffic
Solution Methodologies
• Analytical results (formulas)
– Pros: Quick answers, insight
– Cons: Often inaccurate or inapplicable
• Explicit simulation
– Pros: Accurate and realistic models, broad applicability
– Cons: Can be slow
• Hybrid simulation
– Intermediate solution approach
– Combines advantages and disadvantages of analysis and simulation
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
Little’s Law
• For a given arrival rate, the time in the system is proportional
to packet occupancy
N=T
where
N: average # of packets in the system
: packet arrival rate (packets per unit time)
T: average delay (time in the system) per packet
• Examples:
– On rainy days, streets and highways are more crowded
– Fast food restaurants need a smaller dining room than regular
restaurants with the same customer arrival rate
– Large buffering together with large arrival rate cause large delays
Regular Traffic
Time
Arrival Times
Departure
2
4
3
1
Times
Irregular but
Spaced Apart Traffic
Bursty Traffic
Queuing
1234Time
Delays
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
Queuing Delays
Time
Queuing Delays
Time
Bottlenecks
• Types of bottlenecks
– At access points (flow control, prioritization, QoS enforcement needed)
– At points within the network core
– Isolated (can be analyzed in isolation)
– Interrelated (network or chain analysis needed)
• Bottlenecks result from overloads caused by:
– High load sessions, or
– Convergence of sufficient number of moderate load sessions at the
same queue
Time
Exponential
inter-arrivals
gap
Bottleneck
90% utilization
Small
Medium
Bottleneck
90% utilization
Large
Packet Trains
# of packets
Variable packet sizes
Peaks smeared
sec
Outline
• Basic concepts
• Source models
– Poisson traffic
– Batch arrivals
– Example applications – voice, video, file transfer
• Service models (demo)
• Single-queue systems
• Priority/shared service systems
• Networks of queues
• Hybrid simulation (demo)
Batch Arrivals
• Some sources transmit in packet bursts
• May be better modeled by a batch arrival process (e.g., bursts
of packets arriving according to a Poisson process)
• The case for a batch model is weaker at queues after the first,
because of shaping
Interarrival
Time Times
State 0 State 1
OFF ON
Source Types
• Voice sources
• Video sources
• File transfers
• Web traffic
• Interactive traffic
• Different application types have different QoS requirements,
e.g., delay, jitter, loss, throughput, etc.
Video * Highly bursty traffic Delay < ~ 400 ms K-state (on-off) Markov Modulated
(when encoded) Jitter < ~ 30 ms Rate Process (MMRP)
* Long range Packet loss < ~1%
dependencies
Interactive * Poisson type Zero or near-sero Poisson, Poisson with batch arrivals,
* Sometimes batch- packet loss Two-state MMRP
FTP
Delay may be
telnet arrivals, or bursty,
important
web or sometimes on-off
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
• Basic concepts
• Source models
• Service models
– Single vs. multiple-servers
– FIFO, priority, and shared servers
– Demo
• Single-queue systems
• Priority/shared service systems
• Networks of queues
• Hybrid simulation (demo)
Arrivals
Transmission
Line
FIFO Queue
• Packets are placed on outbound link to egress device in FIFO order
– Device (router, switch) multiplexes different flows arriving on various ingress
ports onto an output buffer forming a FIFO queue
Multiple Servers
• Multiple packets are transmitted simultaneously on multiple
lines/servers
• Head of the line service: packets wait in a FIFO queue, and
when a server becomes free, the first packet goes into service
Arrivals
Transmission
Lines
Priority Servers
• Packets form priority classes (each may have several flows)
• There is a separate FIFO queue for each priority class
• Packets of lower priority start transmission only if no higher
priority packet is waiting
• Priority types:
– Non-preemptive (high priority packet must wait for a lower priority
packet found under transmission upon arrival)
– Preemptive (high priority packet does not have to wait …)
Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Interm.
High
Low
Line
Priority
Priority
Priority
Priority Queuing
• Packets are classified into separate queues
– E.g., based on source/destination IP address, source/destination TCP port, etc.
• All packets in a higher priority queue are served before a lower priority
queue is served
– Typically in routers, if a higher priority packet arrives while a lower priority
packet is being transmitted, it waits until the lower priority packet completes
Shared Servers
• Again we have multiple classes/queues, but they are served
with a “soft” priority scheme
• Round-robin
• Weighted fair queuing
Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Weight
Weight
Line
Weight1031
Round-Robin/Cyclic Service
• Round-robin serves each queue in sequence
– A queue that is empty is skipped
– Each queue when served may have limited service (at most k packets
transmitted with k = 1 or k > 1)
• Round-robin is fair for all queues (as long as some queues do
not have longer packets than others)
• Round-robin cannot be used to enforce bandwidth allocation
among the queues.
Fair Queuing
• This scheduling method is inspired by the “most fair” of methods:
– Transmit one bit from each queue in cyclic order (bit-by-bit round robin)
– Skip queues that are empty
• To approximate the bit-by-bit processing behavior, for each packet
– We calculate upon arrival its “finish time under bit-by-bit round robin”
assuming all other queues are continuously busy, and we transmit by FIFO
within each queue
– Transmit next the packet with the minimum finish time
• Important properties:
– Priority is given to short packets
– Equal bandwidth is allocated to all queues that are continuously busy
Finish
Arrival
i-1
iDeparture
-1 Time
timestimes
of Packet i
Demo: FIFO
FIFO
Bottleneck
90% utilization
PQ
Bottleneck
90% utilization
PQ FTP
FIFO
PQ Video
WFQ
Bottleneck
90% utilization
PQ FTP
WFQ FTP
FIFO
WFQ/PQ Video
Outline
• Basic concepts
• Source models
• Service models (demo)
• Single-queue systems
– M/M/1……M/M/m/k
– M/G/1……G/G/1
– Demo: Analytics vs. simulation
• Priority/shared service systems
• Networks of queues
• Hybrid simulation (demo)
M/M/1 System
• Nomenclature: M stands for “Memoryless” (a property of the
exponential distribution)
– M/M/1 stands for Poisson arrival process (which is memoryless)
– M/M/1 stands for exponentially distributed transmission times
• Assumptions:
– Arrival process is Poisson with rate packets/sec
– Packet transmission times are exponentially distributed with mean 1/
– One server
– Independent interarrival times and packet transmission times
• Transmission time is proportional to packet length
• Note 1/ is secs/packet so is packets/sec (packet
transmission rate of the queue)
• Utilization factor: = /stable system if 1)
Copyright © 2002 OPNET Technologies, Inc. 52
Traffic Behavior and Queuing in a QoS Environment
Delay Calculation
• Let
Q = Average time spent waiting in queue
T = Average packet delay (transmission plus queuing)
• Note that T = 1/ + Q
• Also by Little’s law
N = T and Nq = Q
where
Nq = Average number waiting in queue
• These quantities can be calculated with formulas derived by
Markov chain analysis (see references)
M/M/1 Results
M/G/1 System
G/G/1 System
Demo: M/G/1
Packet size
1250 bytes Packet size distribution:
(10000 bits) exponential
constant
lognormal
What is the average delay and queue size ?
Packet Size
Delay T (sec) Queue Size (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
» constant packet inter-arrivals
• Http
» bursty traffic
Delay
P-K formula
Simulation
Outline
• Basic concepts
• Source models
• Service models (demo)
• Single-queue systems
• Priority/shared service systems
– Preemptive vs. non-preemptive
– Cyclic, WFQ, PQ systems
– Demo: Simulation results
• Networks of queues
• Hybrid simulation (demo)
Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Interm.
High
Low
Line
Priority
Priority
Priority
Transmission
Class 1
3
2
Arrivals
Line
Outline
• Basic concepts
• Source models
• Service models (demo)
• Single-queue systems
• Priority/shared service systems
• Networks of queues
– Violation of M/M/. assumptions
– Effects on delays and traffic shaping
– Analytical approximations
• Hybrid simulation (demo)
Exponential
inter-arrivals
Bottleneck Bottleneck
No queuing delay
Delay
Approximations
• Kleinrock independence approximation
– Perform a delay calculation in each queue independently of other
queues
– Add the results (including propagation delay)
• Note: In the preceding example, the Kleinrock independence
approximation overestimates the queuing delay by 100%
• Tends to be more accurate in networks with “lots of traffic
mixing”, e.g., nodes serving many relatively small flows from
several different locations
Outline
• Basic concepts
• Source models
• Service models (demo)
• Single-queue systems
• Priority/shared service systems
• Networks of queues
• Hybrid simulation
– Explicit vs. aggregated traffic
– Conceptual Framework
– Demo: PQ and WFQ with aggregated traffic
Explicit Traffic
• Modeled in detail, including the effects of various protocols
• Each packet’s arrival and departure times are recorded (together
with other data of interest, e.g., loss, etc.) along each link that it
traverses
• Departure times at a link are the arrival times at the next link (plus
propagation delay)
• Objective: At each link, given the arrival times (and the packet
lengths), determine the departure times
.. .
Arrival
Departure
Time
a
d
Delay
1
4
2
3 times
times
at aatlink
the link
Aggregated Traffic
• Simplified modeling
– We don’t keep track of individual packets, only workload counts
(number of packets or bytes)
– We “generate” workload counts
» by probabilistic/analytical modeling, or
» by simplified simulation
• Aggregated (or background) traffic is local (per link)
• Shaping effects are complex to incorporate
• Some dependences between explicit and background traffic
along a chain of links are complicated and are ignored
aK wK a K+1 w K+1
Time
Background Background
Explicit Explicit
d K = aK + wK + sK
a1 w1 a2 w2 a3 w
. . .
3
.. . Time
d1 = a1 + w1 + s1 d2 = a2 + w2 + s2 d3 = a3 + w3 + s3
Departure times
ak w k a k+1 wk+1
.. . Time
dk d k+1
Copyright © 2002 OPNET Technologies, Inc. 80
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
Traffic modeled as
1) Explicit traffic
2) Background traffic
References
• Networking
– Bertsekas and Gallager, Data Networks, Prentice-Hall, 1992
• Device Queuing Implementations
– Vegesna, IP Quality of Service, Ciscopress.com, 2001
– http://www.juniper.net/techcenter/techpapers/200020.pdf
• Probability and Queuing Models
– Bertsekas and Tsitsiklis, Introduction to Probability, Athena Scientific, 2002,
http://www.athenasc.com/probbook.html
– Cohen, The Single Server Queue, North-Holland, 1992
– Takagi, Queuing Analysis: A Foundation of Performance Evaluation. (3
Volumes), North-Holland, 1991
– Gross and Harris, Fundamentals of Queuing Theory, Wiley, 1985
– Cooper, Introduction to Queuing Theory, CEEPress, 1981
• OPNET Hybrid Simulation and Micro Simulation
– See Case Studies papers in
http://secure.opnet.com/services/muc/mtdlogis_cse_stdies_81.html