Introduction to Markov Chains, Queuing Theory, and Network Performance

Similar documents
Performance Evaluation of Queuing Systems

Introduction to queuing theory

Intro Refresher Reversibility Open networks Closed networks Multiclass networks Other networks. Queuing Networks. Florence Perronnin

Networking = Plumbing. Queueing Analysis: I. Last Lecture. Lecture Outline. Jeremiah Deng. 29 July 2013

Queueing Theory I Summary! Little s Law! Queueing System Notation! Stationary Analysis of Elementary Queueing Systems " M/M/1 " M/M/m " M/M/1/K "

Lecture 20: Reversible Processes and Queues

Data analysis and stochastic modeling

QUEUING SYSTEM. Yetunde Folajimi, PhD

Non Markovian Queues (contd.)

Part I Stochastic variables and Markov chains

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

Queueing Theory II. Summary. ! M/M/1 Output process. ! Networks of Queue! Method of Stages. ! General Distributions

Lecture 7: Simulation of Markov Processes. Pasi Lassila Department of Communications and Networking

Performance Modelling of Computer Systems

Buzen s algorithm. Cyclic network Extension of Jackson networks

Introduction to queuing theory

Queueing. Chapter Continuous Time Markov Chains 2 CHAPTER 5. QUEUEING

Chapter 10. Queuing Systems. D (Queuing Theory) Queuing theory is the branch of operations research concerned with waiting lines.

GI/M/1 and GI/M/m queuing systems

Markov processes and queueing networks

BIRTH DEATH PROCESSES AND QUEUEING SYSTEMS

Advanced Computer Networks Lecture 3. Models of Queuing

Stochastic process. X, a series of random variables indexed by t

Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem. Wade Trappe

Link Models for Packet Switching

Queueing Review. Christos Alexopoulos and Dave Goldsman 10/6/16. (mostly from BCNN) Georgia Institute of Technology, Atlanta, GA, USA

NICTA Short Course. Network Analysis. Vijay Sivaraman. Day 1 Queueing Systems and Markov Chains. Network Analysis, 2008s2 1-1

Queuing Theory. Using the Math. Management Science

Performance analysis of queueing systems with resequencing

Part II: continuous time Markov chain (CTMC)

MARKOV PROCESSES. Valerio Di Valerio

Classification of Queuing Models

Review of Queuing Models

M/G/1 and M/G/1/K systems

Queueing Theory. VK Room: M Last updated: October 17, 2013.

Class 11 Non-Parametric Models of a Service System; GI/GI/1, GI/GI/n: Exact & Approximate Analysis.

IEOR 6711, HMWK 5, Professor Sigman

Continuous Time Processes

Chapter 1. Introduction. 1.1 Stochastic process

Link Models for Circuit Switching

Chapter 2 Queueing Theory and Simulation

P (L d k = n). P (L(t) = n),

Statistics 150: Spring 2007

PBW 654 Applied Statistics - I Urban Operations Research

Figure 10.1: Recording when the event E occurs

Solutions to Homework Discrete Stochastic Processes MIT, Spring 2011

Queueing Review. Christos Alexopoulos and Dave Goldsman 10/25/17. (mostly from BCNN) Georgia Institute of Technology, Atlanta, GA, USA

Queues and Queueing Networks

Markov Processes and Queues

CHAPTER 4. Networks of queues. 1. Open networks Suppose that we have a network of queues as given in Figure 4.1. Arrivals

reversed chain is ergodic and has the same equilibrium probabilities (check that π j =

Computer Networks More general queuing systems

Queueing Networks and Insensitivity

CDA5530: Performance Models of Computers and Networks. Chapter 4: Elementary Queuing Theory

Kendall notation. PASTA theorem Basics of M/M/1 queue

Classical Queueing Models.

Queueing Theory and Simulation. Introduction

Queuing Theory. Richard Lockhart. Simon Fraser University. STAT 870 Summer 2011

Irreducibility. Irreducible. every state can be reached from every other state For any i,j, exist an m 0, such that. Absorbing state: p jj =1

Control of Fork-Join Networks in Heavy-Traffic

Systems Simulation Chapter 6: Queuing Models

TCOM 501: Networking Theory & Fundamentals. Lecture 6 February 19, 2003 Prof. Yannis A. Korilis

All models are wrong / inaccurate, but some are useful. George Box (Wikipedia). wkc/course/part2.pdf

IEOR 6711: Stochastic Models I, Fall 2003, Professor Whitt. Solutions to Final Exam: Thursday, December 18.

Introduction to Queueing Theory

Introduction to Queuing Theory. Mathematical Modelling

Introduction to Queueing Theory

Introduction to Queueing Theory

2905 Queueing Theory and Simulation PART III: HIGHER DIMENSIONAL AND NON-MARKOVIAN QUEUES

Chapter 5: Special Types of Queuing Models

Computer Systems Modelling

HITTING TIME IN AN ERLANG LOSS SYSTEM

CS418 Operating Systems

1 IEOR 4701: Continuous-Time Markov Chains

CS 798: Homework Assignment 3 (Queueing Theory)

Outline. Finite source queue M/M/c//K Queues with impatience (balking, reneging, jockeying, retrial) Transient behavior Advanced Queue.

Waiting Line Models: Queuing Theory Basics. Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1

Continuous-Time Markov Chain

Intro to Queueing Theory

Chapter 2. Poisson Processes. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

Slides 9: Queuing Models

Chapter 5. Continuous-Time Markov Chains. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

Efficient Nonlinear Optimizations of Queuing Systems

λ λ λ In-class problems

Markov Chains. X(t) is a Markov Process if, for arbitrary times t 1 < t 2 <... < t k < t k+1. If X(t) is discrete-valued. If X(t) is continuous-valued

Elementary queueing system

Bulk input queue M [X] /M/1 Bulk service queue M/M [Y] /1 Erlangian queue M/E k /1

QUEUING MODELS AND MARKOV PROCESSES

NEW FRONTIERS IN APPLIED PROBABILITY

Queueing Networks G. Rubino INRIA / IRISA, Rennes, France

Queuing Theory. Queuing Theory. Fatih Cavdur April 27, 2015

Basic Queueing Theory

6 Solving Queueing Models

Birth-Death Processes

Time Reversibility and Burke s Theorem

Contents Preface The Exponential Distribution and the Poisson Process Introduction to Renewal Theory

Other properties of M M 1

Little s result. T = average sojourn time (time spent) in the system N = average number of customers in the system. Little s result says that

MAT SYS 5120 (Winter 2012) Assignment 5 (not to be submitted) There are 4 questions.

Transcription:

Introduction to Markov Chains, Queuing Theory, and Network Performance Marceau Coupechoux Telecom ParisTech, departement Informatique et Réseaux marceau.coupechoux@telecom-paristech.fr IT.2403 Modélisation et Performance des Réseaux February 8, 2011

Outlines 51 1. Network Performance 2. Mathematical Background 3. Markov Chains 4. Formalism of Queuing Theory 5. Simple Queues 6. Erlang B and C laws 7. Networks of Queues

Formalism of Queuing Theory 52 1. Arrival process and service time 2. Buffer mechanism 3. Kendall notation 4. Multi-class queues 5. Networks of queues 6. Performance parameters 7. Stability 8. Little law 9. Distributions at arrival and departure instants

Formalism of Queuing Theory 53 Simple Queue Arrivals Arrival process Buffer Server Departure of customers How do customers arrive? Example: the inter-arrival times are constant Simple case: the inter-arrival times between customers are iid random variables Poisson arrivals: inter-arrival times are exponentially distributed

Formalism of Queuing Theory 54 Simple Queue Service time Arrival process Buffer Server Departure of customers How are customers served? Are there more than one server? How much time will the service take (service time distribution)? Simple case: service times are iid random variables Exponential service: service time is exponentially distributed

Formalism of Queuing Theory 55 Simple Queue Buffer mechanism Arrival process Buffer Server Departure of customers How customers are stacked in the buffer and how customers are taken out of the buffer by the server FIFO: first in first out = FCFS : first come first served LIFO: last in first out RANDOM Round Robin: cyclic mechanism etc

Formalism of Queuing Theory 56 Simple Queue Kendall notation Arrival process Buffer Server Departure of customers Queue A/B/C/K/m/Z A: inter-arrival distribution B: service distribution C: number of servers K: buffer capacity (default ) m: customer population (default ) Z: buffer mechanism (default FIFO)

Formalism of Queuing Theory 57 Simple Queue Arrival process A and B distributions can be : Buffer Server Departure of customers M: exponential G: generic D: constant E k : Erlang-k H k : Hyperexponential-k C k : Cox-k etc

Formalism of Queuing Theory 58 Multi-class queues Customers of different classes can experience different arrival process, or service times... Arrival process 1 Service distribution 1 Arrival process 2 Service distribution 2

Formalism of Queuing Theory 59 Network of queues Several connected simple queues Open networks: customers can leave the system and are coming from the outside p01 p02 p12 1 2 p13 p23 3 p20 Closed networks: finite population, customers can t leave the system 1 3 2

Formalism of Queuing Theory 60 Packet network Is modeled by a network of queues A network node: arrival buffer + processing time + sending buffers A transmission link: transmission time + propagation time Sending buffer... Reception buffer Transmission Propagation Processing...

Formalism of Queuing Theory 61 Performance parameters N(t) R1 Queuing System R2 Xe Arrivals Q R Xs Departures 0 A1 D1 A2 D2 T t A k : arrival instant of the kth customer in the system D k : departure instant of the kth customer in the system R k = D k A k : time spent in the system by the kth customer T (n, T ): time during which the system has n customers : n=0 T (n, T ) = T A(T )/D(T ): number of arrivals/departures in [0; T ]

Formalism of Queuing Theory 62 Performance parameters Input load: X e (T ) = A(T )/T Throughput: X s (T ) = D(T )/T Mean number of customers: Q(T ) = 1 T n=0 nt (n, T ) Mean time spent in the system: R(T ) = 1 A(T ) A(T ) k=1 R k Utilization ratio: U(T ) = 1 T (0, T )/T

Formalism of Queuing Theory 63 Stability A system is stable iff the input load equals the throughput in the stationary regime i.e. lim T X e (T ) = lim T X s (T ) or lim T D(T ) A(T ) = 1 A mono-class open networks of queues is stable iff all queues of the network are stable A finite population system is always stable

Formalism of Queuing Theory 64 Little law For a stable system in stationary regime : Q = RX l Q X Q=RX=Rl R l Qw X Qw=WX=Wl l W Qs X Qs=U=SX=Sl S

Formalism of Queuing Theory 65 Distributions at arrival and departure instants A(n, T ): number of customers who find n customers in the system at their arrival D(n, T ): number of customers who leave n customers in the system at their departure P (n, T ) = T (n, T )/T : system proportion of time during which there are n customers in the P a (n, T ) = A(n, T )/A(T ): proportion of clients that find n customers in the system P d (n, T ) = D(n, T )/D(T ): proportion of clients that leave n customers in the system p(n) = lim T P (n, T ): stationary probability to have n customers in the system p a (n) = lim T P a (n, T ): stationary probability for a client to find n customers p d (n) = lim T P d (n, T ): stationary probability for a client to leave n customers

Formalism of Queuing Theory 66 Properties In a (stable and ergodic) system where customers arrive or leave one by one: p a (n) = p d (n) In a system with Poisson arrivals: p a (n) = p(n)

Simple Queues 67 1. M/M/1 (a) Definition (b) Associated CTMC (c) Stability (d) Analysis 2. M/M/1/K (a) Definition (b) Associated CTMC (c) Stability (d) Analysis 3. Markovian queues

Simple Queues 68 M/M/1, Definition Infinite capacity A single server Poisson arrivals of rate λ Exponential service time of rate µ

Simple Queues 69 M/M/1, Associated DTMC Generic method: Find the right state description stochastic process analysis performance parameters What is a right state description? The knowledge of the present state is sufficient to predict the evolution of the system = the generated stochastic process is a Markov chain State description for the M/M/1: {n(t)} t 0

Simple Queues 70 M/M/1, Associated DTMC Stochastic process with discrete state space and continuous time Memoryless property of the service time: it is not necessary to know for how long time the service has started to predict the remaining service time Memoryless property of the inter-arrival law: it is not necessary to know when the last customer arrived to predict the arrival of the next one

Simple Queues 71 M/M/1, Stability Stability condition: λ < µ ρ = λ µ < 1 ρ is referred to as the traffic intensity

Simple Queues 72 M/M/1, Analysis We assume that the system is stable Three methods to derive the stationary (or steady-state) probabilities: (1) Solve pq = 0 and n=0 p(n) = 1 (2) Solve the state equations: for each state, input flow=output flow (3) Solve the border equations

Simple Queues 73 M/M/1, Analysis pq = 0 Q = λ λ 0......... µ (λ + µ) λ 0...... 0 µ (λ + µ) λ 0...... 0 µ (λ + µ) λ 0...... 0 µ (λ + µ) λ......... 0 µ...

Simple Queues 74 M/M/1, Analysis state equations: input flow=output flow p(0)λ = p(1)µ p(1)(λ + µ) = p(0)λ + p(2)µ... p(n)(λ + µ) = p(n 1)λ + p(n + 1)µ for all n 1

Simple Queues 75 border equations: p(0)λ = p(1)µ p(1)λ = p(2)µ... p(n)λ = p(n + 1)µ for all n 0 p(n) = ρp(n 1) p(n) = ρ n p(0)

Simple Queues 76 border equations: p(0)λ = p(1)µ p(1)λ = p(2)µ... p(n)λ = p(n + 1)µ for all n 0 Normalization : p(0) = 1 n=0 ρ n = 1 ρ Thus, for ρ < 1, n 0 p(n) = (1 ρ)ρ n

Simple Queues 77 M/M/1, Performance parameters Throughput: X = P roba[queue non empty]µ = n=1 p(n)µ = ρµ = λ Server utilization: U = 1 p(0) = ρ = λ µ Average number of customers: Q = n=1 np(n) = ρ 1 ρ Average time spent by a customer in the system (Little law): R = Q X = 1 µ(1 ρ) = 1 µ + ρ µ(1 ρ)

Simple Queues 78 M/M/1, Performance parameters Q and R:

Simple Queues 79 M/M/1/K, Definition The system (buffer and server) is limited to K customers A single server Poisson arrivals of rate λ Exponential service time of rate µ

Simple Queues 80 M/M/1/K, Associated CTMC State description: {n(t)} t 0 Stochastic process with continuous time and discrete state space At a given time, when there is 0 < n(t) < K customers in the system, both inter-arrival and service times are memoryless

Simple Queues 81 M/M/1/K, Stability The system is limited the system is always stable

Simple Queues 82 M/M/1/K, Analysis Border equations: n, 1 n K, p(n 1)λ = p(n)µ n, 1 n K, p(n) = ρp(n 1) n, 0 n K, p(n) = ρ n p(0) Normalization: p(0) = 1 Kn=0 ρ n = 1 ρ 1 ρ K+1

Simple Queues 83 M/M/1/K, Performance parameters Throughput X: two methods (1) Departure rate from the server: X s = P roba[queue not empty]µ = (1 p(0))µ = ρ ρk+1 1 ρ K+1µ

Simple Queues 84 M/M/1/K, Performance parameters Throughput X: two methods (2) Arrivals in the system (not lost): X e = P roba[queue not full when a customer arrives]λ = = K 1 n=0 K 1 n=0 p a (n)λ p(n)λ = 1 ρk 1 ρ K+1λ

Simple Queues 85 M/M/1/K, Performance parameters Server utilization U: U = 1 p(0) = ρ 1 ρk 1 ρ K+1 Average number of customers Q: Q = K n=0 np(n) = ρ 1 ρ 1 (K + 1)ρK + Kρ K+1 1 ρ K+1

Simple Queues 86 M/M/1/K, Performance parameters Average time spent by a customers in the system: 2 possible parameters (1) Time spent by a customers admitted in the system: R = Q/X (2) Time spent by all customers trying to enter the system: R T = Q/λ

Simple Queues 87 Markovian queues, Definition Infinite buffer A single server Inter-arrival and service times law are memoryless and depends on the number of customers in the system When there are n customers in the system at a given time instant: - the arrival time of the next customer follows an exponential law of rate λ(n) - the service time follows an exponential law of rate µ(n)

Simple Queues 88 Markovian queues, Associated CTMC State description: {n(t)} t 0 Stochastic process with continuous time and discrete state space

Simple Queues 89 Markovian queues, Stability Stability condition: p(0) > 0 1 1 + n=1 ( nk=1 λ(k 1) µ(k) n=1 n k=1 ) > 0 λ(k 1) < µ(k)

Simple Queues 90 Markovian queues, Analysis Border equations: n > 0, p(n 1)λ(n 1) = p(n)µ(n) p(n) = n k=1 λ(k 1) p(0) µ(k) Normalization: p(0) = 1 1 + n=1 ( nk=1 λ(k 1) µ(k) )

Simple Queues 91 Markovian queues, Performance parameters Throughput X: 2 methods (1) At the exit of the system: X = n=1 p(n)µ(n) (2) At the entrance of the system: X = n=0 p a (n)λ(n) = n=0 p(n)λ(n) Average number of customers in the system Q: Q = n=1 np(n) Average time spent by a customer in the system R: R = Q/X

Erlang B and C laws 92 Telephonic traffic N junctions/time slots Switch Base station Main issue: (QoS) find the right number of servers associated to a given quality of service Traffic a of a server (ITU-T E-100) : average proportion of occupation time of the server (t is the occupation time between 0 and T, T is the observation time) : a = t T a is in Erlangs US : Cent Call Second (CCS) is the occupation of a machine during 100s per hour 1CCS = 100/3600 = 1/36Erlangs

Erlang B and C laws 93 Telephonic traffic ML M1... T Traffic of a group of L servers: A = i t Mi T LErlangs Identical servers, with n: mean number of occupation periods in T and τ: mean occupation time of a server: A = nτ T Ergodicity: statistics of the group at a given time and statistics of a given server in time are equal with x: mean number of occupied servers at a given time and the ergodicity property: x L = a

Erlang B and C laws 94 Erlang B model, assumptions We consider S servers serving phone calls Calls arrive according to a Poisson law of rate λ, λ does not depend on the number of occupied servers (infinite population assumption) Calls that cannot be served are lost Service time is distributed according to a decreasing exponential law of rate µ

Erlang B and C laws 95 Erlang B, markov chain The system is modeled with a M/M/S/S. Stationary probabilities are given by : p(n) = ρ n /n!p(0) and p(0) = S k=0 ρ k /k! 1 with ρ = λ/µ Blocking probability is given by : P b = p(s) = ρs /S! Sk=0 ρ k k!

Erlang B and C laws 96 Erlang B law is not linear:

Erlang B and C laws 97 Erlang B law is not linear:

Erlang B and C laws 98 A recursive definition of the blocking probability: P b (S + 1) = ρp b (S) S + 1 + ρp b (S). An approximation of the inverse of the Erlang B law (Claude Rigault ENST) : If E 1,S (A) = ɛ = 10 k then S A + k A Example: consider a traffic of A = 100 Erlangs What is the number of junctions to install in order that the probability of lost call is less than ɛ = 10 4? N 140 servers

Erlang B and C laws 99 Erlang C model, assumptions We consider S servers serving phone calls Calls arrive according to a Poisson law of rate λ, λ does not depend on the number of occupied servers (infinite population assumption) Calls that cannot be served are put in an infinite buffer, discipline is FIFO Service time is distributed according to a decreasing exponential law of rate µ

Erlang B and C laws 100 Erlang C, markov chain The system is modeled with a M/M/S/. Stationary probabilities are given by : p(n) = ρ n /n!p(0) for 0 n S 1, p(n) = ρ n /(S!S n S )p(0) for n S, p(0) = S 1 k=0 ρ k /k! + ρs /S! 1 ρ/s 1 with ρ = λ/µ

Erlang B and C laws 101 Erlang C, waiting probability P w = n S = n S = ρs S! = p(n) ρ S ρ n S p(0) S! Sn S S S ρ p(0) ρ S S! S S ρ S 1 k=0 ρk /k! + ρs /S! 1 ρ/s.

Erlang B and C laws 102 Erlang C, some useful results Mean number of customers: ρ/s Q = P w 1 ρ/s Mean waiting time W = P w λ ρ/s 1 ρ/s Distribution of the waiting time: P [T > t] = P w exp( Sµt(1 ρ/s))

Erlang B and C laws 103 Erlang C law is not linear:

Networks of Queues 104 1. Definition of the Jackson networks 2. Stability 3. Visit rates 4. Analysis and Jackson theorem 5. Performance parameters

Networks of Queues 105 Definition of the Jackson networks Open network M stations A single class of customers Poisson arrivals of rate λ For each station: a single server, an unlimited FIFO buffer, an exponential service time of rate µ i Probabilistic routing: p 0i =probability that a customers arriving in the network goes to station i; p ij =probability that a customer leaving station i goes to station j; p i0 =probability that a customer leaving station i goes out of the system i, 0 i M, M j=0 p ij = 1

Networks of Queues 106 Example of Jackson network

Networks of Queues 107 Stability Let e i the average number of times that a customer visits station i during its journey in the system e i is the visit rate of station i Arrival rate of customers in the network: λ Arrival rate of customers in station i: λ i = e i λ Stability condition: i = 1,..., M, λ i < µ i

Networks of Queues 108 Visit rates The traffic λ i at station i is made of : (1) the outside traffic: λp 0i (2) the traffic coming from station j: λ j p ji for all stations j = 1,..., M λ i = λp 0i + M j=1 λ j p ji With λ i = e i λ: e i = p 0i + M j=1 e j p ji

Networks of Queues 109 Analysis State description: {n(t) = [n 1 (t),..., n M (t)]} Stochastic process with continuous time and discrete state space At a given instant, there is n i (t) customers in station i - arrivals are Poisson memoryless - service times are exponential memoryless - routing is probabilistic memoryless

Networks of Queues 110 Jackson theorem For a stable Jackson network: p(n) = M i=1 p i (n i ) p i (n i ) is the steady-state probability of a M/M/1 with arrival rate λ i and service rate µ i p i (n i ) = (1 ρ i )ρ n i i with ρ i = λ i /µ i

Networks of Queues 111 Performance parameters For station i: X i = λ i Q i = ρ i 1 ρ i R i = Q i X i = 1 µ i λ i U i = ρ i For the network: X = λ Q = M Q i i=1 R = Q X = Q λ = M i=1 Q i M λ = Q e i i = i=1 λ i M i=1 e i R i