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
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
Department of Computing Imperial College London Email: g.casale@imperial.ac.uk
1/68
2/68
3/68
j=1 λi,j: total outgoing rate from state i
4/68
∞
5 10 15 20 25 30 35 40 45 1 2 3 4 current state time
0.5 1 1.5 2 2.5 3 0.2 0.4 0.6 0.8 1 time state probabilities
5/68
References: [Neu89]
6/68
5 10 15 0.2 0.4 0.6 0.8 1 time state probabilities 5 10 15 0.2 0.4 0.6 0.8 1 time absorbing state probability 7/68
∞
(Tt)k k! ∞
Tk−1tk k!
8/68
def
9/68
2
10/68
1 2
2, 1)
2, +∞)
2, +∞)
11/68
2, +∞)
3, +∞)
3, +∞)
3, +∞)
12/68
def
13/68
14/68
15/68
References: [TelH07],[CasZS07]
16/68
def
def
References: [MaiO92],[Neu89]
17/68
References: [Bre78]
18/68
3, 2 3], T ≡
def
5 3q 10 3 q
0.2 0.4 0.6 0.8 1 0.4 0.6 0.8 1 1.2 1.4 probability p c2 − response times
19/68
20/68
0 , αi ∈ ℜ+ 0 , α✶ = 1, λi = m j=1 λi,j
n (and Erlang has the smallest c2)
2 E[ X 2]2 E[ X]
References: [AldS87],[TelH03],[OsoH06]
21/68
n
i ,
n
i=1 Mi,1 = 1
References: [CasZS07]
22/68
10 10
1
10
2
10
−6
10
−4
10
−2
10 t − Inter−arrival time [log] CCDF: 1−F(t) [log] trace PH(8) Exp. Hyper−Exp.(2) PH(2)
23/68
References: [HorT09]
24/68
1
2 ) = E[ X 3]−3E[ X]E[ X 2] 3(2E[ X]2−E[ X 2])
3 2 E[
X 2]2−E[ X]E[ X 3] 3(2E[ X]2−E[ X 2])
1 )
E=[41.600e-3,3.968e-3,860.160e-6]; % 2n-1=3 independent moments D=3*(2*E(1)ˆ2-E(2)); m1=(E(3)-3*E(1)*E(2))/D, m2=(1.5*E(2)ˆ2-E(1)*E(3))/D, [lam,fval] = fsolve(@(lam) [-sum(1./lam) - m1;1./prod(lam) - m2],rand(1,2)), p = lam(2)*(E(1)-1/lam(1)) Output: lam = [ 24.9948; 4.9999], p = 0.0080
25/68
E[ X n] k!
E[ X n−1] (n−1)! + . . . + mn = 0 E[ X n+1] (k+1)! + m1 E[ X n] n!
E[ X 2n−1] (2k−1)! + m1 E[ X 2n−2] (2K−2)! + . . . + mn E[ X n−1] (n−1)! = 0
1 , . . . , θ−1 K ) References: [CasZS08b]
26/68
E=[1,5.3109e-003,89.7845e-006,3.0096e-006,163.1872e-009,12.9061e-009]; f=factorial(0:6); A=[E(4:-1:1)./f(4:-1:1);E(5:-1:2)./f(5:-1:2); E(6:-1:3)./f(6:-1:3);1,0,0,0]; b=[0;0;0;1]; m=(A\b)’, theta=roots(m)’ M=([theta*f(2);theta.ˆ2*f(3);theta.ˆ3*f(4)]\E(2:4)’)’
1 , θ−1 2 , θ−1 3 ) = −diag(49.9628, 110.5089, 451.3770)
−5 −4 −3 −2 −1 −6 −5 −4 −3 −2 −1 LBL−PKT−5 Interarrival Time t [log] CCDF 1−F(t) [log] Trace PH(3) −5 −4 −3 −2 −1 −7 −6 −5 −4 −3 −2 −1 BC−pOct89 Interarrival Time t [log] CCDF 1−F(t) [log] Trace PH(3) −5 −4 −3 −2 −1 −7 −6 −5 −4 −3 −2 −1 LBL−TCP−3 Interarrival Time t [log] CCDF 1−F(t) [log] Trace PH(3)
27/68
def
def
1 ]E[X k 2 ]/k! References: [CasZS08]
28/68
1 ] = 10, E[X 3 1 ] = 200
2 ] = 10, E[X 3 2 ] = 3200
1 ] = 3.2691, E[Y 3 1 ] = 200
2 ] = 30.589, E[Y 3 2 ] = 3200
1 ] = 20, E[Z 3 1 ] = 200
2 ] = 5, E[Z 3 2 ] = 3200
29/68
j=1 Xj ∼ (J j=1 αj, (−1)J−1 J j=1 Tj)
j=1 E[X k
j ]
k!
References: [CasZS08]
30/68
10
−5
10
−4
10
−3
10
−2
10
−1
10 10
−8
10
−6
10
−4
10
−2
10 Interarrival Time [log] CCDF 1−F(t) [log] Trace PH(3) − Prony PH(4) − KPC−PH
31/68
32/68
33/68
def
def
34/68
35/68
References: [Neu89]
36/68
37/68
References: [Neu89]
38/68
10) jump to state 2
10, 3+5 10 ): save Xk; Xk+1 = 0; restart from state 1.
10 , 3+5+2 10
39/68
200 400 600 800 1000 10
−6
10
−4
10
−2
10 10
2
sample number − k sample value − Sk p = 0.10 200 400 600 800 1000 10
−6
10
−4
10
−2
10 10
2
sample number − k sample value − Sk p = 0.90 200 400 600 800 1000 10
−6
10
−4
10
−2
10 10
2
sample number − k sample value − Sk p = 0.99
40/68
1,1
1,2
1,1
2,2
1,1
2,1
2,2
1,1
1,2
2,1
2,2
41/68
1,1
2,2
3,3
1,1
2,2
3,3
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
42/68
43/68
def
44/68
45/68
1 X k2 2 · · · X kq q ] = k1! · · · kq!α(−D0)−k1P(−D0)−k2 · · · (−D0)−kq✶
References: [TelH07]
46/68
2
c2
m
i ,
2 (geometric decay)
References: [CasMS07]
47/68
10 20 30 0.05 0.1 0.15 0.2 0.25 0.3 0.35 lag h autocorrelation ρh c2 > 1, 0 <γ2 < 1 10 20 30 −0.015 −0.01 −0.005 lag h autocorrelation ρh c2 < 1, 0 < γ2 < 1 10 20 30 −0.4 −0.3 −0.2 −0.1 0.1 0.2 0.3 lag h autocorrelation ρh c2 > 1, −1 <γ2 < 0 10 20 30 −0.1 −0.05 0.05 0.1 lag h autocorrelation ρh c2 > 1, γ2 = −1
48/68
100 200 300 400 0.1 0.2 0.3 0.4 0.5 lag h autocorrelation ρh γ2=0.999, γ3=0.95 γ2=0.999, γ3=0.90 γ2=0.999, γ3=0.70 γ2=0.999, γ3=0.0
50 100 150 0.1 0.2 0.3 0.4 0.5 lag h autocorrelation ρh Complex conjugate (γ4, γ5) Negative γ3 Positive γ2
References: [Nie98]
49/68
50/68
0 =
1 =
0, D′ 1)
0, D′ 1)
References: [TelH07]
51/68
def
def
References: [BodHGT08],[HeiML06],[HeiHG06]
52/68
1
2 ) = E[ X 3]−3E[ X]E[ X 2] 3(2E[ X]2−E[ X 2])
3 2 E[
X 2]2−E[ X]E[ X 3] 3(2E[ X]2−E[ X 2])
2
1
53/68
E=[0.6000, 0.8267, 1.7440]; % 2n-1=3 independent moments g2=1/3; % autocorrelation decay rate D=3*(2*E(1)ˆ2-E(2)); m1=(E(3)-3*E(1)*E(2))/D, m2=(1.5*E(2)ˆ2-E(1)*E(3))/D, [x,fval] = fsolve(@(x) [-sum(1./x(1:2)) - m1;1./prod(x(1:2)) - m2; prod(x(3:4))-g2; ((1-x(3)./x(2)) + (1-x(4))./x(1))/(1-g2)-E(1)],rand(1,4)); lam = x(1:2); p=x(3); q=x(4); Output: lam = [ 10.5826 1.4174], p = 0.4725, q = 0.7055
54/68
j Xj ∼ ((−1)J−1 J j D(j) 0 , J j D(j) 1 )
j=1 E[X k
j ]
k!
i X u i+h] = k!u! J j=1 E[X k
j,iX u j,i+h]
k!u!
i X u i+hX v i+h+l] = k!u!v! J j=1 E[X k
j,iX u j,i+hX v j,i+h+l]
k!u!v!
References: [CasZS07]
55/68
j=1 γj,i, P = J j=1 Pj
2(1 + c2 X)(1 + c2 Y )
X
k +
Y
k +
Xc2 Y
k ρY k
References: [CasZS08]
56/68
2
3
2 4 6 8 10 −0.2 0.2 0.4 0.6 squared coefficient of variation lag−1 autocorrelation feasibility range KPC(4) MAP(2)
References: [CasZS08]
57/68
lag k [log] ρk IAT autocorrelations [log] LBL−PKT−5 4 1 2 3 −3 −2 −1 Trace Autocorrelation Identical Fittings 2 4 −4 −2 x [log] Pr(queue ≥ x) [log] LBL−PKT−5 Trace Simulation Second−Order Fit Third−Order Fit
References: [AndN02],[CasZS07]
58/68
1 2 3 4 5 −3 −2 −1 Lag k [log] Autocorrelation ρk [log] SWeb − Autocorrelation Fitting Web MAP(16) kpc 2 4 6 −6 −5 −4 −3 −2 −1 x [log] Pr(queue ≥ x) [log] SWeb − MAP/D/1 − Utilization 80% Trace SUP KPC
References: [AndN02],[CasZS07]
59/68
60/68
61/68
62/68
j (t): state probabilities for level N(t) = j
0(t) = πc 0(t)D0
j (t) = πc j (t)D0 + πc j−1(t)D1,
0(0) = π, ˙
j (0) = 0, j ≥ 1 yields
def
def
References: [Neu89]
63/68
0, D′ 1)
0, D1 ⊕ D′ 1) has counting process N(t) + N′(t)
0 =
1 =
10 20 30 −1 −0.8 −0.6 −0.4 −0.2 Erlang processes order − n lag−1 autocorrelation ρ1 Erlang process superposition
References: [Neu89]
64/68
def
3
3
10 10
1
10
2
10
−10
10
−5
10 lag k ρc(k) − timescale u=1.0 approximating LRD behavior variance at 4 time scales variance at 1 time scale
References: [AndN98]
65/68
66/68
[AldS87] D. Aldous and L. Shepp. The least variable phase type distribution is Erlang.
[AndN98] A. T. Andersen and B. F. Nielsen. A Markovian approach for modeling packet traffic with long-range dependence. IEEE JSAC, 16(5):719–732, 1998. [AndN02] A. T. Andersen and B. F. Nielsen. On the use of second-order descriptors to predict queueing behavior of MAPs. Naval Res. Log., 49(4):391–409, 2002. [BauBK10] Falko Bause, Peter Buchholz, Jan Kriege. ProFiDo - The Processes Fitting Toolkit Dortmund. QEST 2010: 87-96. [BuchK09] P. Buchholz, Jan Kriege. A Heuristic Approach for Fitting MAPs to Moments and Joint Moments. In Proc of QEST, 2009: 53-62, 2009. [BodHGT08] L. Bodrog and A. Heindl and G. Horv´ ath and M. Telek. A Markovian Canonical Form of Second-Order Matrix-Exponential Processes. European Journal of Operations Research, 190(457-477), 2008. [Bre78] J. Brewer. Kronecker products and matrix calculus in system theory. IEEE
[CasZS07] G. Casale, E. Zhang, and E. Smirni. Characterization of moments and autocorrelation in MAPs. ACM Perf. Eval. Rev., 35(1):27–29, 2007. [CasZS08] G. Casale, E. Zhang, and E. Smirni. KPC-toolbox: Simple yet effective trace fitting using markovian arrival processes. In Proc. of QEST, 83–92, 2008. [CasZS08b] G. Casale, E. Z. Zhang, and E. Smirni. Interarrival times characterization and fitting for Markovian traffic analysis. Technical Report WM-CS-2008-02, College
67/68
[HeiHG06] A. Heindl, G. Horvath, and K. Gross. Explicit Inverse Characterizations of Acyclic MAPs of Second Order. EPEW workshop, 108-122, 2006. [HeiML06] A. Heindl, K. Mitchell, and A. van de Liefvoort. Correlation bounds for second-order MAPs with application to queueing network decomposition. Performance Evaluation, 63(6):553–577, 2006. [HorT09] G. Horvath, M. Telek. On the canonical representation of phase type
[MaiO92] R. S. Maier and C. A O’Cinneide. A closure characterisation of phase-type
[Neu89] M. F. Neuts. Structured Stochastic Matrices of M/G/1 Type and Their
[Nie98] B. F. Nielsen. Note on the Markovian Arrival Process, Nov 1998. http://www2.imm.dtu.dk/courses/04441/map.pdf [OsoH06] T. Osogami, M. Harchol-Balter. Closed form solutions for mapping general distributions to quasi-minimal PH distributions. Performance Evaluation, 63(6): 524-552, 2006. [TelH03] M. Telek and A. Heindl. Matching moments for acyclic discrete and continuous phase-type distributions of second order. International Journal of Simulation, 3:47–57, 2003. [TelH07] M. Telek and G. Horv´
processes and a moments matching method. Performance Evaluation, 64(9-12):1153-1168, 2007.
68/68