living beyond your means
play

Living beyond your means Extracting Response Time Densities and - PowerPoint PPT Presentation

Living beyond your means Extracting Response Time Densities and Quantiles from Stochastic Models Susanna Au-Yeung, Jeremy Bradley, Nicholas Dingle, Tony Field, Peter Harrison, William Knottenbelt , Aleksandar Trifunovic, Helen Wilson email: {


  1. Living beyond your means Extracting Response Time Densities and Quantiles from Stochastic Models Susanna Au-Yeung, Jeremy Bradley, Nicholas Dingle, Tony Field, Peter Harrison, William Knottenbelt , Aleksandar Trifunovic, Helen Wilson email: { wjk,aesop } @doc.ic.ac.uk

  2. Summary (NOT!) There are three surefire ways to live beyond your means: • “Invest” (a.k.a. lose) your money in the stockmarket. • Play Texas Hold ’em poker for money. • Go out frequently on an academic salary. 1 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  3. Motivation • Fast response times are important for almost all computer- communication and transaction processing systems. • It is important to assess the performance of these systems ahead of implementation via formal models (e.g. Petri nets ). • Traditional analysis methods compute steady state behaviour. • But this is inadequate to compute response-time densities and quantiles (percentiles). 2 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  4. Response Times and QoS • 90th/95th percentile response time is a good indicator of client-perceived quality of service in SLAs/benchmarks, e.g.: - Ambulance should be on scene in under 13 mins 90% of time. - 95% of text messages should be delivered in under 3 seconds. - TPC-C OLTP benchmark requirements: 90th percentile Min. Mean of Transaction Minimum Minimum response time Think Time Type % of mix Keying Time constraint Distribution Payment 43.0 3 sec. 5 sec. 12 sec. Order-Status 4.0 2 sec. 5 sec. 10 sec. Stock-Level 4.0 2 sec. 20 sec. 5 sec. 3 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  5. Aim p4 t5 (v) t3 t4 (2r) p5 ⇒ p3 t1 (r) t2 (3r) p1 p2 4 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  6. Petri nets • A simple, graphical formalism for modelling concurrent sys- tems (including hardware, software, communication, manu- facturing, chemical and biological systems). • Natural expression of synchronisation. • Stochastic Petri net models support both: - correctness analysis (deadlock, liveness, boundedness) - performance analysis (via Markov/semi-Markov chains) within a single modelling framework. 5 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  7. Petri nets (example) L CO2 photosynthesis metabolism C6H12O6 H20 sunrise O2 dark light sunset L 6 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  8. Petri nets (example) L CO2 photosynthesis metabolism C6H12O6 H20 sunrise O2 dark light sunset L 7 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  9. Petri nets (example) L CO2 photosynthesis metabolism C6H12O6 H20 sunrise O2 dark light sunset L 8 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  10. Petri nets (example) L CO2 photosynthesis metabolism C6H12O6 H20 sunrise O2 dark light sunset L 9 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  11. Petri nets (example) L CO2 photosynthesis metabolism C6H12O6 H20 sunrise O2 dark light sunset L 10 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  12. Petri nets (example) L CO2 photosynthesis metabolism C6H12O6 H20 sunrise O2 dark light sunset L 11 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  13. Stochastic Petri nets • Attach exponentially distributed firing delays on transitions f ( t ) = λe − λt F ( t ) = 1 − e − λt • Competing transitions t 1 (rate λ 1 ) and t 2 (rate λ 2 ) race: � ∞ �� x λ 1 � 0 λ 1 e − λ 1 y dy λ 2 e − λ 2 x dx = P [ t 1 fires] = λ 1 + λ 2 0 • Sojourn time in marking ∼ Exp( λ 1 + λ 2 ): P [min( χ 1 , χ 2 ) ≤ t ] = 1 − P [ χ 1 > t and χ 2 > t ] 1 − e − ( λ 1 + λ 2 ) t = 12 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  14. Markov Processes • State holding times are exponentially distributed. • Transition probabilities depend only current state. • Hence underlying state-transition behaviour of an SPN is iso- morphic to a Continuous Time Markov Chain . • Stochastic Process Algebras and closed Queueing networks map onto Markov Chains in a similar way. • Response time analysis will proceed at Markov Chain level. 13 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  15. CTMC (example) L t1 (1) p1 p2 (2,0,0) t3 (3) t2 (2) p3 L 14 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  16. CTMC (example) L t1 (1) p1 p2 (2,0,0) 1 (1,1,0) t3 (3) t2 (2) p3 L 15 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  17. CTMC (example) L t1 (1) p1 p2 (2,0,0) 1 (1,1,0) t3 (3) t2 (2) 1 2 (0,2,0) (1,0,1) p3 L 16 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  18. CTMC (example) L t1 (1) p1 p2 (2,0,0) 1 (1,1,0) t3 (3) t2 (2) 1 2 (0,2,0) (1,0,1) p3 L 17 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  19. CTMC (example) L t1 (1) p1 p2 (2,0,0) 1 (1,1,0) t3 (3) t2 (2) 1 2 (0,2,0) (1,0,1) 2 p3 (0,1,1) L 18 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  20. CTMC (example) L t1 (1) p1 p2 (2,0,0) 1 3 (1,1,0) t3 (3) t2 (2) 1 2 3 (0,2,0) (1,0,1) 1 2 3 p3 (0,1,1) (0,0,2) 2 L 19 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  21. CTMC (example) L t1 (1) p1 p2 1 (2,0,0) 1 2 3 4 5 6 1 −1 1 1 3 2 −3 1 2 (1,1,0) 2 3 −2 2 t3 (3) t2 (2) Q= 1 2 4 3 −4 1 3 3 (0,2,0) 4 (1,0,1) 5 3 −5 2 1 6 3 −3 2 3 p3 (0,1,1) (0,0,2) 2 5 6 L 20 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  22. CTMC (example) L t1 (1) p1 p2 1 (2,0,0) 1 2 3 4 5 6 1 −1 1 1 3 2 −3 1 2 (1,1,0) 2 3 −2 2 t3 (3) t2 (2) Q= 1 2 4 3 −4 1 3 3 (0,2,0) 4 (1,0,1) 5 3 −5 2 1 6 3 −3 2 3 p3 (0,1,1) (0,0,2) 2 5 6 L 21 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  23. Laplace Transforms • We calculate the Laplace Transform (LT) of required re- sponse time density and then invert it numerically. • Laplace Transform of f ( t ) is � ∞ e − st f ( t ) dt L ( s ) = 0 • For f ( t ) = λe − λt � ∞ λe − ( λ + s ) t dt L ( s ) = 0 � ∞ 0 ( λ + s ) e − ( λ + s ) t dt = λ/ ( λ + s ) = λ/ ( λ + s ) 22 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  24. Why the Laplace domain L λ L λ � � ⇔ f ( t ) = λe − λt L ( s ) = λ + s Uniqueness 23 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  25. Why the Laplace domain L λ µ L � � � λ µ � L ( s ) = λ + s µ + s � t Convolution (easier than h ( t ) = f ( t ) ∗ g ( t ) = 0 f ( α ) g ( t − α ) dα !) 24 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  26. Why the Laplace domain L λ p (1−p) µ L � � λ µ � � L ( s ) = p + (1 − p ) λ + s µ + s Linearity 25 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  27. Why the Laplace domain L Uniform(a,b) Immediate Det(d) L e − as − e − bs � � � e − ds � L ( s ) = (1) ( b − a ) s Extensible to non-exponential time delays (SMCs) 26 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  28. Why the Laplace domain • Integration in t domain corresponds to division in Laplace domain. • By inverting L ( s ) /s instead of L ( s ) we obtain cumulative density function (cdf) cheaply. � ∞ � ∞ ∞ e − st f ( t ) dt = e − st F ( t ) � e − st F ( t ) dt L f ( t ) ( s ) = 0 + s � � 0 0 = sL F ( t ) ( s ) • Quantiles (percentiles) can be easily calculated from cdf. 27 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  29. Why the Laplace Domain • Calculating (raw) moments is straightforward: � ∞ L ′ ( s ) − te − st f ( t ) dt = 0 � ∞ L ′ (0) = − tf ( t ) dt 0 = − E [ T ] • Higher moments can be found via L ′′ (0), L ′′′ (0) etc. i.e. From the Laplace Transform, we can easily find the mean, variance, skewness, kurtosis etc. of f ( t ) 28 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  30. Response Time LT • First step analysis (source state i , target states � j ): � � � � � � � � q ik − q ii q ik − q ii � � L i� j ( s ) = L k� j ( s ) + − q ii s − q ii − q ii s − q ii ∈ � k ∈ � k/ j j � � � � q ik q ik � � = L k� j ( s ) + s − q ii s − q ii ∈ � k ∈ � k/ j j • With multiple source states: π k ˜ � L j ( s ) = α k L k� j ( s ) where α k = � i� i ˜ � π j � � j ∈ k ∈ i 29 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

  31. Response time LT • As a system of n linear equations in Ax = b form ( � j = 1):   L 1 � j ( s )     s − q 11 − q 12 · · · − q 1 n 0   L 2 � j ( s ) 0 s − q 22 · · · − q 2 n q 21                   0 − q 32 · · · − q 3 n L 3 � j ( s ) = q 31       . . . ...       . . . . 0 . . . . .             0 − q n 2 · · · s − q nn q n 1   L n� j ( s ) • Symbolic solution infeasible for large n . • Instead solve for particular values of s based on evaluation demands of numerical LT inversion algorithm. 30 Departmental Seminar wjk@doc.ic.ac.uk 10th December 2003

Recommend


More recommend