Presentation is loading. Please wait.

Presentation is loading. Please wait.

Queuing Theory For Dummies

Similar presentations


Presentation on theme: "Queuing Theory For Dummies"— Presentation transcript:

1 Queuing Theory For Dummies
Jean-Yves Le Boudec 1

2 All You Need to Know About Queuing Theory
16/04/2017 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 only simple concepts 2

3 1. Deterministic Queuing
16/04/2017 Easy but powerful Applies to deterministic and transient analysis Example: playback buffer sizing 3

4 Use of Cumulative Functions
16/04/2017 4

5 Solution of Playback Delay Pb
16/04/2017 A(t) A’(t) D(t) time bits d(0) d(0) - D d(0) + D (D1): r(t - d(0) + D) (D2): r (t - d(0) - D) d(t) A. 5

6 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

7 Little Again 16/04/2017 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 x NbCust/T ; now NbCust/T is our estimator of  7

8 Other Operational Laws
16/04/2017 8

9 The Interactive User Model
9 9

10 Network Laws 10

11 Bottleneck Analysis Apply the following two bounds Example (1) (2) 17
16/04/2017 Apply the following two bounds Example (1) (2) 17 11

12 Throughput Bounds 16/04/2017 12

13 Bottlenecks 16/04/2017 A 13

14 DASSA Intuition: within one busy period: to every departure we can associate one arrival with same number of customers left behind 14

15 3. Single Server Queue 15

16 i.e. which are event averages (vs time averages ?)
16/04/2017 i.e. which are event averages (vs time averages ?) 16

17 16/04/2017 17

18 16/04/2017 18

19 16/04/2017 19

20 Non Linearity of Response Time
20

21 Impact of Variability 16/04/2017 21

22 Optimal Sharing Compare the two in terms of Response time Capacity 22
16/04/2017 Optimal Sharing Compare the two in terms of Response time Capacity 22

23 The Processor Sharing Queue
Models: processors, network links Insensitivity: whatever the service requirements: Egalitarian 23

24 PS versus FIFO PS FIFO 24

25 4. A Case Study Impact of capacity increase ? Optimal Capacity ? 25

26 Methodology 26

27 4.1. Deterministic Analysis
27

28 Deterministic Analysis
28

29 4.2 Single Queue Analysis Assume no feedback loop: 29

30 4.3 Operational Analysis A refined model, with circulating users
Apply Bottleneck Analysis ( = Operational Analysis ) Z/(N-1) -Z 1/c waiting time 30

31 31

32 32

33 5. Networks of Queues Stability
Queuing networks are frequently used models The stability issue may, in general, be a hard one Necessary condition for stability (Natural Condition) server utilization < at every queue 33

34 Instability Examples Poisson arrivals ; jobs go through stations 1,2,1,2,1 then leave A job arrives as type 1, then becomes 2, then 3 etc Exponential, independent service times with mean mi Priority scheduling Station 1 : 5 > 3 >1 Station 2: 2 > 4 Q: What is the natural stability condition ? A: λ (m1 + m3 + m5 ) < 1 λ (m2 + m4) < 1 34

35 If λ (m1 + … + m5 ) < 1 network is stable; why?
λ = 1 m1 = m3 = m4 = 0.1 m2 = m5 = 0.6 Utilization factors Station 1: 0.8 Station 2: 0.7 Network is unstable ! If λ (m1 + … + m5 ) < 1 network is stable; why? 35

36 Bramson’s Example 1: A Simple FIFO Network
Poisson arrivals; jobs go through stations A, B,B…,B, A then leave Exponential, independent service times Steps 2 and last: mean is L Other steps: mean is S Q: What is the natural stability condition ? A: λ ( L + S ) < 1 λ ( (J-1)S + L ) < 1 Bramson showed: may be unstable whereas natural stability condition holds

37 Bramson’s Example 2 A FIFO Network with Arbitrarily Small Utilization Factor
m queues 2 types of customers λ = 0.5 each type routing as shown, … = 7 visits FIFO Exponential service times, with mean as shown S S L S S L S S L S S L Utilization factor at every station ≤ 4 λ S Network is unstable for S ≤ 0.01 L ≤ S8 m = floor(-2 (log L )/L) 37

38 Take Home Message The natural stability condition is necessary but may not be sufficient There is a class of networks where this never happens. Product Form Queuing Networks 38

39 Product Form Networks Customers have a class attribute
Customers visit stations according to Markov Routing External arrivals, if any, are Poisson 2 Stations Class = step, J+3 classes Can you reduce the number of classes ? 39

40 Chains Customers can switch class, but remain in the same chain ν 40

41 Chains may be open or closed
Open chain = with Poisson arrivals. Customers must eventually leave Closed chain: no arrival, no departure; number of customers is constant Closed network has only closed chains Open network has only open chains Mixed network may have both 41

42 3 Stations 4 classes 1 open chain 1 closed chain ν 42

43 Bramson’s Example 2 A FIFO Network with Arbitrarily Small Utilization Factor
2 Stations Many classes 2 open chains Network is open 43

44 Visit Rates 44

45 Visit rates θ11 = θ13 = θ15 = θ22 = θ24 = λ θsc = 0 otherwise
2 Stations 5 classes 1 chain Network is open Visit rates θ11 = θ13 = θ15 = θ22 = θ24 = λ θsc = 0 otherwise 45

46 ν 46

47 Constraints on Stations
Stations must belong to a restricted catalog of stations See Section 8.4 for full description We will give commonly used examples Example 1: Global Processor Sharing One server Rate of server is shared equally among all customers present Service requirements for customers of class c are drawn iid from a distribution which depends on the class (and the station) Example 2: Delay Infinite number of servers No queuing, service time = service requirement = residence time 47

48 Example 3 : FIFO with B servers
FIFO queueing Service requirements for customers of class c are drawn iid from an exponential distribution, independent of the class (but may depend on the station) Example of Category 2 (MSCCC station): MSCCC with B servers FIFO queueing with constraints At most one customer of each class is allowed in service Examples 1 and 2 are insensitive (service time can be anything) Examples 3 and 4 are not (service time must be exponential, same for all) 48

49 Say which network satisfies the hypotheses for product form
B (FIFO, Exp) C (Prio, Exp) 49

50 The Product Form Theorem
If a network satisfies the « Product Form » conditions given earlier The stationary distrib of numbers of customers can be written explicitly It is a product of terms, where each term depends only on the station Efficient algorithms exist to compute performance metrics for even very large networks For PS and Delay stations, service time distribution does not matter other than through its mean (insensitivity) The natural stability condition holds 50

51 51

52 52

53 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 Queuing networks may be very complex to analyze except if product form – be able to recognize them ! 53


Download ppt "Queuing Theory For Dummies"

Similar presentations


Ads by Google