Académique Documents
Professionnel Documents
Culture Documents
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
Analysis Scenarios
Discrete-Event Simulation Hybrid DES with Explicit DES only with and Explicit Traffic Background Traffic
Yes Yes Yes Yes Yes Yes
Single Link with FIFO Service Best Effort Service for Standard Data Traffic Best Effort Service for LRD/Self-Similar Behavior Traffic "Chancing It" with Best Effort Service for Voice, Video and Data Single Link with QoS-Based Queueing Using QoS to differentiate service levels for the same type of traffic Using QoS to support different requirements for different application types given as a detailed study of setting Cisco Router queueing parameters Network of Queues General network model extending the previous QoS queueing model Reduction of the general model to a representative end-to-end path
N/A
N/A
Yes
Yes
N/A
N/A
Yes
Yes
N/A
Yes (some loss of Yes (Run time a accuracy - e.g., traffic function of network shaping) complexity) N/A Yes (Run time a function of network complexity)
Yes [Fast with minimal loss of accuracy] Yes [Fast with minimal loss of accuracy]
N/A
Arrival rate
Long-term number of arrivals per unit time
Occupancy
Number of packets in the system (averaged over a long time)
In an unstable system packets accumulate in various queues and/or get dropped For unstable systems with large buffers some packet delays become very large
Flow/admission control may be used to limit the packet arrival rate Prioritization of flows keeps delays bounded for the important traffic
Littles 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
Copyright 2002 OPNET Technologies, Inc.
10
11
Times
Regular Traffic
Times
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
Queuing Delays
15
Queuing Delays
As the work arrival rate: (packet arrival rate * packet length) increases, the opportunity for interference increases
Copyright 2002 OPNET Technologies, Inc.
16
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)
17
Time
The departure traffic from a bottleneck is more regular than the arrival traffic The inter-departure time between two packets is at least as large as the transmission time of the 2nd packet
Copyright 2002 OPNET Technologies, Inc.
18
Exponential inter-arrivals
gap
19
Incoming traffic
Outgoing traffic
Small
Medium
20
Packet Trains
Inter-departure times for small packets
21
Peaks smeared
sec
22
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)
23
Times
24
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
Time Interarrival
Times
25
Stay in each state an exponentially distributed time, Transmit according to different model (e.g., Poisson, deterministic, etc) at each state
26
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.
27
QoS Requirements
Delay < ~150 ms Jitter < ~30 ms Packet loss < ~1%
Model
* Two-state (on-off) Markov Modulated Rate Process (MMRP) * Exponentially distributed time at each state
Video
Delay < ~ 400 ms Jitter < ~ 30 ms Packet loss < ~1% Zero or near-sero packet loss Delay may be important
Interactive
FTP telnet web
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
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)
31
32
33
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
34
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
Transmission Arrivals Lines
35
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 13Arrivals Class 2 Arrivals Class Arrivals Interm.Priority High Priority Low Priority Line
36
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
37
Shared Servers
Again we have multiple classes/queues, but they are served with a soft priority scheme Round-robin Weighted fair queuing
Transmission Class 13Arrivals Class 2 Arrivals Class Arrivals Weight 10 Weight 3 Line Weight 1
38
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.
39
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
Important properties:
Priority is given to short packets Equal bandwidth is allocated to all queues that are continuously busy
i-1 Departure times Arrival times i-1 Finish Time of Packet i
40
Fair queuing corresponds to wk = 1 Priority queuing corresponds to the weights being very high as we move to higher priorities Again, to deal with the segmentation problem, we approximate as follows: For each packet:
We calculate its finish time (under the weighted bit-by-bit round robin scheme) We next transmit the packet with the minimum finish time
Copyright 2002 OPNET Technologies, Inc.
41
42
43
Demo: FIFO
44
FTP
packet loss
Control beyond best effort needed Priority Queuing (PQ) Weighted Fair Queuing (WFQ)
45
46
PQ FTP
FIFO
PQ Video
47
48
PQ FTP
WFQ FTP
49
50
Outline
Basic concepts Source models Service models (demo) Single-queue systems
M/M/1M/M/m/k M/G/1G/G/1 Demo: Analytics vs. simulation
51
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
Delay Calculation
Let Q = Average time spent waiting in queue T = Average packet delay (transmission plus queuing) Note that T = 1/ + Q Also by Littles 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)
53
M/M/1 Results The analysis gives the steady-state probabilities of number of packets in queue or transmission P{n packets} = n(1-) where = / From this we can get the averages:
N = /(1 - ) T = N/ = /(1 - ) = 1/( - )
l
0 1 /m 1 m T N
54
= /
55
M/M/m, M/M/ System Same as M/M/1, but it has m (or ) servers In M/M/m, the packet at the head of the queue moves to service when a server becomes free Qualitative result
Delay increases to as = /m approaches 1
There are analytical formulas for the occupancy probabilities and average delay of these systems
56
Formulas for average delay, steady-state occupancy probabilities, and loss probability The M/M/m/m system is used widely to size telephone or circuit switching systems
57
58
M/G/1 System Same as M/M/1 but the packet transmission time distribution is general, with given mean 1/ and variance 2 Utilization factor = / Pollaczek-Kinchine formula for
Average time in queue = (2 + 1/2)/2(1- ) Average delay = 1/ + (2 + 1/2)/2(1- )
The formulas for the steady-state occupancy probabilities are more complicated Insight: As 2 increases, delay increases
Copyright 2002 OPNET Technologies, Inc.
59
G/G/1 System Same as M/G/1 but now the packet interarrival time distribution is also general, with mean and variance 2 We still assume FIFO and independent interarrival times and packet transmission times Heavy traffic approximation:
Average time in queue ~ (2 + 2)/2(1- )
60
Demo: M/G/1
Packet inter-arrival times exponential (0.02) sec Capacity 1 Mbps
61
Delay T (sec)
62
63
Http
bursty traffic
Delay
P-K formula
Simulation
Copyright 2002 OPNET Technologies, Inc.
64
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
65
66
67
68
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
69
70
Exponential inter-arrivals
Bottleneck
Bottleneck
Delay
No queuing delay
71
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
72
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
73
The interaction of explicit and background is modeled either analytically or through a fast simulation (or a combination)
Background Explicit
74
Explicit Traffic
Modeled in detail, including the effects of various protocols Each packets 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
.. .
Delay times at aat the link d2 a1 Time Departure times link Arrival 4 3
75
Aggregated Traffic
Simplified modeling
We dont 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
76
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
78
.. . w
3
.. .
d1 = a1 + w1 + s1 d2 = a2 + w2 + s2
Time
d3 = a3 + w3 + s3
Departure times
Must calculate/simulate the two terms The first term is simulated based on the traffic descriptor of the background traffic 79 The second term is easily calculated if the queue is continuously busy in ak+1 - ak
Copyright 2002 OPNET Technologies, Inc.
ak w k a k+1 w k+1
.. .
dk
Copyright 2002 OPNET Technologies, Inc.
Time
d k+1
80
Can be done by sampling the background arrival distribution in each busy period Busy Idle dk+1 wk Periods ak Other alternatives are possible Long Interval Time Periods k+1
.. .
81
82
Microsim speeds up the simulation without sacrificing accuracy Microsim provides a general framework
Applies to non-stationary background traffic Applies to non-FIFO service models (with proper modification)
83
Examples of Applications
Analytical Modeling
Analysis Scenarios
Discrete-Event Simulation Hybrid DES with Explicit DES only with and Explicit Traffic Background Traffic
Yes Yes Yes Yes Yes Yes
Single Link with FIFO Service Best Effort Service for Standard Data Traffic Best Effort Service for LRD/Self-Similar Behavior Traffic "Chancing It" with Best Effort Service for Voice, Video and Data Single Link with QoS-Based Queueing Using QoS to differentiate service levels for the same type of traffic Using QoS to support different requirements for different application types given as a detailed study of setting Cisco Router queueing parameters Network of Queues General network model extending the previous QoS queueing model Reduction of the general model to a representative end-to-end path
N/A
N/A
Yes
Yes
N/A
N/A
Yes
Yes
N/A
Yes (some loss of Yes (Run time a accuracy - e.g., traffic function of network shaping) complexity) N/A Yes (Run time a function of network complexity)
Yes [Fast with minimal loss of accuracy] Yes [Fast with minimal loss of accuracy]
N/A
84
85
86
Time modeled
35 minutes
Simulation duration
31 hours
87
Time modeled
35 minutes
Simulation duration
14 minutes
88
89
References
Networking
Bertsekas and Gallager, Data Networks, Prentice-Hall, 1992
90