Download Queuing Delay and Analysis

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Queuing Delay and
Queuing Analysis
1
RECALL: Delays in Packet
Switched (e.g. IP) Networks

End-to-end delay (simplified) =
– (dprop + dtrans + dqueue + dproc) … on each link
A

Where:
B
 Propagation delay (dprop) = d/s (dependent on path)
 Transmission delay (dtrans) = L/R (dependent on path)
 Queuing delay (dqueue) = (dependent on load)
 Processing delay (dproc) = (minimal-insignificant/node)
 Number of links (Q) = (dependent on path)
Introduction
2
Projected vs. Actual Response
Time
Why??
Queuing Analysis
3
R: link bandwidth
(bps)
L: packet length
(bits)
a: average packet
arrival rate






average
queueing delay
Queueing delay (revisited)
traffic intensity
= La/R
La/R ~ 0: avg. queueing delay small
La/R -> 1: avg. queueing delay large
La/R > 1: more “work” arriving
than can be serviced, average delay infinite!
Queuing Analysis
La/R ~ 0
La/R -> 1
4
Introduction- Motivation


Address how to analyze changes in
network workloads (i.e., a helpful tool
to use)
Analysis of system (network) load and
performance characteristics
–
–


response time
throughput
Performance tradeoffs are often not
intuitive
Queuing theory, although
mathematically complex, often makes
analysis very straightforward
Queuing Analysis
5
Important Note



Queuing theory is heavily dependent
on basic probability theory (a prerequisite for our graduate program)
If you need to refresh your
knowledge in this area, please review
the Stallings textbook, Chapter 7:
Overview of Probability and
Stochastice Processes.
I will not test you specifically on
probability theory, but will reference
it in coverage of the queuing topics
addressed in this module.
Queuing Analysis
6
Single-Server Queuing System
Items Arriving
(rate: )
(message, packet, cell)
Queuing
System
(Delay Box)
Items Departing
(rate: R)
Items Lost
Queuing Analysis
7
Router output port functions
switch
fabric
datagram
buffer(s)
queueing
Queue



link
layer
protocol
(send)
line
termination
Queue server
buffering/queuing required when datagrams arrive
from fabric faster than the transmission rate
scheduling discipline chooses among queued
datagrams for transmission
sending discipline (servicing the queue) on the
output link as determined by link protocol
Introduction
8
The Fundamental Task of
Queuing Analysis
Given:
• Arrival rate, 
• Service time, Ts
• Number of servers, N
Queuing Analysis
Determine:
• Items waiting, w
• Waiting time, Tw
• Items queued, r
• Residence time, Tr
9
Parameters for Single-Server
Queuing System
Comments, assuming queue has infinite capacity:
1. At  = 1, server is working 100% of the time (saturated), so items are queued
(delayed) until they can be served. Departures remain constant (for same L).
2. Traffic intensity, u = L/R. Note that Ts = L/R, so:
max = 1 / Ts = 1 / (L/R)
is the theoretical maximum arrival rate, and that
Lmax/R = u = 1
at the theoretical maximum arrival rate
Queuing Analysis
10
Queuing Process Example: SingleServer FIFO Queue
Depth of
the Queue
(r)
Queuing Analysis
General Expression:
TRn+1 = TSn+1 + MAX[0, Dn – An+1]
11
General Characteristics of
Network Queuing Models

–

–
–

Item population
generally assumed to be infinite therefore,
arrival rate is persistent through time
Queue size
infinite, therefore no loss
finite, more practical, but often immaterial
Dispatching discipline
– FIFO, typical
– LIFO (when is this practical?)
– Relative/Preferential, based on QoS
Queuing Analysis
12
Multiserver Queuing System
Comments:
1. Assuming N identical servers, and  is the utilization of each server.
2. Then, N is the utilization of the entire system, and the maximum utilization is
N x 100%.
3. Therefore, the maximum supportable arrival rate that the system can handle is:
max = N / Ts = NR/L
Queuing Analysis
13
Multiple Single-Server Queuing
Systems
Chapter 8 Overview of Queuing Analysis
14
Basic Queuing Relationships
General
Single
Server
Multiserver
r = Tr
Little’s Formula
 = Ts
 = Ts
N
w = Tw
Little’s Formula
r=w+
u = Ts = N
Tr = Tw + Ts
Queuing Analysis
r = w + N
15
Kendall’s notation
Notation is X/Y/N, where:
X is distribution of interarrival times
Y is distribution of service times
N is the number of servers
 Common distributions

G
= general distribution if interarrival times or
service times
 GI = general distribution of interarrival time with
the restriction that they are independent
 M = exponential distribution of inter-arrival times
(Poisson arrivals – p. 167) and service times
 D = deterministic arrivals or fixed length service
Queuing Analysis
M/M/1? M/D/1?
16
Important Formulas for SingleServer Queuing Systems
Note Coefficient of variation:
if Ts = Ts => exponential
if Ts = 0 => constant
Queuing Analysis
17
Important Formulas for SingleServer Queuing Systems
Queuing Analysis
18
Mean Number of Items in System
(r)- Single-Server Queuing
Ts/Ts = Coefficient of variation
M/M/1
M/D/1
Queuing Analysis
19
Mean Residence Time – (Tr)
Single-Server Queuing
M/M/1
M/D/1
Queuing Analysis
20
Network Queue Performance:
Key Fact
The higher the variability in arrival rate
at the router, relative to the service
time on the output link(s), i.e., Ts/Ts
(coefficient of variation) the poorer the
performance of the router, especially at
high rates of utilization.
Queuing Analysis
21
Multiple Server Queuing Systems
Multiserver
Queuing
System
Multiple SingleServer Queuing
System
Queuing Analysis
22
Important Formulas for Multiserver
Queuing
Note:
Useful only in
M/M/N case,
with equal
service times
at all N
servers.
Queuing Analysis
23
Multiple Server Queuing Example
(p. 203)
Single server
M/M/1 (2nd Floor)
Multiserver
M/M/? (2nd Floor)
Multiple
Single server
M/M/1 (1st Floor)
M/M/1 (2nd Floor)
Queuing Analysis
24
MultiServer vs. Multiple SingleServer Queuing System Comparison
(from example problem, pp. 203-204)
Single server case (M/M/1):
Single server utilization:  = 10 engineers x 0.5 hours each / 8 hour work day
= 5/8 = .625
Average time waiting: Tw
= Ts / 1 -  = 0.625 x 30 / .375 = 50 minutes
Arrival rate:  = 10 engineers per 8 hours = 10/480 = 0.021 engineers/minute
90th percentile waiting time: mTw(90) = Tw/ x ln(10) = 146.6 minutes
Average number of engineers waiting: w = Tw = 0.021 x 50 = 1.0416 engineers
Queuing Analysis
25
Example: Router Queuing
Internet
9600
bps
…
 = 5 packets/sec
L = 144 octets
From data provided:
• Ts = L/R = (144x8)/9600 = .12sec
•  = Ts = 5 packets/sec x .12sec = .6
Determine:
1. Tr= Ts / (1-) = .12sec/.4 = .3 sec
2. r =  / (1-) = .6/.4 = 1.5 packets
ln(1-.90)
- 1 = 3.5 packets
ln (.6)
ln(1-.95)
4. mr(95) =
- 1 = 4.8 packets
ln (.6)
3. mr(90) =
Queuing Analysis
For 3 & 4, use:
mr(y) =
ln(1 – y/100)
-1
ln 
26
Priorities in Queues – Two
priority classes
r
Queuing Analysis
27
Priorities in Queues – Example
 



Tr
Router queue services two packet sizes:
• Long = 800 octets
• Short = 80 octets
• Lengths exponentially distributed
• Arrival rates are equal, 8packets/sec
• Link transmission rate is 64Kbps
• Short packets are priority 1,
• Longer packets are priority 2
From data above, calculate:
Ts 1 = Lshort/R = (80 x 8) / 64000 = .01 sec
Ts 2 = Llong/R = (800 x 8) / 64000 = .1 sec
1 =  Ts 1 = 8 x 0.01 = 0.08
2 =  Ts 2 = 8 x 0.1 = 0.8
 = 1 + 2 = 0.88
Chapter 8 Overview of Queuing Analysis





64Kbps
Find the average Queuing Delay (Tr)
through the router:
1 Ts 1 + 2 Ts 2
1 - 1
.08 x .01 + .8 x .1
= .01 +
= 0.098 sec
1-.08
Tr1 = Ts1 +
Tr2 = Ts2 +
= .1 +
Tr =
Tr 1 - Ts 1
1-
.098 - .01
1 - .88
= 0. 833 sec
1
2
T
+
 r1
 Tr2
= .5 x .098 + .5 x .833 = 0.4655 sec
28
Network of Queues
Queuing Analysis
29
Elements of Queuing Networks
Queuing Analysis
30
Queuing Networks
Queuing Analysis
31
Jackson’s Theorem and Queuing
Networks

–
–
–

–
–
–
Assumptions:
the queuing network has m nodes, each providing
exponential service
items arriving from outside the system at any node
arrive with a Poisson rate
once served at a node, an item moves immediately to
another with a fixed probability, or leaves the network
Jackson’s Theorem states:
each node is an independent queuing system with Poisson
inputs determined by partitioning, merging and tandem
queuing principles
each node can be analyzed separately using the M/M/1
or M/M/N models
mean delays at each node can be added to determine
mean system (network) delays
Queuing Analysis
32
Jackson’s Theorem - Application
in Packet Switched Networks
Internal load:
L
Packet Switched
Network
External load, offered to network:
N
N
 =   jk
j=1 k=2
where:
 = total workload in packets/sec
jk = workload between source j
and destination k
N = total number of (external)
sources and destinations
Queuing Analysis
 =  i
i=1
where:
 = total on all links in network
i = load on link i
L = total number of links
Note:
• Internal > offered load
• Average length for all paths:
E[number of links in path] = /
• Average number of item waiting
and being served in link i: ri = i Tri
• Average delay of packets sent
through the network is:
1 L
Mi
(See p. 210)
T=  
i=1 Ri - Mi
where: M is average packet length and
Ri is the data rate on link i
33
Estimating Model Parameters

To enable queuing analysis using
these models, we must estimate
certain parameters for the network:
– Mean and standard deviation of arrival
rate
– Mean and standard deviation of service
time (or, packet size)

Typically, these estimates use
sample measurements taken from an
existing system
Queuing Analysis
34
Sample Means for Underlying
Exponential Distribution
Sampling:
• The mean is generally
the most important
quantity to estimate:
N
1
( ) =
Xi
N i=1
• Sample mean is itself a
random variable
• Central Limit Theorem:
the probability
distribution tends to
normal as sample size,
N, increases for
virtually all underlying
distributions
• The mean and variance
of X can be calculated
as:
E[ ]= E[X] = 
Var[ ]= 2x/N

Queuing Analysis
35
Related documents