Performance analysis of Stochastic Process Algebra models using - - PowerPoint PPT Presentation

performance analysis of stochastic process algebra models
SMART_READER_LITE
LIVE PREVIEW

Performance analysis of Stochastic Process Algebra models using - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

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, Imperial College London LFCS, University of Edinburgh School of Computing Science, Univerity of Newcastle

Produced with prosper and L

AT

EX

JTB [18/07/2005] – p. 1/21

slide-2
SLIDE 2

The story used to be...

✲ ✲ ✏✏✏✏ ✶ PPPP q

PEPA

ipc

HYDRA

hydra

Passage-time PDF Passage-time CDF Transient

For state spaces of less than O(109) Very precise probabilistic results

JTB [18/07/2005] – p. 2/21

slide-3
SLIDE 3

Now the story is...

✲ ✏✏✏✏ ✶ PPPP q

PEPA

ipc/pwb

Rate equations

Dizzy

Stochastic simulation Numerical ODE solution

For very large state spaces, e.g. 101000+ states Aggregate deterministic results

JTB [18/07/2005] – p. 3/21

slide-4
SLIDE 4

Stochastic Process Algebra

PEPA syntax:

P ::= (a, λ).P P + P P ✄

L P

P/L A

JTB [18/07/2005] – p. 4/21

slide-5
SLIDE 5

Stochastic Process Algebra

PEPA syntax:

P ::= (a, λ).P P + P P ✄

L P

P/L A

Action prefix: (a, λ).P

JTB [18/07/2005] – p. 4/21

slide-6
SLIDE 6

Stochastic Process Algebra

PEPA syntax:

P ::= (a, λ).P P + P P ✄

L P

P/L A

Action prefix: (a, λ).P Competitive choice: P1 + P2

JTB [18/07/2005] – p. 4/21

slide-7
SLIDE 7

Stochastic Process Algebra

PEPA syntax:

P ::= (a, λ).P P + P P ✄

L P

P/L A

Action prefix: (a, λ).P Competitive choice: P1 + P2 Cooperation: P1 ✄

L P2

JTB [18/07/2005] – p. 4/21

slide-8
SLIDE 8

Stochastic Process Algebra

PEPA syntax:

P ::= (a, λ).P P + P P ✄

L P

P/L A

Action prefix: (a, λ).P Competitive choice: P1 + P2 Cooperation: P1 ✄

L P2

Action hiding: P/L

JTB [18/07/2005] – p. 4/21

slide-9
SLIDE 9

Stochastic Process Algebra

PEPA syntax:

P ::= (a, λ).P P + P P ✄

L P

P/L A

Action prefix: (a, λ).P Competitive choice: P1 + P2 Cooperation: P1 ✄

L P2

Action hiding: P/L Constant label: A

JTB [18/07/2005] – p. 4/21

slide-10
SLIDE 10

PEPA: Example

Sys

def

= (AA ✄

{run} A1) ✄

{alert} (BB ✄

{run} B1)

JTB [18/07/2005] – p. 5/21

slide-11
SLIDE 11

PEPA: Example

Sys

def

= (AA ✄

{run} A1) ✄

{alert} (BB ✄

{run} B1)

AA

def

= (run, ⊤).(alert, r5).AA

JTB [18/07/2005] – p. 5/21

slide-12
SLIDE 12

PEPA: Example

Sys

def

= (AA ✄

{run} A1) ✄

{alert} (BB ✄

{run} B1)

AA

def

= (run, ⊤).(alert, r5).AA A1

def

= (start, r1).A2 + (pause, r2).A3 A2

def

= (run, r3).A1 + (fail, r4).A3 A3

def

= (recover, r1).A1

JTB [18/07/2005] – p. 5/21

slide-13
SLIDE 13

PEPA: Example

Sys

def

= (AA ✄

{run} A1) ✄

{alert} (BB ✄

{run} B1)

AA

def

= (run, ⊤).(alert, r5).AA A1

def

= (start, r1).A2 + (pause, r2).A3 A2

def

= (run, r3).A1 + (fail, r4).A3 A3

def

= (recover, r1).A1 BB

def

= (run, ⊤).(alert, r5).BB

JTB [18/07/2005] – p. 5/21

slide-14
SLIDE 14

PEPA: Example

Sys

def

= (AA ✄

{run} A1) ✄

{alert} (BB ✄

{run} B1)

AA

def

= (run, ⊤).(alert, r5).AA A1

def

= (start, r1).A2 + (pause, r2).A3 A2

def

= (run, r3).A1 + (fail, r4).A3 A3

def

= (recover, r1).A1 BB

def

= (run, ⊤).(alert, r5).BB B1

def

= (start, r1).B2 + (pause, r2).B1 B2

def

= (run, r3).B1

JTB [18/07/2005] – p. 5/21

slide-15
SLIDE 15

Types of Analysis

Steady-state and transient analysis in PEPA:

A1

def

= (start, r1 ).A2 + (pause, r2 ).A3 A2

def

= (run, r3 ).A1 + (fail, r4 ).A3 A3

def

= (recover, r1 ).A1 AA

def

= (run, ⊤).(alert, r5 ).AA Sys

def

= AA ✄

{run} A1

0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 5 10 15 20 25 30 Probability Time, t Steady state: X_1

JTB [18/07/2005] – p. 6/21

slide-16
SLIDE 16

Types of Analysis

Steady-state and transient analysis in PEPA:

A1

def

= (start, r1 ).A2 + (pause, r2 ).A3 A2

def

= (run, r3 ).A1 + (fail, r4 ).A3 A3

def

= (recover, r1 ).A1 AA

def

= (run, ⊤).(alert, r5 ).AA Sys

def

= AA ✄

{run} A1

0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 5 10 15 20 25 30 Probability Time, t PEPA model: transient X_1 -> X_1 Steady state: X_1

JTB [18/07/2005] – p. 6/21

slide-17
SLIDE 17

Types of Analysis

Steady-state and transient analysis in PEPA:

A1

def

= (start, r1 ).A2 + (pause, r2 ).A3 A2

def

= (run, r3 ).A1 + (fail, r4 ).A3 A3

def

= (recover, r1 ).A1 AA

def

= (run, ⊤).(alert, r5 ).AA Sys

def

= AA ✄

{run} A1

0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 5 10 15 20 25 30 Probability Time, t PEPA model: transient X_1 -> X_1 Steady state: X_1

JTB [18/07/2005] – p. 6/21

slide-18
SLIDE 18

Types of Analysis

Steady-state and transient analysis in PEPA:

A1

def

= (start, r1 ).A2 + (pause, r2 ).A3 A2

def

= (run, r3 ).A1 + (fail, r4 ).A3 A3

def

= (recover, r1 ).A1 AA

def

= (run, ⊤).(alert, r5 ).AA Sys

def

= AA ✄

{run} A1

0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 5 10 15 20 25 30 Probability Time, t PEPA model: transient X_1 -> X_1 Steady state: X_1

JTB [18/07/2005] – p. 6/21

slide-19
SLIDE 19

Types of Analysis

Steady-state and transient analysis in PEPA:

A1

def

= (start, r1 ).A2 + (pause, r2 ).A3 A2

def

= (run, r3 ).A1 + (fail, r4 ).A3 A3

def

= (recover, r1 ).A1 AA

def

= (run, ⊤).(alert, r5 ).AA Sys

def

= AA ✄

{run} A1

0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 5 10 15 20 25 30 Probability Time, t PEPA model: transient X_1 -> X_1 Steady state: X_1

JTB [18/07/2005] – p. 6/21

slide-20
SLIDE 20

Passage-time Quantiles

Extract a passage-time density from a PEPA model:

A1

def

= (start, r1 ).A2 + (pause, r2 ).A3 A2

def

= (run, r3 ).A1 + (fail, r4 ).A3 A3

def

= (recover, r1 ).A1 AA

def

= (run, ⊤).(alert, r5 ).AA Sys

def

= AA ✄

{run} A1

JTB [18/07/2005] – p. 7/21

slide-21
SLIDE 21

Example of aggregate states

Client

def

= (compute, ⊤).Client1 Client1

def

= (delay, µ).Client Server

def

= (compute, λ).Server1 Server1

def

= (recover, ν).Server Sys = (Client · · · Client

  • N

) ✄

{compute} (Server · · · Server

  • M

)

Cooperating clusters can be represented as tuples

JTB [18/07/2005] – p. 8/21

slide-22
SLIDE 22

Rate Equation Translation

Action: delay

JTB [18/07/2005] – p. 9/21

slide-23
SLIDE 23

Rate Equation Translation

Action: delay

Client1

n(Client1)µ

− − − − − − − → Client

JTB [18/07/2005] – p. 9/21

slide-24
SLIDE 24

Rate Equation Translation

Action: delay

Client1

n(Client1)µ

− − − − − − − → Client

Action: recover

Server1

n(Server1)ν

− − − − − − − → Server

JTB [18/07/2005] – p. 9/21

slide-25
SLIDE 25

Rate Equation Translation

Action: delay

Client1

n(Client1)µ

− − − − − − − → Client

Action: recover

Server1

n(Server1)ν

− − − − − − − → Server

Action: compute

Client + Server

θ(n(Client))n(Server)λ

− − − − − − − → Client1 + Server1

where θ(x) = 1 if x > 0, else 0.

JTB [18/07/2005] – p. 9/21

slide-26
SLIDE 26

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:

rcompute(Sys) = min(N⊤, Mλ)

JTB [18/07/2005] – p. 10/21

slide-27
SLIDE 27

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:

rcompute(Sys) = min(N⊤, Mλ)

If N = 0 then overall rate is 0, hence:

rcompute(Sys) = θ(N) Mλ

JTB [18/07/2005] – p. 10/21

slide-28
SLIDE 28

Dizzy setup

JTB [18/07/2005] – p. 11/21

slide-29
SLIDE 29

Dizzy simulation

JTB [18/07/2005] – p. 12/21

slide-30
SLIDE 30

Voter example

Election_Preparation ✄

L Electoral_Personae

Electoral_Personae

def

= Voter0[N] ✄

M Electoral_App

Electoral_App

def

= Collector_0[N] Counter_1[N] Administrator[N]

JTB [18/07/2005] – p. 13/21

slide-31
SLIDE 31

Early voter description

Voter0

def

= (choose, c1).Voter0_1 Voter0_1

def

= (bitcommit, b1).Voter0_2 Voter0_2

def

= (blind1, b2).Voter0_3 Voter0_3

def

= (blind2, b3).Voter0_4 Voter0_4

def

= (voter_sign, s1).Voter0_5 Voter0_5

def

= (sendA, s2).Voter0_5b Voter0_5b

def

= (sendV , ⊤).Voter1 Voter1

def

= (unblind1, u1).Voter1_1

JTB [18/07/2005] – p. 14/21

slide-32
SLIDE 32

Voter: early stage

2000 4000 6000 8000 10000 5 10 15 20 25 30 Number Time, t Number of Voter components in derivative states Voter0 Voter0_4 Voter0_5b Voter1

JTB [18/07/2005] – p. 15/21

slide-33
SLIDE 33

High-level voter description

Voter0

def

= (choose, c1) . . . (sendV , ⊤).Voter1

JTB [18/07/2005] – p. 16/21

slide-34
SLIDE 34

High-level voter description

Voter0

def

= (choose, c1) . . . (sendV , ⊤).Voter1 Voter1

def

= (unblind,u1) . . . (sendC, s6).Voter2

JTB [18/07/2005] – p. 16/21

slide-35
SLIDE 35

High-level voter description

Voter0

def

= (choose, c1) . . . (sendV , ⊤).Voter1 Voter1

def

= (unblind,u1) . . . (sendC, s6).Voter2 Voter2

def

= (check, p × c4) . . . (sendCo, s7).Voter_Finished

JTB [18/07/2005] – p. 16/21

slide-36
SLIDE 36

Voter: lifecycle

2000 4000 6000 8000 10000 12000 10 20 30 40 50 60 Number Time, t Number of Voter components in derivative states Voter0 Voter1 Voter2 Voter_Finished

JTB [18/07/2005] – p. 17/21

slide-37
SLIDE 37

High-level Election description

Election_Preparation

def

= (sendV , ⊤).Election_Preparation + · · · + (publishA, er).Election_Voting

JTB [18/07/2005] – p. 18/21

slide-38
SLIDE 38

High-level Election description

Election_Preparation

def

= (sendV , ⊤).Election_Preparation + · · · + (publishA, er).Election_Voting Election_Voting

def

= (sendC, ⊤).Election_Voting + · · · + (publishC, er).Election_Counting

JTB [18/07/2005] – p. 18/21

slide-39
SLIDE 39

High-level Election description

Election_Preparation

def

= (sendV , ⊤).Election_Preparation + · · · + (publishA, er).Election_Voting Election_Voting

def

= (sendC, ⊤).Election_Voting + · · · + (publishC, er).Election_Counting Election_Counting

def

= (sendCo, ⊤).Election_Counting + · · · + (final_publish, er).Election_Finished

JTB [18/07/2005] – p. 18/21

slide-40
SLIDE 40

Election: population of 1

0.2 0.4 0.6 0.8 1 1.2 1.4 5 10 15 20 25 30 Number Time, t Election component in derivative states Election_Preparation Election_Voting Election_Counting Election_Finished

JTB [18/07/2005] – p. 19/21

slide-41
SLIDE 41

Election + Voter: interaction

2000 4000 6000 8000 10000 10 20 30 40 50 60 Number Time, t Number of Voter derivatives against Election state Election_Preparation Election_Voting Election_Counting Election_Finished Voter0 Voter1 Voter2 Voter_Finished

JTB [18/07/2005] – p. 20/21

slide-42
SLIDE 42

Conlcusion

Novel simulation techniques based on chemical rate equations Orders of magnitude larger state spaces can be analysed Complexity of simulation method (Gibson-Bruck) is

O(log n) where n is number of rate equations

JTB [18/07/2005] – p. 21/21