Queuing Theory For Dummies Jean-Yves Le Boudec 1

advertisement
Queuing Theory
For Dummies
Jean-Yves Le Boudec
1
All You Need to Know About Queuing Theory
Queuing is essential to understand the behaviour of complex computer and
communication systems
In depth analysis of queuing systems is hard
Fortunately, the most important results are easy
We will study this topic in two modules
1. simple concepts (this module)
2. queuing networks (later)
2
1. Deterministic Queuing
Easy but powerful
Applies to deterministic and transient
analysis
Example: playback buffer sizing
3
Use of Cumulative Functions
4
Solution of Playback Delay Pb
bits
A(t)
d(t)
A’(t)
D(t)
time
d(0) - D d(0)
d(0) + D
A.
5
2. Operational Laws
Intuition:
Say every customer pays one Fr per minute present
Payoff per customer = R
Rate at which we receive money = N
In average λ customers per minute, N = λ R
6
Little Again
Consider a simulation where you measure R and N. You use two counters
responseTimeCtr and queueLengthCtr. At end of simulation,
estimate
R = responseTimeCtr / NbCust
N = queueLengthCtr / T
where NbCust = number of customers served and T=simulation duration
Both responseTimeCtr=0 and queueLengthCtr=0 initially
Q: When an arrival or departure event occurs, how are both counters
updated ?
A:
queueLengthCtr += (tnew - told) . q(told) where q(told) is the
number of customers in queue just before the event.
responseTimeCtr += (tnew - told) . q(told)
thus responseTimeCtr == queueLengthCtr and thus
N = R . NbCust/T ; now NbCust/T is our estimator of 
7
Other Operational Laws
8
The Interactive User Model
9
Network Laws
10
Bottleneck Analysis
Apply the following two bounds
 Example
1.
2.
(1)
(2)
17
11
Throughput Bounds
12
Bottlenecks
A
13
DASSA
Intuition: within one busy period: to every departure we can associate one
arrival with same number of customers left behind
14
3. Single Server Queue
15
i.e. which are event averages (vs time averages ?)
16
17
18
19
Non Linearity of Response Time
Mean
Response
Time
in seconds
2.5
2
1.5
1
0.5
Requests
2
4
6
8
per
Second
10
20
Impact of Variability
Mean
Response
Time
14
12
10
8
6
4
2
Utilization
0.2
0.4
0.6
0.8
21
Optimal Sharing
Compare the two in terms of
Response time
Capacity
22
The Processor Sharing Queue
Models: processors, network links
Insensitivity: whatever the service requirements:
Egalitarian
23
PS versus FIFO
PS
FIFO
24
4. A Case Study
Impact of capacity increase ?
Optimal Capacity ?
25
Methodology
26
4.1. Deterministic Analysis
27
Deterministic Analysis
28
4.2 Single Queue Analysis
Assume no feedback loop:
29
4.3 Operational Analysis
A refined model, with circulating users
Apply Bottleneck Analysis ( = Operational Analysis )
waiting time
Z/(N-1)
-Z
1/c
30
31
32
Conclusions
Queuing is essential in communication and information systems
M/M/1, M/GI/1, M/G/1/PS and variants have closed forms
Bottleneck analysis and worst case analysis are usually very simple and
often give good insights
… it remains to see queuing networks
33
Download