Extracting Fluid Response times from PEPA models

29
Background Fluid response time Summary Extracting Fluid Response times from PEPA models J. T. Bradley R. Hayden W. J. Knottenbelt T. Suto Department of Computer Science Imperial College London PASTA 2008, Edinburgh {jb, rh, wjk, suto}@doc.ic.ac.uk

Transcript of Extracting Fluid Response times from PEPA models

BackgroundFluid response time

Summary

Extracting Fluid Response times from PEPAmodels

J. T. Bradley R. Hayden W. J. Knottenbelt T. Suto

Department of Computer ScienceImperial College London

PASTA 2008, Edinburgh

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

Response time suffers from state space explosion

Quantitative analysis of response times important for manyindustrial systems e.g. “95 % of broadband connectionsestablished within 2s”

Extraction of response times from underlying CTMC relieson uniformisation and then transient analysis

Requires expansion of the underlying (CTMC’s)state-space

But even simple models suffer from state space explosion

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

A not-so-simple SPA model (in PEPA)

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

System def= (P0 ‖ . . . ‖ P0

︸ ︷︷ ︸

Np

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

Nr

)

2Np+Nr states

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

A not-so-simple SPA model (in PEPA)

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

System def= (P0 ‖ . . . ‖ P0

︸ ︷︷ ︸

Np

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

Nr

)

2Np+Nr states

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

A not-so-simple SPA model (in PEPA)

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

System def= (P0 ‖ . . . ‖ P0

︸ ︷︷ ︸

Np

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

Nr

)

2Np+Nr states

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

A not-so-simple SPA model (in PEPA)

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

System def= (P0 ‖ . . . ‖ P0

︸ ︷︷ ︸

Np

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

Nr

)

2Np+Nr states

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

Aggregation is not a scalable solution

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

(P0 ‖ . . . ‖ P0︸ ︷︷ ︸

nP0

‖ P1 ‖ . . . ‖ P1︸ ︷︷ ︸

nP1

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

nR0

‖ R1 ‖ . . . ‖ R1︸ ︷︷ ︸

nR1

)

Only (Np + 1) × (Nr + 1) states if just count components in

each state . . .

. . . but e.g. 20 processors and resources, each with 10derivative states:

100150052 (aggregate) states{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

Aggregation is not a scalable solution

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

(P0 ‖ . . . ‖ P0︸ ︷︷ ︸

nP0

‖ P1 ‖ . . . ‖ P1︸ ︷︷ ︸

nP1

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

nR0

‖ R1 ‖ . . . ‖ R1︸ ︷︷ ︸

nR1

)

Only (Np + 1) × (Nr + 1) states if just count components in

each state . . .

. . . but e.g. 20 processors and resources, each with 10derivative states:

100150052 (aggregate) states{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

Fluid analysis with ODEs

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

(P0 ‖ . . . ‖ P0︸ ︷︷ ︸

nP0

‖ P1 ‖ . . . ‖ P1︸ ︷︷ ︸

nP1

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

nR0

‖ R1 ‖ . . . ‖ R1︸ ︷︷ ︸

nR1

)

P0 → P1 and R0 → R1 at ratemin(r1 × nP0 , r1 × nR0) = r1 × min(nP0 , nR0)

P1 → P0 at rate r2 × nP1

R1 → R0 at rate s × nR1

Or:dnP0

(t)dt = −r1 min(nP0(t), nR0(t)) + r2nP1(t) etc.

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

Fluid analysis with ODEs

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

(P0 ‖ . . . ‖ P0︸ ︷︷ ︸

nP0

‖ P1 ‖ . . . ‖ P1︸ ︷︷ ︸

nP1

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

nR0

‖ R1 ‖ . . . ‖ R1︸ ︷︷ ︸

nR1

)

P0 → P1 and R0 → R1 at ratemin(r1 × nP0 , r1 × nR0) = r1 × min(nP0 , nR0)

P1 → P0 at rate r2 × nP1

R1 → R0 at rate s × nR1

Or:dnP0

(t)dt = −r1 min(nP0(t), nR0(t)) + r2nP1(t) etc.

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

Fluid analysis with ODEs

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

(P0 ‖ . . . ‖ P0︸ ︷︷ ︸

nP0

‖ P1 ‖ . . . ‖ P1︸ ︷︷ ︸

nP1

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

nR0

‖ R1 ‖ . . . ‖ R1︸ ︷︷ ︸

nR1

)

P0 → P1 and R0 → R1 at ratemin(r1 × nP0 , r1 × nR0) = r1 × min(nP0 , nR0)

P1 → P0 at rate r2 × nP1

R1 → R0 at rate s × nR1

Or:dnP0

(t)dt = −r1 min(nP0(t), nR0(t)) + r2nP1(t) etc.

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

Fluid analysis with ODEs

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

(P0 ‖ . . . ‖ P0︸ ︷︷ ︸

nP0

‖ P1 ‖ . . . ‖ P1︸ ︷︷ ︸

nP1

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

nR0

‖ R1 ‖ . . . ‖ R1︸ ︷︷ ︸

nR1

)

P0 → P1 and R0 → R1 at ratemin(r1 × nP0 , r1 × nR0) = r1 × min(nP0 , nR0)

P1 → P0 at rate r2 × nP1

R1 → R0 at rate s × nR1

Or:dnP0

(t)dt = −r1 min(nP0(t), nR0(t)) + r2nP1(t) etc.

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

Fluid analysis with ODEs

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

(P0 ‖ . . . ‖ P0︸ ︷︷ ︸

nP0

‖ P1 ‖ . . . ‖ P1︸ ︷︷ ︸

nP1

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

nR0

‖ R1 ‖ . . . ‖ R1︸ ︷︷ ︸

nR1

)

P0 → P1 and R0 → R1 at ratemin(r1 × nP0 , r1 × nR0) = r1 × min(nP0 , nR0)

P1 → P0 at rate r2 × nP1

R1 → R0 at rate s × nR1

Or:dnP0

(t)dt = −r1 min(nP0(t), nR0(t)) + r2nP1(t) etc.

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

IntroductionThe stochastic process algebra, PEPAFluid analysis

Fluid analysis with ODEs (example)

0

10

20

30

40

50

60

0 0.2 0.4 0.6 0.8 1 1.2 1.4

Num

ber

of a

ctiv

e co

mpo

nent

s

Time, t

Processor0 (ODEs)Resource0 (ODEs)

Processor0 (steady state)Resource0 (steady state)

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Response time in a CTMC

Loosely, the response time from a source state to a set of giventarget states is the random variable:

“the time taken to reach one of the target states from thesource state”

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Response time as time to extinction

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).P0 R1

def= (reset , s).R0

System def= (P0 ‖ . . . ‖ P0

︸ ︷︷ ︸

Np

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

Nr

)

response time for Np processors to complete =

time to extinction of all P0 and P1 components

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Response time as time to extinction

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).Stop R1

def= (reset , s).R0

System def= (P0 ‖ . . . ‖ P0

︸ ︷︷ ︸

Np

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

Nr

)

response time for Np processors to complete =

time to extinction of all P0 and P1 components

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Response time as time to extinction

P0def= (task1, r1).P1 R0

def= (task1, r1).R1

P1def= (task2, r2).Stop R1

def= (reset , s).R0

System def= (P0 ‖ . . . ‖ P0

︸ ︷︷ ︸

Np

) ¤¢{task1}

(R0 ‖ . . . ‖ R0︸ ︷︷ ︸

Nr

)

response time for Np processors to complete =

time to extinction of all P0 and P1 components

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Response time as time to extinction (example)

0

20

40

60

80

100

0 2 4 6 8 10 12

Num

ber

of a

ctiv

e co

mpo

nent

s

Time, t

P0Stop

R0

But where do we say P0 + P1 has reached 0 (i.e. equiv. Stophas reached Np(= 100))?

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Response time as time to extinction (example)

Looks like a CDF?

0

20

40

60

80

100

0 2 4 6 8 10 12

Nu

mb

er

of

active

co

mp

on

en

ts

Time, t

P0Stop

R0

But where do we say P0 + P1 has reached 0 (i.e. equiv. Stophas reached Np(= 100))?

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Response time as time to extinction (example)

Scale by Np(= 7) and compare to actual CDF:

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 25 30

Time, t

Stop / 7CDF

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Fluid response time upper bound

Consider just the absorption period for the last component:

0

1

2

3

4

5

6

7

0 5 10 15 20 25 30

Nu

mb

er

of

active

co

mp

on

en

ts

Time, t

P0Stop

R0

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Fluid response time upper bound

Scale by Np and compare to CDF:

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 25 30

Time, t

Last Stop absorption periodCDF

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Fluid response time upper bound

Factor out the error from the ODE approximation:

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 25 30

Time, t

Last Stop absorption period (ODEs)Last Stop absorption period (SS)

CDF

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Fluid response time upper bound

Other types of (more useful) response time measures canbe dealt with similarly, e.g. regenerating processors, bycomponent duplication:

P0def= (task1, r1).P1 P ′

0def= (task1, r1).P ′

1

P1def= (task2, r2).P ′

0 P ′

1def= (task2, r2).P ′

0

One then looks at fluid absorption of the P ′

0 and P ′

1components instead of Stop

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

Summary

Response time as time to extinctionFluid lower boundFluid upper bound

Case study: hospital model

More detailed model of a hospital A & E department

Interested in response time measure for all patients topass through

5 patients, 3 nurses and 2 doctors95% quantile: CTMC: 5.45 hours, fluid upper bound: 5.48hours

100 patients, 3 nurses and 2 doctors > 10100 states95% quantile: fluid upper bound: 15.1 hours

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

SummaryConclusions

Conclusions

Intuitively can think of certain response times as times tocomponent extinction, which can be approximated (insome sense) using fluid analysis techniques

We have presented two possible senses, provably lowerand upper bounds resp., up to errors in the ODEapproximation

Accuracy of these techniques is thus dependent on theaccuracy of the original ODE approximation to the transientexpected component counts

{jb, rh, wjk, suto}@doc.ic.ac.uk

BackgroundFluid response time

SummaryConclusions

Questions?

{jb, rh, wjk, suto}@doc.ic.ac.uk

Proofs

Bounding proofs

Let X be the response time r.v. of interest and assumeP{X ≤ t} = p. Then:

E[P0(t)] ≥ 0 × (1 − p) + Np × p

= Np × p

Furthermore:

E[P0(t)] ≤ (Np − 1) × (1 − p) + Np × p

= (Np − 1) + p

{jb, rh, wjk, suto}@doc.ic.ac.uk