Queuing Networks Florence Perronnin Polytech Grenoble - UGA March 23, 27 F. Perronnin (UGA) Queuing Networks March 23, 27 / 46
Outline Introduction to Queuing Networks 2 Refresher: M/M/ queue 3 Reversibility 4 Open Queueing Networks 5 Closed queueing networks 6 Multiclass networks 7 Other product-form networks F. Perronnin (UGA) Queuing Networks March 23, 27 2 / 46
Introduction to Queuing Networks Single queues have simple results They are quite robust to slight model variations We may have multiple contention resources to model: servers communication links databases with various routing structures. Queuing networks are direct results for interaction of classical single queues with probabilistic or static routing. F. Perronnin (UGA) Queuing Networks March 23, 27 3 / 46
Outline Introduction to Queuing Networks 2 Refresher: M/M/ queue 3 Reversibility 4 Open Queueing Networks 5 Closed queueing networks 6 Multiclass networks 7 Other product-form networks F. Perronnin (UGA) Queuing Networks March 23, 27 4 / 46
Refresher: M/M/ Infinite capacity λ µ Poisson(λ) arrivals Exp(µ) service times M/M/ queue FIFO discipline Definition ρ = λ µ is the traffic intensity of the queueing system. λ λ λ λ λ λ i...... i i+ µ µ µ µ µ µ Number of clients X (t) in the system follows a birth and death process. F. Perronnin (UGA) Queuing Networks March 23, 27 5 / 46
Results for M/M/ queue Stable if and only if ρ < 2 Clients follow a geometric distribution i N, π i = ( ρ)ρ i 3 Mean number of clients E [X ] = ρ ( ρ) 4 Average response time E [T ] = µ λ response time response time M/M/ 9 8 7 6 5 4 3 2.2.4.6.8 traffic load F. Perronnin (UGA) Queuing Networks March 23, 27 6 / 46
M/M//K In reality, buffers are finite: M/M//K is a queueing system with blocking. λ µ K λ λ λ λ K... K µ µ µ µ Results for M/M//K queue Geometric distribution with finite state space π(i) = ( ρ)ρi ρ K+ F. Perronnin (UGA) Queuing Networks March 23, 27 7 / 46
M/M/c µ λ 2. µ λ λ λ λ i c c... c iµ cµ cµ cµ c µ Results for M/M/c queue Stability condition λ < cµ. π(i) = { ρ C i ρ,c ( C ρ ρ,c c! c i! if i c ) i if i > c where ρ = λ µ C ρ,c = and with c i= ρ i i! + ρc c! ρ/c F. Perronnin (UGA) Queuing Networks March 23, 27 8 / 46
F. Perronnin (UGA) Queuing Networks March 23, 27 9 / 46
Outline Introduction to Queuing Networks 2 Refresher: M/M/ queue 3 Reversibility 4 Open Queueing Networks 5 Closed queueing networks 6 Multiclass networks 7 Other product-form networks F. Perronnin (UGA) Queuing Networks March 23, 27 / 46
Reversibility Definition A continuous-time Markov chain X (t) is time-reversible if and only if there exist a probability distribution π such that (i, j) E 2, π i q ij = π j q ji Theorem the π distribution is also the stationary distribution. Proof Check the balance equations. F. Perronnin (UGA) Queuing Networks March 23, 27 / 46
Reversibility Proposition An ergodic birth and death process is time-reversible. Proof λ λ λ i 2 λ i λ i λ i+ i...... i i+ µ i µ µ 2 µ i+ µ i µ i+2 By induction: π λ = π µ 2 Suppose π i λ i = π i µ i. Then π i (λ i + µ i ) = π i+ µ i+ + π i λ i Which gives π i λ i = π i+ µ i+. F. Perronnin (UGA) Queuing Networks March 23, 27 2 / 46
Burke s theorem Theorem The output process of an M/M/s queue is a Poisson process that is independent of the number of customers in the queue. Sketch of Proof. λ i i+ X (t) increases by at rate λπ i (Poisson process λ). Reverse process increases by at rate µπ i+ = λπ i by reversibility. µ F. Perronnin (UGA) Queuing Networks March 23, 27 3 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Outline Introduction to Queuing Networks 2 Refresher: M/M/ queue 3 Reversibility 4 Open Queueing Networks Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues 5 Closed queueing networks 6 Multiclass networks 7 F. Perronnin (UGA) Queuing Networks March 23, 27 4 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Tandem queues λ µ µ 2 Let X and X 2 denote the number of clients in queues and 2 respectively. Lemma X and X 2 are independent rv s. Proof Arrival process at queue is Poisson(λ) so future arrivals are independent of X (t). By time reversibility X (t) is independent of past departures. Since these departures are the arrival process of queue 2, X (t) and X 2 (t) are independent. F. Perronnin (UGA) Queuing Networks March 23, 27 5 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Tandem queues Theorem The number of clients at server and 2 are independent and ( ) λ n ) ( ) P(n, n 2 ) = ( λµ n2 ) ( λµ2 λµ µ Proof By independence of X and X 2 the joint probability is the product of M/M/ distributions. This result is called a product-form result for the tandem queue. This product form also appears in more general networks of queues. F. Perronnin (UGA) Queuing Networks March 23, 27 6 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Acyclic networks Example of a feed-forward network: λ i λ j µ i µ j Exponential service times p i p j output of i is routed to j with probability p ij external traffic arrives at i with rate λ i packets exiting queue i leave the system with probability p i. p jk p ik p il p jl λ l λ k µ k µ l Routing matrix: R = p l p k p ij p ik p il p ji p jk p jl p ki p kj p jl p li p lj p lk F. Perronnin (UGA) Queuing Networks March 23, 27 7 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Decomposition of a Poisson Process Problem N(t) Poisson process with rate λ Z(n) sequence of iid rv s Bernoulli(p) independent of N. Suppose the nth trial is performed at the nth arrival of the Poisson process. Result Resulting process M(t) of successes is Poisson(λp). Process of failures L(t) is Poisson ( λ( p) ) and is independent of M(t). Poisson(λ) p Bernoulli p Poisson(λ( p)) Poisson(λp) F. Perronnin (UGA) Queuing Networks March 23, 27 8 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Acyclic networks Total arrival rate at node i: λ i ( i K). No feedback: using Burke theorem, all internal flows are Poisson! Thus we can consider K independent M/M/ queues with Poisson arrivals with rate λ i, where K λ i = λ i + λ j p ji i.e. Λ = Λ + ΛR in matrix notation. j= λ i λ j µi µj pi pj pjk pik pjl pil λ l λ k µk µl pl pk Stability condition All queues must be stable independently: λ i < µ i, i =, 2,..., K. F. Perronnin (UGA) Queuing Networks March 23, 27 9 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Backfeeding Example Switch transmitting frames with random errors. A NACK is sent instantaneously if the frame is incorrect. Frame success probability is p. Arrivals Poisson(λ ) Frame transmission times Exp (µ) λ p µ p F. Perronnin (UGA) Queuing Networks March 23, 27 2 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Backfeeding λ p µ p Remark Arrivals are not Poisson anymore! Result The departure process is still Poisson with rate λp. Proof in [Walrand, An Introduction to Queueing Networks, 988]. F. Perronnin (UGA) Queuing Networks March 23, 27 2 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Backfeeding: steady-state Balance equations: λ p π()λ = µpπ() p µ π(n)(λ + pµ) = λ π(n ) + µpπ(n + ), n > Actual arrival rate λ = λ + ( p)λ, so λ = λp which gives π()λ = µπ() π(n)(λ + µ) = λπ(n ) + µπ(n + ), n > M/M/! The unique solution is: ( π(n) = λ ) ( ) λ n = µ µ ( λ pµ ) ( λ pµ ) n F. Perronnin (UGA) Queuing Networks March 23, 27 22 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Jackson networks: example p ji λ i λ j p ii µ i µ j p i p jl p il λ k p ik p jk λ l µ k µ l p l p k pjj p j p lj Backfeeding allowed. F. Perronnin (UGA) Queuing Networks March 23, 27 23 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Jackson networks Theorem (Jackson, 957) If λ i < µ i (stability condition), i =, 2,... K then π( n) = K i= ( λ ) ( ) ni i λi n = (n,..., n K ) N K. µ i µ i where λ,..., λ K are the unique solution of the system λ i = λ i + Product form even with backfeeding! K λ j p ji j= F. Perronnin (UGA) Queuing Networks March 23, 27 24 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Jackson networks: sketch of proof Derive balance equations: ( K ) K π( n) λ i + [ni >]µ i i= i= Then check that π( n) = K i= equations with λ i = λ i + K j= λ jp ji. = K [ni >]λ i π( n e i ) i= + + K p i µ i π( n + e i ) i= K i= j= K [nj >] p ijµ i π( n + e i e j ) ( λ ) ( ) ni i λi satisfies the balance µ i µ i F. Perronnin (UGA) Queuing Networks March 23, 27 25 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Jackson networks: example Example Switches transmitting frames with random errors. server server 2 server K λ µ µ... µ p p Traffic equations give λ i = λ i for i 2 and λ = λ + ( p)λ K.The unique solution is clearly λ i = λ p for i K. Apply Jackson s theorem: ) K ( ) π( n) = ( λ λ n +...+n K n = (n,..., n K ) N K. pµ pµ F. Perronnin (UGA) Queuing Networks March 23, 27 26 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Jackson networks: example (Continued) Example Switches transmitting frames with random errors. server server 2 server K λ µ µ... µ p p Using M/M/ results for each queue we get the mean number of frames at each queue E [X i ] = λ pµ λ The expected transmission time of a frame is therefore (Little) E [T ] = λ E[X ] = λ K i= E [X i ] = K pµ λ F. Perronnin (UGA) Queuing Networks March 23, 27 27 / 46
Tandem queues Acyclic networks Backfeeding Jackson networks Open networks of M/M/c queues Networks of M/M/c queues Theorem Consider an open network of K M/M/c i queues. Let µ i (n) = µ i min(n, c i ) and ρ i = µ i λ i. Then if ρ i < c i for all i K then π( n) = K ( C i i= ni λ n i i m= µ i(m) ) n = (n,..., n K ) N K where (λ,..., λ K ) is the unique positive solution of the traffic equations λ i = λ i + K λ j p ji, and where C i = j= ( ci m= ρ i i! + ρ ci i c i!( ρ i /c i ) ) F. Perronnin (UGA) Queuing Networks March 23, 27 28 / 46
Outline Introduction to Queuing Networks 2 Refresher: M/M/ queue 3 Reversibility 4 Open Queueing Networks 5 Closed queueing networks 6 Multiclass networks 7 Other product-form networks F. Perronnin (UGA) Queuing Networks March 23, 27 29 / 46
Closed Queueing Networks Definition A closed system is a system in which the number of clients is a constant variable. Example µ 2 µ The traffic equations are linearly dependent! λ i = K λ j p ji, j= i K Therefore the previous Jackson theorem cannot be applied and does not yield the correct result. F. Perronnin (UGA) Queuing Networks March 23, 27 3 / 46
Jackson theorem for closed networks Consider a closed queueing system with K queues and N clients. Define by S(N, K) the set of vectors n = (n,... n k ) N K such that n +... + n K = N. Theorem (Closed Jackson networks) Let (λ,..., λ K ) be an arbitrary non-zero solution of the traffic equation λ i = K j= λ jp ji, i K. Then for all n S(N, K), π( n) = C(N, K) K i= ( λi µ i ) ni, C(N, K) = K n S(N,K) i= ( ) ni λi µ i Not a product-form! F. Perronnin (UGA) Queuing Networks March 23, 27 3 / 46
Performance indexes A typical performance metric is the expected queue length E [X i ] at node i. Expected queue length N ( ) k E λi C(N k, K) [X i ] = C(N, K) k= µ i Sketch of Proof: For a N valued r.v we have: E [X i ] = k P(X i k) P(X i k) = = n S(N,K),n i k ( λi µ i π( n) = ) k C(N k, K) C(N, K) n S(N,K),n i k... () F. Perronnin (UGA) Queuing Networks March 23, 27 32 / 46
Performance indexes One may also be interested in the utilization at node i, i.e. the probability that node i is non-empty. Utilization U i = P(X i = ) = λ i C(N K, K) µ i C(N, K) Proof Note that P(X i = k) = P(X i k) P(X i k ) and apply () with k =. F. Perronnin (UGA) Queuing Networks March 23, 27 33 / 46
Convolution algorithm Computing the normalization factor C(N, K) is a heavy task! C(n, k) = k n S(n,k) i= ( λi µ i ) ni = = n m= n m= n S(n, k) n k = m ( λk µ k k i= ) m ( ) ni λi µ i k n S(n m,k ) i= ( ) ni λi µ i Convolution algorithm (Buzen,973) n C(n, k) = m= ( λk µ k ) m C(k m, k ) and { C(n, ) = ( ) n λ µ C(, k) =, i K F. Perronnin (UGA) Queuing Networks March 23, 27 34 / 46
Outline Introduction to Queuing Networks 2 Refresher: M/M/ queue 3 Reversibility 4 Open Queueing Networks 5 Closed queueing networks 6 Multiclass networks 7 Other product-form networks F. Perronnin (UGA) Queuing Networks March 23, 27 35 / 46
Multiclass Networks Definition µ l µ k µ i µ j λ i, p (i,) p (k,) λ j, p (i,) (k,) p (l,2) p (j,2) (l,2) p (l,2) (j,2) p (j,) (l,2) p (i,) (l,2) p (j,2) (i,) F. Perronnin (UGA) Queuing Networks March 23, 27 36 / 46
Multiclass Networks Definition K < nodes and R < classes Customer at node i in class r will go to node j with class s with probability p (i,r);(j,s) (i, r) and (j, s) belong to the same subchain if p (i,r);(j,s) > FIFO discipline and exponential service times Definition A subchain is open iff there exist one pair (i, r) for which λ (i,r) >. Definition A mixed system contains at least one open subchain and one closed subchain. F. Perronnin (UGA) Queuing Networks March 23, 27 37 / 46
Multiclass Networks Definition The state of a multiclass network may be characterized by the number of customers of each class at each node Q(t) = ( Q (t), Q 2 (t),..., Q K (t)) with Q i (t) = (Q i (t)),..., Q ir(t) ) Problem Q(t) is not a CMTC! To see why, consider the FIFO discipline: how do you know the class of the next customer? F. Perronnin (UGA) Queuing Networks March 23, 27 38 / 46
Multiclass Networks Definition Define X i (t) = (I i (t),..., I iqi (t)(t)) with I ij (t) the class of the jth customer at node i. Proposition X (t) is a CMTC! Solving the balance equations for X gives a product-form solution. The steady-state distribution of X (t) also gives the distribution of Q(t) by aggregation of states. F. Perronnin (UGA) Queuing Networks March 23, 27 39 / 46
BCMP networks Outline Introduction to Queuing Networks 2 Refresher: M/M/ queue 3 Reversibility 4 Open Queueing Networks 5 Closed queueing networks 6 Multiclass networks 7 Other product-form networks Other service disciplines BCMP networks F. Perronnin (UGA) Queuing Networks March 23, 27 4 / 46
BCMP networks Other queueing networks Limitations of Jackson networks Jackson networks imply FIFO discipline probabilistic routing These assumptions can be relaxed using BCMP and Kelly networks. F. Perronnin (UGA) Queuing Networks March 23, 27 4 / 46
BCMP networks BCMP networks [Baskett, Chandy, Muntz and Palacios 975] Definition BCMP networks are multiclass networks with exponential service times and c i servers at node i. Service disciplines may be: FCFS Processor Sharing Infinite Server LCFS BCMP networks also have product-form solution! F. Perronnin (UGA) Queuing Networks March 23, 27 42 / 46
BCMP networks BCMP networks Definitions Consider an open/closed/mixed BCMP network with K nodes and R classes in which each node is either FIFO,PS,LIFO or IS. Define ρ ir = λ ir µ ir for LIFO, IS and PS nodes ρ ir = λ ir µ i for FIFO nodes λ ir = λ ir + λ js p (i,r);(j,s) for any (i, r) of each open subchain E k (j,s) E k λ ir = λ js p (i,r);(j,s) for any (i, r) of each closed subchain E m (j,s) E m F. Perronnin (UGA) Queuing Networks March 23, 27 43 / 46
BCMP networks BCMP networks Main result Theorem The steady-state distribution is given by: for all n in state space S, π( n) = G K f i ( n i ) i= with G = n S K f i ( n i ) i= with n = ( n,..., n K ) S and n i = (n i,..., n ir ), if and only if (stability condition for open subchains) ρ ir <, i K. r:(i,r) any open E k Moreover, f i ( n i ) has an explicit expression for each service discipline. F. Perronnin (UGA) Queuing Networks March 23, 27 44 / 46
BCMP networks BCMP networks Main result n i FIFO f i ( n i ) = n i! α i (j) PS or LIFO f i ( n i ) = n i! IS f i ( n i ) = R r= j= R r= ρ n ir ir n ir! ρ n ir ir n ir! R r= ρ n ir ir n ir! with α j(j) = min(c i, j). F. Perronnin (UGA) Queuing Networks March 23, 27 45 / 46
BCMP networks Extensions the BCMP product form result may be extended to the following cases: state-dependent routing probabilities arrivals depending on the number of customers in the corresponding subchain F. Perronnin (UGA) Queuing Networks March 23, 27 46 / 46