building accurate workload models using markovian arrival
play

Building Accurate Workload Models Using Markovian Arrival Processes - PowerPoint PPT Presentation

Building Accurate Workload Models Using Markovian Arrival Processes Giuliano Casale Department of Computing Imperial College London Email: g.casale@imperial.ac.uk ACM SIGMETRICS Tutorial June 7th, 2011 1/68 Outline Main topics covered


  1. Building Accurate Workload Models Using Markovian Arrival Processes Giuliano Casale Department of Computing Imperial College London Email: g.casale@imperial.ac.uk ACM SIGMETRICS Tutorial – June 7th, 2011 1/68

  2. Outline Main topics covered in this tutorial: • Phase-type (PH) distributions • Moment matching • Markovian arrival processes (MAP) • Inter-arrival process fitting Important topics not covered in this tutorial: • Queueing applications, matrix-geometric method, ... • Non-Markovian workload models (e.g., Pareto, matrix exponential process, ARMA processes, fBm, wavelets, ...) • Maximum-Likelihood (ML) methods, EM algorithm, ... • ... 2/68

  3. 1. PH DISTRIBUTIONS 3/68

  4. Continuous-Time Markov Chain (CTMC) Notation • m states • λ i , j ≥ 0: (exponential) transition rate from state i to j • λ i = � m j =1 λ i , j : total outgoing rate from state i • Infinitesimal generator matrix:     − λ 1 λ 1 , 2 . . . λ 1 , m 1     λ 2 , 1 − λ 2 . . . λ 2 , m 1     Q =    , Q ✶ = 0 , ✶ =   . . . . ... . . . .    . . . . λ n , 1 λ n , 2 . . . − λ m 1 • π ( t ) = π (0) e Q t : state probability vector at time t • π i ( t ): probability of the CTMC being in state i at time t • π (0): initial state probability vector 4/68

  5. Example 1.1: CTMC Transient Analysis Initial state:   π (0) = [0 . 9 , 0 . 0 , 0 . 1 , 0 . 0] − 4 4 0 0   4 − 7 2 1 Transient analysis:   Q =   2 3 − 5 0 ∞ � ( Q t ) k π ( t ) = π (0) e Q t = π (0) 2 0 0 − 2 k ! k =0 Transient Probabilities A Sample Path 1 4 0.8 state probabilities 0.6 current state 3 0.4 2 0.2 1 0 0 5 10 15 20 25 30 35 40 45 0 0.5 1 1.5 2 2.5 3 time time 5/68

  6. Phase-Type Distribution (PH) • Q : CTMC with m = n + 1 states, last is absorbing ( λ n +1 = 0)   − λ 1 λ 1 , 2 . . . λ 1 , n λ 1 , n +1   λ 2 , 1 − λ 2 . . . λ 2 , n λ 2 , n +1 � �     T t   . . . . Q = = ... . . . .   . . . . 0 0     λ n , 1 λ n , 2 . . . − λ n λ n , n +1 0 0 . . . 0 0 • T : PH subgenerator matrix, T ✶ < 0 • t = − T ✶ : exit vector • “No mass at zero” assumption: π (0) = [ α , 0], α ✶ = 1 References: [Neu89] 6/68

  7. Example 1.2: Absorbing State Probability Initial state: π (0) = [ α , 0 . 0] = [0 . 9 , 0 . 0 , 0 . 1 , 0 . 0]       − 4 4 0 0 − 4 4 0 0   4 − 7 2 1   , t = − T ✶ =   Q =  , T = 4 − 7 2 1  2 3 − 5 0 2 3 − 5 0 0 0 0 0 1 1 absorbing state probability 0.8 0.8 state probabilities 0.6 0.6 0.4 0.4 0.2 0.2 0 0 0 5 10 15 0 5 10 15 time time 7/68

  8. PH: Fundamental Concepts Basic idea: model F ( t ) = Pr(event occurs in X ≤ t time units) as the probability mass absorbed in t time units in Q . • Semantics: entering the absorbing state models the occurrence of an event, e.g. , the arrival of a TCP packet, the completion of a job, a non-exponential state transition in a complex system • Understanding the absorption dynamics:   � ∞ � ∞ ( T t ) k T k − 1 t k t   π ( t ) = π (0) e Q t = π (0) k ! k !   k =0 k =1 0 1 • Using the definition t = − T ✶ , we get π ( t ) = [ α e T t , π n +1 ( t )] , π n +1 ( t ) = 1 − α e T t ✶ where π n +1 ( t ) is the probability mass absorbed in t time units. 8/68

  9. PH: Fundamental Formulas def = 1 − α e T t ✶ PH distribution: F ( t ) = Pr(event occurs in X ≤ t ) • PH representation: ( α , T ) • Probability Density function: f ( t ) = α e T t ( − T ) ✶ � + ∞ • (Power) Moments: E [ X k ] = t k f ( t ) dt = k ! α ( − T ) − k ✶ 0 • ( − T ) − 1 = [ τ i , j ] ≥ 0 • τ i , j : mean time spent in state j if the PH starts in state i • Median/Percentiles: no simple form, determined numerically. 9/68

  10. Example 1.3: a 3-state PH distribution     − ( λ + µ ) λ µ 0  , t =  , λ ≥ 0 .   α = [1 , 0 , 0], T = 0 − λ λ 0 0 0 − λ λ • Case µ → + ∞ : E [ X k ] = k ! λ − k (Exponential, c 2 = 1). • Case µ = λ : E [ X k ] = ( k + 1)! λ − k (Erlang-2, c 2 = 1 / 2) λ − k (Erlang-3, c 2 = 1 / 3). • Case µ = 0: E [ X k ] = ( k +2)! 2 • No choice of µ delivers c 2 > 1 Remarks: Squared coefficient of variation: c 2 def = Var [ X ] / E [ X ] 2 10/68

  11. PH: “Family Picture” - n ≤ 2 states c 2 α T Subset of � � Exponential 1 [1] − λ Hyper-Exp. � − λ � λ 1 Erlang [1 , 0] Hypo-Exp. 2 0 − λ � − λ 1 � λ 1 [ 1 Hypo-Exp. 2 , 1) [1 , 0] Coxian/APH 0 − λ 2 � − λ 1 � 0 Hyper-Exp. [1 , + ∞ ) [ α 1 , α 2 ] Coxian/APH 0 − λ 2 � − λ 1 � p 1 λ 1 [ 1 Coxian/APH 2 , + ∞ ) [1 , 0] General 0 − λ 2 � − λ 1 � p 1 λ 1 [ 1 General 2 , + ∞ ) [ α 1 , α 2 ] p 2 λ 2 − λ 2 Remarks: α 1 + α 2 = 1, c 2 def = Var [ X ] / E [ X ] 2 11/68

  12. PH: “Family Picture” - Examples — n = 3 states c 2 T α   − λ 1 0 0 [ 1   Hyper-Erlang 2 , + ∞ ) [ α 1 , α 2 , 0] 0 − λ 2 λ 2 0 0 − λ 2   − λ 1 p 1 λ 1 0 [ 1   Coxian/APH 3 , + ∞ ) [1 , 0 , 0] 0 − λ 2 p 2 λ 2 0 0 − λ 3   − λ 1 p 12 λ 1 0 [ 1   Circulant 3 , + ∞ ) [ α 1 , α 2 , α 3 ] 0 − λ 2 p 23 λ 2 p 31 λ 3 0 − λ 3   − λ 1 p 12 λ 1 p 13 λ 1 [ 1   General 3 , + ∞ ) [ α 1 , α 2 , α 3 ] p 21 λ 2 − λ 2 p 23 λ 2 p 31 λ 3 p 32 λ 3 − λ 3 Remarks: α 1 + α 2 + α 3 = 1, c 2 def = Var [ X ] / E [ X ] 2 12/68

  13. Example 1.4: Reducing to Coxian Form Algorithms exist to reduce a PH to Coxian form. • With n = 2 states (PH(2) models) this can be done analytically � − 25 � 0 • Hyper-Exponential: α ′ = [0 . 99 , 0 . 01], T ′ = , 0 − 5 F ′ ( t ) = 1 − 0 . 99 e − 25 t − 0 . 01 e − 5 t � − λ 1 � p 1 λ 1 • Coxian: α = [1 , 0], T = 0 − λ 2 • Symbolic analysis gives that in the 2-state Coxian λ 1 p 1 F ( t ) = 1 − M 1 e − λ 1 t − (1 − M 1 ) e − λ 2 t , def = 1 − M 1 λ 1 − λ 2 • Thus the two models are equivalent if λ 1 = 25, λ 2 = 5, and p 1 = 0 . 008 such that M 1 = 0 . 99. 13/68

  14. Example 1.4: Reducing to Coxian Form Compare moments of Hyper-Exponential and Coxian: Hyper-Exp Coxian 41 . 600 · 10 − 3 41 . 600 · 10 − 3 E [ X ] E [ X 2 ] 3 . 968 · 10 − 3 3 . 968 · 10 − 3 E [ X 3 ] 860 . 160 · 10 − 6 860 . 160 · 10 − 6 E [ X 4 ] 444 . 826 · 10 − 6 444 . 826 · 10 − 6 . . . . . . . . . Key message: differences between ( α ′ , T ′ ) and ( α , T ) are deceptive! In general, ( α , T ) is a redundant representation. Redundancy problem: how many degrees of freedom in PH distributions? How to cope with redundant parameters? 14/68

  15. Example 1.5: Fallacies About Degrees of Freedom � − 1 . 0407 � 0 . 3264 • Coxian, 3 parameters: α ′ = [1 , 0], T ′ = 0 − 8 . 0181 � − λ 1 � p 1 λ 1 • Fit PH(2) with 4 parameters: α = [1 , 0], T = p 2 λ 2 − λ 2 • Numerically search ( λ 1 , λ 2 , p 1 , p 2 ) that minimize the distance from Coxian’s E [ X ], E [ X 2 ], E [ X 3 ] and from E [ X 4 ] = 50 � − 13 . 4252 � 13 . 3869 T = 0 . 0018 − 1 . 0431 ... returned PH has E [ X 4 ] = 21 . 34, why is it approximately the same as the Coxian’s E [ X 4 ] = 21 . 41? • Key message: 4 parameters � = freedom to assign E [ X 4 ] • For fixed E [ X ], E [ X 2 ], E [ X 3 ], the feasible region of the PH(2) parameters yields the same E [ X 4 ] (up to numerical tolerance). 15/68

  16. PH: Degrees of Freedom • PH Moments: E [ X k ] = k ! α ( − T ) − k ✶ • A of order n , characteristic polynomial: • φ ( θ ) = det( θ I − A ) • φ ( A ) = A n + m 1 A n − 1 + . . . + m n − 1 A + m n I = 0 • A = ( − T ) − 1 implies that PH moments are linearly-dependent E [ X n ] E [ X n − 1 ] + m 1 ( n − 1)! + . . . + m n − 1 E [ X ] + m n = 0 n ! • Thus, a PH offers up to 2 n − 1 degrees of freedom (df) for fitting a workload distribution ( n − 1 moments + n terms m j ). • n = 2 states ⇒ 3 df, n = 3 ⇒ 5 df, n = 4 ⇒ 7 df, ... References: [TelH07],[CasZS07] 16/68

  17. PH: Algebra of Random Variables and Closure Properties • PH: the smallest family of distributions on ℜ + that is closed under a finite number of mixtures and convolutions. • X 1 ∼ ( α , T ) of order n , t = − T ✶ • X 2 ∼ ( β , S ) of order m , s = − S ✶ • Z = g ( X 1 , X 2 ) ∼ ( γ , R ) Convolution Mixture Minimum Maximum � Z i X i X i w.p. p i min( X i ) max( X i ) [ α , 0] [ p 1 α , p 2 β ] [ α ⊗ β ] [ α ⊗ β , 0 , 0] γ   � T � � T � T ⊕ S t ⊗ I m I n ⊗ s t · β 0   T ⊕ S 0 S 0 R 0 S 0 S 0 0 T def def • ⊗ = Kronecker product, ⊕ = Kronecker sum References: [MaiO92],[Neu89] 17/68

Recommend


More recommend