Performance Evaluation : Contention and Queues Stochastic Modeling of Computer Systems MOSIG Master 2
Total Page:16
File Type:pdf, Size:1020Kb
Queues Stability Average Computable queues Networks Multiclass networks Performance Evaluation : Contention and Queues Stochastic Modeling of Computer Systems MOSIG Master 2 Jean-Marc Vincent Laboratoire LIG, projet Inria-Mescal UniversitéJoseph Fourier [email protected] 2012 October 19 Performance Evaluation : Contention and Queues 1 / 49 Queues Stability Average Computable queues Networks Multiclass networks Outline 1 Queues Characterization 2 Stability 3 Average 4 Computable queues 5 Networks 6 Multiclass networks Performance Evaluation : Contention and Queues 2 / 49 Queues Stability Average Computable queues Networks Multiclass networks Queues Queues are among simplest dynamic systems, but are still the source of many open problems. Tasks do not have any constraints, sizes and arrival times are often independent. Performance Evaluation : Contention and Queues 3 / 49 Queues Stability Average Computable queues Networks Multiclass networks Queues Queues are among simplest dynamic systems, but are still the source of many open problems. Tasks do not have any constraints, sizes and arrival times are often independent. Performance Evaluation : Contention and Queues 3 / 49 Queues Stability Average Computable queues Networks Multiclass networks Queues Queues are among simplest dynamic systems, but are still the source of many open problems. Tasks do not have any constraints, sizes and arrival times are often independent. Performance Evaluation : Contention and Queues 3 / 49 Queues Stability Average Computable queues Networks Multiclass networks Queues Queues are among simplest dynamic systems, but are still the source of many open problems. Tasks do not have any constraints, sizes and arrival times are often independent. Performance Evaluation : Contention and Queues 3 / 49 Queues Stability Average Computable queues Networks Multiclass networks Queues Queues are among simplest dynamic systems, but are still the source of many open problems. Tasks do not have any constraints, sizes and arrival times are often independent. Performance Evaluation : Contention and Queues 3 / 49 Queues Stability Average Computable queues Networks Multiclass networks Queues Queues are among simplest dynamic systems, but are still the source of many open problems. Tasks do not have any constraints, sizes and arrival times are often independent. Performance Evaluation : Contention and Queues 3 / 49 Queues Stability Average Computable queues Networks Multiclass networks Kendall’s notation Service Process Queue total capacity C Service rate µ Arrival Process arrival rate λ Rejection/blocking policy Number of servers K Notation : A=S=K =C=Disc A : arrival process B : service process K : number of servers C : total queue capacity (including currently served customers) Disc : Service discipline (FIFO, LIFO, PS, Quantum, Priorities,...) Performance Evaluation : Contention and Queues 4 / 49 Queues Stability Average Computable queues Networks Multiclass networks State variables User variables Input rate λ or inter-arrival δ Service time σ or S (service rate µ) Waiting time W Response time R (in some books W ) Rejection probability Resource variables Resource utilisation (offered load) ρ Queue occupation N System availability Performance Evaluation : Contention and Queues 5 / 49 Queues Stability Average Computable queues Networks Multiclass networks One Server Queue load aa1a23a45 a a6 δ δ δ δ δ δ 3245 61 σ W(t) 4 σ σ 2 3 σ 5 σ 1 σ 6 t 0 0 d1 dd2d3d45 Performance Evaluation : Contention and Queues 6 / 49 Queues Stability Average Computable queues Networks Multiclass networks Lindley’s formula (2) Wn is the waiting time of the n-th task. It is a dynamical system of the form Wn = '(Wn−1; Xn) with Xn = σn−1 − δn and ' defined by the Lindley’s equation: Wn = max (Wn−1 + Xn; 0) : - FIFO scheduling - Non-linear evolution equation Performance Evaluation : Contention and Queues 7 / 49 Queues Stability Average Computable queues Networks Multiclass networks Outline 1 Queues 2 Stability 3 Average 4 Computable queues 5 Networks 6 Multiclass networks Performance Evaluation : Contention and Queues 8 / 49 Queues Stability Average Computable queues Networks Multiclass networks Stability of the G=G=1 queue Wn = max (Wn−1 + Xn; 0) ; = max (max(Wn−2 + Xn−1; 0) + Xn; 0) ; = max (Wn−2 + Xn−1 + Xn; Xn; 0) ; = max (Wn−3 + Xn−2 + Xn−1 + Xn; Xn−1 + Xn; Xn; 0) ; = max (W0 + X1 + ··· + Xn−1 + Xn; ··· ; Xn−1 + Xn; Xn; 0) ; = max (X1 + ··· + Xn−1 + Xn; ··· ; Xn−1 + Xn; Xn; 0) ; ∼ max (Xn + ··· + X2 + X1; ··· ; X2 + X1; X1; 0) ; def = Mn: Wn =st Mn = max (Mn−1; X1 + ··· + Xn) : Performance Evaluation : Contention and Queues 9 / 49 Queues Stability Average Computable queues Networks Multiclass networks Stability of the G=G=1 queue (2) Wn =st Mn = max (Mn−1; X1 + ··· + Xn) : Mn is a non-decreasing sequence Either Mn −! M1 or Mn −! +1 Stability EX = E(σ − δ) < 0 The system is Stable M1 =st max(M1 + X; 0): Functional equation on the distribution def Z P(M1 < x) = F(x) = F(x − u)dFX (u): Condition : Eσ < Eδ or λ < µ EX = E(σ − δ) > 0 The system is Unstable Depends only on service and inter-arrival expectation Performance Evaluation : Contention and Queues 10 / 49 Queues Stability Average Computable queues Networks Multiclass networks Loynes’ scheme Theorem Wn 6st Wn+1 in a G/G/1 queue, initialy empty. Proof. done by a backward coupling known as the Loynes’ scheme. Construct on a common probability space two trajectories by going backward 1 2 1 2 in time: Si−n(!) = Si−n−1(!) with distribution Si and Ti−n(!) = Ti−n−1(!), 1 with distribution Ti − Tn+1 for all 0 6 i 6 n + 1 and S−n−1(!) = 0. 1 2 By construction, W0 =st Wn and W0 =st Wn+1. Also, it should be clear that 1 2 0 = W−n+1(!) 6 W−n+1(!) for all !. 1 2 This implies W−i (!) 6 W−i (!) so that Wn 6st Wn+1. Performance Evaluation : Contention and Queues 11 / 49 Queues Stability Average Computable queues Networks Multiclass networks Loynes’ scheme Theorem Wn 6st Wn+1 in a G/G/1 queue, initialy empty. Proof. done by a backward coupling known as the Loynes’ scheme. Construct on a common probability space two trajectories by going backward 1 2 1 2 in time: Si−n(!) = Si−n−1(!) with distribution Si and Ti−n(!) = Ti−n−1(!), 1 with distribution Ti − Tn+1 for all 0 6 i 6 n + 1 and S−n−1(!) = 0. 1 2 By construction, W0 =st Wn and W0 =st Wn+1. Also, it should be clear that 1 2 0 = W−n+1(!) 6 W−n+1(!) for all !. 1 2 This implies W−i (!) 6 W−i (!) so that Wn 6st Wn+1. Performance Evaluation : Contention and Queues 11 / 49 Queues Stability Average Computable queues Networks Multiclass networks Loynes’ scheme Theorem Wn 6st Wn+1 in a G/G/1 queue, initialy empty. Proof. done by a backward coupling known as the Loynes’ scheme. Construct on a common probability space two trajectories by going backward 1 2 1 2 in time: Si−n(!) = Si−n−1(!) with distribution Si and Ti−n(!) = Ti−n−1(!), 1 with distribution Ti − Tn+1 for all 0 6 i 6 n + 1 and S−n−1(!) = 0. 1 2 By construction, W0 =st Wn and W0 =st Wn+1. Also, it should be clear that 1 2 0 = W−n+1(!) 6 W−n+1(!) for all !. 1 2 This implies W−i (!) 6 W−i (!) so that Wn 6st Wn+1. Performance Evaluation : Contention and Queues 11 / 49 Queues Stability Average Computable queues Networks Multiclass networks Loynes’ scheme 2 W0 1 W0 T − T −Tn+1 i n+1 0 This has many consequences in terms of existence and uniqueness of a stationary (or limit) regime for the G/G/1 queue Baccelli Bremaud, 2002). Performance Evaluation : Contention and Queues 12 / 49 Queues Stability Average Computable queues Networks Multiclass networks Loynes’ scheme 2 W0 1 W0 T − T −Tn+1 i n+1 0 This has many consequences in terms of existence and uniqueness of a stationary (or limit) regime for the G/G/1 queue Baccelli Bremaud, 2002). Performance Evaluation : Contention and Queues 12 / 49 Queues Stability Average Computable queues Networks Multiclass networks Outline 1 Queues 2 Stability 3 Average 4 Computable queues 5 Networks 6 Multiclass networks Performance Evaluation : Contention and Queues 13 / 49 Queues Stability Average Computable queues Networks Multiclass networks Little’s Formula At Nt Rn Assumptions Z t n At 1 1 X lim = λ, lim Nsds = EN and lim Ri = ER; t!+1 t t!+1 t n!+1 n 0 i=1 Little’s Formula EN = λER: Performance Evaluation : Contention and Queues 14 / 49 Queues Stability Average Computable queues Networks Multiclass networks Little’s Formula (proof) Client a1 a2 a3 a4 a5 a6 a7 a8 a9 d1 d3 d2 d1 d7 d6 d1 d8 Time Nt Z T AT 1 AT 1 X Nsds = Ri : T T AT 0 i=1 T ! 1 implies EN = λER: Performance Evaluation : Contention and Queues 15 / 49 Queues Stability Average Computable queues Networks Multiclass networks Little’s Formula (proof) Client a1 a2 a3 a4 a5 a6 a7 a8 a9 d1 d3 d2 d1 d7 d6 d1 d8 Time Nt Z T AT 1 AT 1 X Nsds = Ri : T T AT 0 i=1 T ! 1 implies EN = λER: Performance Evaluation : Contention and Queues 15 / 49 Queues Stability Average Computable queues Networks Multiclass networks Little’s Formula (proof) Client a1 a2 a3 a4 a5 a6 a7 a8 a9 d1 d3 d2 d1 d7 d6 d1 d8 Time Nt Z T AT 1 AT 1 X Nsds = Ri : T T AT 0 i=1 T ! 1 implies EN = λER: Performance Evaluation : Contention and Queues 15 / 49 Queues Stability Average Computable queues Networks Multiclass networks Outline 1 Queues 2 Stability 3 Average 4 Computable queues Single server queue Limited capacity 5 Networks 6 Multiclass networks Performance Evaluation : Contention and Queues 16 / 49 Queues Stability Average Computable queues Networks Multiclass networks M/M/1 Infinite capacity λ µ Poisson(λ) arrivals Exp(µ) service times M/M/1 queue FIFO discipline Definition λ ρ = µ is the traffic intensity of the queueing system.