analyzing a proxy cache server performance model with the probabilistic model checker prism

31
WWV 2009 1 Analyzing a Proxy Cache Server Performance Model with the Probabilistic Model Checker PRISM Tamás Bérczes 1 , [email protected], Gábor Guta 2 , [email protected] linz.ac.at, Gábor Kusper 3 , [email protected], Wolfgang Schreiner 2 , [email protected] linz.ac.at, János Sztrik 1 , [email protected] 1.: Faculty of Informatics, University of Debrecen, Hungary, http://www.inf.unideb.hu 2.: Research Institute for Symbolic Computation (RISC), Johannes Kepler University, Linz, Austria, http://www.risc.uni-linz.ac.at 3.: Esterházy Károly College, Eger, Hungary, http://www.ektf.hu

Upload: mira

Post on 30-Jan-2016

32 views

Category:

Documents


0 download

DESCRIPTION

Analyzing a Proxy Cache Server Performance Model with the Probabilistic Model Checker PRISM. Tamás Bérczes 1 , [email protected], Gábor Guta 2 , [email protected], Gábor Kusper 3 , [email protected], Wolfgang Schreiner 2 , [email protected], - PowerPoint PPT Presentation

TRANSCRIPT

WWV 2009 1

Analyzing a Proxy Cache Server Performance Model with the

Probabilistic Model Checker PRISM

Tamás Bérczes1, [email protected],Gábor Guta2, [email protected],Gábor Kusper3, [email protected],Wolfgang Schreiner2, [email protected],János Sztrik1, [email protected]

1.: Faculty of Informatics, University of Debrecen, Hungary, http://www.inf.unideb.hu2.: Research Institute for Symbolic Computation (RISC), Johannes Kepler University, Linz, Austria,

http://www.risc.uni-linz.ac.at3.: Esterházy Károly College, Eger, Hungary, http://www.ektf.hu

WWV 2009 2

Motivation

• The two originally distinct areas– qualitative analysis (verification)– quantitative analysis (performance modeling)

• have in the last decade started to converge by the arise of– stochastic/probabilistic model checking.

• One attempt towards this goal is to compare techniques and tools from both communities by concrete application studies.

• The presented paper is aimed at exactly this direction.

WWV 2009 3

Case Study

• We apply PRISM to re-assess some web server performance models with proxy cache servers that have been previously described and analyzed in the literature:– L. P. Slothouber. A Model of Web Server

Performance. Proceedings of the 5th International World Wide Web Conference, 1996.

– I. Bose and H. K. Cheng. Performance Models of a Firm’s Proxy Cache Server. Decision Support Systems, 29:47–57, 2000.

WWV 2009 4

The System Performance Models of a Firm’s Proxy Cache Server

Client

Proxy Cache Server(PCS)

Case A:With probability p the request can be answered by the PCS.

requests a file with rate lambaand with average file size F.

sends back the filein a loop (F > Bxc)

WWV 2009 5

The System Performance Models of a Firm’s Proxy Cache Server

Proxy Cache Server(PCS)

Case B:With probability 1-p the request must be forwardedto a remote web server.

Web Server

requests the file froma remote web serverwith rate (1-p)lambda

sends back the filein a loop (F > Bs)

Client

WWV 2009 6

Derived Constants

• l1 = lambda1 = p * lambda

• l2 = lambda2 = (1-p) lambda

• Let q be the probability, that the Web Server can send the requested file at once.

• q = min{1, Bs / F)

• l2’ = lambda2prime = lambda2 / q

WWV 2009 7

Orig

inal

Mod

el

WWV 2009 8

Original Equation for Response Time

WWV 2009 9

Original Response Time Diagram

WWV 2009 10

PRISM

• A Probabilistic Model Checker, developed at University of Oxford

• Supports 3 models:

1. Discrete-time Markov chain (DTMC)

2. Markov decision processes (MDP)

3. Continuous-time Markov chain (CTMC); we use this one

WWV 2009 11

PRISM

• In PRISM one gives the model by a– Finite state transition system

• qualitative aspects of the system

– Associate rates to the individual state transitions• quantitative aspects of the system

• Mathematical model:– Continuous-time Markov chain (CTMC)

• The model can be analyzed by queries– in the language of Continuous Stochastic Logic

WWV 2009 12

Programming PRISM• Each process contains declarations of

– state variables:

vname: [minv..maxv] INIT initv;– state transitions of form:

[label] guard -> rate : update;• guard: A transition is enabled to execute if its guard

condition evaluates to true;• rate: it executes with a certain (exponentially distributed)

rate.• update: performs an update on its state variables:

vname’ = vname-1• label: Transitions in different processes with the same label

execute synchronously as a single combined transition.

WWV 2009 13

Example

// generate requests at rate lambda

// [label] guard -> rate : update;module jobs [accept] true -> lambda : true;endmodule

WWV 2009 14

The System in PRISM

• This network consists of four queues: – one models the Proxy Cache Server– two model the Web server, input/output– one models the loop to download the requested file.

• We have a job-source:– Users generates jobs, rate: lambda.

• We have 5 models together:– module jobs– module PCS– module server_input_queue– module server_output_queue– module client_queue

WWV 2009 15

How to Implement a Queue?

WWV 2009 16

State Variables

• Each model has a counter, which contains the number of request in the represented queue.

• Note: We make no distinction between requests.• Example:

module PCS pxc: [0..IP] init 0; …endmodule

WWV 2009 17

[label] guard -> rate : update;

• Each module has (generally) two state transitions.• One transition (or more) for receiving requests.• One transition (or more) for serving requests.• The first type increases the counter.• The second one decreases it.module PCS pxc: [0..IP] init 0;

[accept] pxc < IP -> 1 :(pxc’ = pxc+1); [sforward] (pxc > 0) -> (1/Ixc)*(1-p) : (pxc’ = pxc-1);

[panswer] (pxc > 0) -> (1/Ixc)*p : (pxc’ = pxc-1);

endmodule

WWV 2009 18

[label] guard -> rate : update;

• Each module has (generally) two transitions.• One transition (or more) for receiving requests.• Guard: there is place in the queue.• One transition (or more) for serving requests.• Guard: there is at least one request in the queue.module PCS pxc: [0..IP] init 0; [accept] (pxc < IP) -> 1 :(pxc’ = pxc+1); [sforward] (pxc > 0) -> (1/Ixc)*(1-p) : (pxc’ = pxc-1);

[panswer] (pxc > 0) -> (1/Ixc)*p : (pxc’ = pxc-1);

endmodule

WWV 2009 19

[label] guard -> rate : update;

• The rate of the server transactions has generally this shape:• 1/t * p, where

– t is the time for processing a request and– P is the probability of the branch for which the transaction

corresponds.• Note that if t is a time, then 1/t is a rate.• Example, where Ixc is the PCS initialization time:module PCS … [sforward] (pxc > 0) -> (1/Ixc)*(1-p) : (pxc’ = pxc-1);

[panswer] (pxwaiting > 0) -> (1/Ixc)*p : (pxc’ = pxc-1);

endmodule

WWV 2009 20

[label] guard -> rate : update;

• If two queues, say A and B, are connected, then the server transaction of A and the receiver transaction of B have to be synchronous, i.e., they have to have the same label.

• The rate of the receiver transactions are always 1, because product of rates rarely makes sense.

module PCS … [sforward] (pxc > 0) -> (1/Ixc)*(1-p) : (pxc’ = pxc-1);

endmodulemodule server_input_queue … [sforward] (sic < IA)-> 1 : (sic’=sic+1); …endmodule

WWV 2009 21

A Question!

WWV 2009 22

Implement this server!Which is the right solution?

• Users send request with rate lambda.• The server initialization time is Is, the buffer size is Bs, static server

time is Ys, and the dynamic server rate is Rs.

Solution A

module Server RC[0..size] init 0; RC<size->lambda: RC’=RC+1; [pcs] RC>0-> 1/Is*1/(Ys+Bs/Rs): RC ’ =RC-1;endmodule

Solution B

module ServerInputQueue RC[0..size] init 0; RC<size -> lambda: RC’=RC+1; [serve] RC>0 -> 1/Is: RC’ =RC-1;endmodulemodule ServerOutputQueue AC[0..size] init 0; [serve] AC<size -> 1: AC’=AC+1; [pcs] AC>0 -> 1/(Ys+Bs/Rs): AC’=AC-1;endmodule

WWV 2009 23

Who to Compute the Expected Response Time?

• Program:module PCS pxc: [0..IP] init 0; …endmodule• Reward: rewards "time" true : (pxc+…) / lambda; endrewards• CSL query (R: expected value, S: steady-state): R{"time"}=? [ S ]

WWV 2009 24

Response Time:Original Numerical Results andResults Computed by PRISM

WWV 2009 25

Errors in Performance Models of a Firm’s Proxy Cache Server.

• Client Network Bandwidth and Server Network Bandwidth are modeled as queues.

• “branching” should not start after the Server Network, but before.

• One queue is missing to simulate the looping process of sending and receiving files by the client.

WWV 2009 26

Orig

inal

Mod

el

WWV 2009 27

Cor

rect

ed M

odel

WWV 2009 28

Original and Corrected Equations for Response Time

WWV 2009 29

Response Time:Numerical Results for Corrected

Equation andResults Computed by PRISM

WWV 2009 30

Conclusion

• The PRISM modeling language can describe queuing networks by – representing every network node as a module– with explicit qualitative and quantitative descriptions

• Thus, it forces us to be much more precise about the system model– which may first look like a nuisance,– but shows its advantage when we want to argue

about the adequacy of the model.

WWV 2009 31

Thank you for your attention!

Tamás Bérczes1, [email protected],Gábor Guta2, [email protected],Gábor Kusper3, [email protected],Wolfgang Schreiner2, [email protected],János Sztrik1, [email protected]

1.: Faculty of Informatics, University of Debrecen, Hungary, http://www.inf.unideb.hu2.: Research Institute for Symbolic Computation (RISC), Johannes Kepler University, Linz, Austria,

http://www.risc.uni-linz.ac.at3.: Esterházy Károly College, Eger, Hungary, http://www.ektf.hu