Performance analysis of Stochastic Process Algebra models using Stochastic Simulation Jeremy Bradley Stephen Gilmore Nigel Thomas Email: jb@doc.ic.ac.uk stephen.gilmore@ed.ac.uk nigel.thomas@ncl.ac.uk Department of Computing, LFCS, School of Computing Science, Imperial College London University of Edinburgh Univerity of Newcastle Produced with prosper and L A T EX JTB [18/07/2005] – p. 1/21
The story used to be... Passage-time PDF hydra ipc ✏✏✏✏ ✶ PEPA HYDRA Passage-time CDF ✲ ✲ PPPP q Transient For state spaces of less than O (10 9 ) Very precise probabilistic results JTB [18/07/2005] – p. 2/21
Now the story is... Stochastic simulation Dizzy ipc/pwb ✏✏✏✏ ✶ PEPA Rate equations ✲ PPPP q Numerical ODE solution For very large state spaces, e.g. 10 1000 + states Aggregate deterministic results JTB [18/07/2005] – p. 3/21
Stochastic Process Algebra PEPA syntax: P ✄ ✁ P ::= (a , λ ) . P P + P L P P / L A JTB [18/07/2005] – p. 4/21
Stochastic Process Algebra PEPA syntax: P ✄ ✁ P ::= (a , λ ) . P P + P L P P / L A Action prefix: (a , λ ) . P JTB [18/07/2005] – p. 4/21
Stochastic Process Algebra PEPA syntax: P ✄ ✁ P ::= (a , λ ) . P P + P L P P / L A Action prefix: (a , λ ) . P Competitive choice: P 1 + P 2 JTB [18/07/2005] – p. 4/21
Stochastic Process Algebra PEPA syntax: P ✄ ✁ P ::= (a , λ ) . P P + P L P P / L A Action prefix: (a , λ ) . P Competitive choice: P 1 + P 2 Cooperation: P 1 ✄ ✁ L P 2 JTB [18/07/2005] – p. 4/21
Stochastic Process Algebra PEPA syntax: P ✄ ✁ P ::= (a , λ ) . P P + P L P P / L A Action prefix: (a , λ ) . P Competitive choice: P 1 + P 2 Cooperation: P 1 ✄ ✁ L P 2 Action hiding: P / L JTB [18/07/2005] – p. 4/21
Stochastic Process Algebra PEPA syntax: P ✄ ✁ P ::= (a , λ ) . P P + P L P P / L A Action prefix: (a , λ ) . P Competitive choice: P 1 + P 2 Cooperation: P 1 ✄ ✁ L P 2 Action hiding: P / L Constant label: A JTB [18/07/2005] – p. 4/21
PEPA: Example def (AA ✄ { run } A1) ✄ ✁ { alert } (BB ✄ ✁ ✁ Sys = { run } B1) JTB [18/07/2005] – p. 5/21
PEPA: Example def (AA ✄ { run } A1) ✄ ✁ { alert } (BB ✄ ✁ ✁ Sys = { run } B1) def AA = (run , ⊤ ) . (alert , r 5 ) . AA JTB [18/07/2005] – p. 5/21
PEPA: Example def (AA ✄ { run } A1) ✄ ✁ { alert } (BB ✄ ✁ ✁ Sys = { run } B1) def AA = (run , ⊤ ) . (alert , r 5 ) . AA def A1 = (start , r 1 ) . A2 + (pause , r 2 ) . A3 def A2 = (run , r 3 ) . A1 + (fail , r 4 ) . A3 def A3 = (recover , r 1 ) . A1 JTB [18/07/2005] – p. 5/21
PEPA: Example def (AA ✄ { run } A1) ✄ ✁ { alert } (BB ✄ ✁ ✁ Sys = { run } B1) def AA = (run , ⊤ ) . (alert , r 5 ) . AA def A1 = (start , r 1 ) . A2 + (pause , r 2 ) . A3 def A2 = (run , r 3 ) . A1 + (fail , r 4 ) . A3 def A3 = (recover , r 1 ) . A1 def BB = (run , ⊤ ) . (alert , r 5 ) . BB JTB [18/07/2005] – p. 5/21
PEPA: Example def (AA ✄ { run } A1) ✄ ✁ { alert } (BB ✄ ✁ ✁ Sys = { run } B1) def AA = (run , ⊤ ) . (alert , r 5 ) . AA def A1 = (start , r 1 ) . A2 + (pause , r 2 ) . A3 def A2 = (run , r 3 ) . A1 + (fail , r 4 ) . A3 def A3 = (recover , r 1 ) . A1 def BB = (run , ⊤ ) . (alert , r 5 ) . BB def B1 = (start , r 1 ) . B2 + (pause , r 2 ) . B1 def B2 = (run , r 3 ) . B1 JTB [18/07/2005] – p. 5/21
Types of Analysis Steady-state and transient analysis in PEPA: def 0.05 A1 = (start , r 1 ) . A2 + (pause , r 2 ) . A3 Steady state: X_1 0.045 def 0.04 A2 = (run , r 3 ) . A1 + (fail , r 4 ) . A3 0.035 ⇒ def 0.03 A3 = (recover , r 1 ) . A1 Probability 0.025 def AA = (run , ⊤ ) . (alert , r 5 ) . AA 0.02 0.015 AA ✄ ✁ def 0.01 Sys = { run } A1 0.005 0 0 5 10 15 20 25 30 Time, t JTB [18/07/2005] – p. 6/21
Types of Analysis Steady-state and transient analysis in PEPA: def 0.05 A1 = (start , r 1 ) . A2 + (pause , r 2 ) . A3 PEPA model: transient X_1 -> X_1 Steady state: X_1 0.045 def 0.04 A2 = (run , r 3 ) . A1 + (fail , r 4 ) . A3 0.035 ⇒ def 0.03 A3 = (recover , r 1 ) . A1 Probability 0.025 def AA = (run , ⊤ ) . (alert , r 5 ) . AA 0.02 0.015 AA ✄ ✁ def 0.01 Sys = { run } A1 0.005 0 0 5 10 15 20 25 30 Time, t JTB [18/07/2005] – p. 6/21
Types of Analysis Steady-state and transient analysis in PEPA: def 0.05 A1 = (start , r 1 ) . A2 + (pause , r 2 ) . A3 PEPA model: transient X_1 -> X_1 Steady state: X_1 0.045 def 0.04 A2 = (run , r 3 ) . A1 + (fail , r 4 ) . A3 0.035 ⇒ def 0.03 A3 = (recover , r 1 ) . A1 Probability 0.025 def AA = (run , ⊤ ) . (alert , r 5 ) . AA 0.02 0.015 AA ✄ ✁ def 0.01 Sys = { run } A1 0.005 0 0 5 10 15 20 25 30 Time, t JTB [18/07/2005] – p. 6/21
Types of Analysis Steady-state and transient analysis in PEPA: def 0.05 A1 = (start , r 1 ) . A2 + (pause , r 2 ) . A3 PEPA model: transient X_1 -> X_1 Steady state: X_1 0.045 def 0.04 A2 = (run , r 3 ) . A1 + (fail , r 4 ) . A3 0.035 ⇒ def 0.03 A3 = (recover , r 1 ) . A1 Probability 0.025 def AA = (run , ⊤ ) . (alert , r 5 ) . AA 0.02 0.015 AA ✄ ✁ def 0.01 Sys = { run } A1 0.005 0 0 5 10 15 20 25 30 Time, t JTB [18/07/2005] – p. 6/21
Types of Analysis Steady-state and transient analysis in PEPA: def 0.05 A1 = (start , r 1 ) . A2 + (pause , r 2 ) . A3 PEPA model: transient X_1 -> X_1 Steady state: X_1 0.045 def 0.04 A2 = (run , r 3 ) . A1 + (fail , r 4 ) . A3 0.035 ⇒ def 0.03 A3 = (recover , r 1 ) . A1 Probability 0.025 def AA = (run , ⊤ ) . (alert , r 5 ) . AA 0.02 0.015 AA ✄ ✁ def 0.01 Sys = { run } A1 0.005 0 0 5 10 15 20 25 30 Time, t JTB [18/07/2005] – p. 6/21
Passage-time Quantiles Extract a passage-time density from a PEPA model: def A1 = (start , r 1 ) . A2 + (pause , r 2 ) . A3 def A2 = (run , r 3 ) . A1 + (fail , r 4 ) . A3 ⇒ def A3 = (recover , r 1 ) . A1 def AA = (run , ⊤ ) . (alert , r 5 ) . AA AA ✄ ✁ def Sys = { run } A1 JTB [18/07/2005] – p. 7/21
Example of aggregate states def = ( compute , ⊤ ) . Client 1 Client def = ( delay , µ ) . Client Client 1 def = ( compute , λ ) . Server 1 Server def = ( recover , ν ) . Server Server 1 ) ✄ ✁ Sys = ( Client � · · · � Client { compute } ( Server � · · · � Server ) � �� � � �� � N M Cooperating clusters can be represented as tuples JTB [18/07/2005] – p. 8/21
Rate Equation Translation Action: delay JTB [18/07/2005] – p. 9/21
Rate Equation Translation Action: delay n ( Client 1) µ Client 1 − − − − − − − → Client JTB [18/07/2005] – p. 9/21
Rate Equation Translation Action: delay n ( Client 1) µ Client 1 − − − − − − − → Client Action: recover n ( Server 1) ν − − − − − − − → Server Server 1 JTB [18/07/2005] – p. 9/21
Rate Equation Translation Action: delay n ( Client 1) µ Client 1 − − − − − − − → Client Action: recover n ( Server 1) ν − − − − − − − → Server Server 1 Action: compute θ ( n ( Client )) n ( Server ) λ Client + Server − − − − − − − → Client 1 + Server 1 where θ ( x ) = 1 if x > 0 , else 0 . JTB [18/07/2005] – p. 9/21
Why the θ function? There are N client cpts enabling a compute action There are M server cpts enabling a compute action Overall compute rate is: r compute ( Sys ) = min( N ⊤ , Mλ ) JTB [18/07/2005] – p. 10/21
Why the θ function? There are N client cpts enabling a compute action There are M server cpts enabling a compute action Overall compute rate is: r compute ( Sys ) = min( N ⊤ , Mλ ) If N = 0 then overall rate is 0 , hence: r compute ( Sys ) = θ ( N ) Mλ JTB [18/07/2005] – p. 10/21
Dizzy setup JTB [18/07/2005] – p. 11/21
Dizzy simulation JTB [18/07/2005] – p. 12/21
Voter example Election _ Preparation ✄ ✁ L Electoral _ Personae def Voter 0[ N ] ✄ ✁ Electoral _ Personae = M Electoral _ App def Electoral _ App Collector _ 0[ N ] � Counter _ 1[ N ] = � Administrator [ N ] JTB [18/07/2005] – p. 13/21
Early voter description def Voter 0 = ( choose , c 1 ) . Voter 0 _ 1 def Voter 0 _ 1 ( bitcommit , b 1 ) . Voter 0 _ 2 = def Voter 0 _ 2 = ( blind 1 , b 2 ) . Voter 0 _ 3 def Voter 0 _ 3 = ( blind 2 , b 3 ) . Voter 0 _ 4 def Voter 0 _ 4 = ( voter _ sign , s 1 ) . Voter 0 _ 5 def Voter 0 _ 5 ( sendA , s 2 ) . Voter 0 _ 5 b = def Voter 0 _ 5 b = ( sendV , ⊤ ) . Voter 1 def Voter 1 = ( unblind 1 , u 1 ) . Voter 1 _ 1 JTB [18/07/2005] – p. 14/21
Voter: early stage Number of Voter components in derivative states 10000 Voter0 Voter0_4 Voter0_5b 8000 Voter1 6000 Number 4000 2000 0 0 5 10 15 20 25 30 Time, t JTB [18/07/2005] – p. 15/21
High-level voter description Voter 0 def = ( choose , c 1 ) . . . ( sendV , ⊤ ) . Voter 1 JTB [18/07/2005] – p. 16/21
High-level voter description Voter 0 def = ( choose , c 1 ) . . . ( sendV , ⊤ ) . Voter 1 Voter 1 def = ( unblind , u 1 ) . . . ( sendC , s 6 ) . Voter 2 JTB [18/07/2005] – p. 16/21
Recommend
More recommend