performance prediction of client-server systems by high-level abstraction models

28
<for internal use only/confidential> / Copyright © Siemens AG 2006. All rights reserved. Corporate Technology Performance Prediction of Client-Server Systems by High-Level Abstraction Models SEC(R) 2008 Presented by Alexander Pastsyak and Yana Rebrova Service Queue

Upload: raanan

Post on 08-Jan-2016

40 views

Category:

Documents


0 download

DESCRIPTION

Performance Prediction of Client-Server Systems by High-Level Abstraction Models. SEC(R) 2008 Presented by Alexander Pastsyak and Yana Rebrova. Service. Queue. Outline. Motivation Formalisms to describe system performance Layered Queuing Networks (LQN) - PowerPoint PPT Presentation

TRANSCRIPT

<for internal use only/confidential> / Copyright © Siemens AG 2006. All rights reserved.

Corporate Technology

Performance Prediction of Client-Server Systems by High-Level Abstraction ModelsSEC(R) 2008

Presented by

Alexander Pastsyak and Yana Rebrova

Service

Queue

Page 2 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Outline

Motivation Formalisms to describe system performance

Layered Queuing Networks (LQN)

Performance Evaluation Process Algebra (PEPA)

Queuing Petri Nets (QPN) Architecture of the Test System ExperimentsResultsConclusion

Page 3 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Motivation

in

in

out

out

Two place buffer

Buf2in out

in

Database

Service

Software Performance modelsReal systems composed from

many components

Application server

Web server

Queue

Page 4 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

What do we want to do?

What kind of predictions can be obtained from the models

for response time and throughput characteristics?

What is the method to calibrate the models?

How to map different system architecture entities

to the model elements (build the models)?

Page 5 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Used formalisms and tools

Stochastic Process

Algebras (SPA)

Stochastic Petri

Nets (SPN)

Layered Queuing

Networks (LQN)

Formalisms

QPN Modeling Environment (QPME)

PEPA Workbench

LQNSolver

ToolsTools

A

C

T

U

A

L

I

T

Y

A

V

A

I

L

A

B

I

L

I

T

Y

Page 6 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Formalisms:Layered Queuing Networks

Request processing

Queue

Server

Client

Request

Queuing Network

Layered Queuing Network

Request processing

Queue

Server1

Client

Request1

Request processing

Queue

Server2

Request2

Page 7 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

LQN- Model Building Blocks

Processors are used by activities within a performance

model to consume time.

Tasks are used in layered queuing networks to represent

software resources

Activities are the lowest-level of specification in the

performance model.

Entries service requests and are used to differentiate the service provided by a task.

Service requests from one task to another

Precedence is used to connect activities within a task

to form an activity graph

Processors

Tasks

Entries

Activities

Requests Precedence

Page 8 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

LQN – Model Example

server

users[0]

workstation [5]

net_2[0.001]

net_1[0.001]

server_2[22]

server_1[10]

disk_1[0.01]

printer[100]

users{4} Z=3

workstations {4} network {inf}

server_1server_2

printer

disk_2

disk_1

disk_2[0.01]

disk_2

Page 9 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Formalisms:Layered Queuing Networks

Advantages Disadvantages

Models are not suitable for formal verification

LQN is the most powerful formalism to describe client-server systems

Packages for direct solution and simulation are available

Lack of good model editor with graphical user interface

Page 10 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Formalisms:Queuing Petri Nets

Generalized Colored Petri Net

Queuing Petri Net

T_Enter T_Service

TokensPlaces

Immediate transitionTimed transition

depositoryqueue

Page 11 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

QPN- Model Building Blocks

Tokens are the “value” or “state” of a place

Transitions

Places

Ordinary places Queuing places

Timed Transitions

ImmediateTransitions

Tokens

Tokens are inserted into the queue. After completion of its service, a token is immediately moved to the depository, where it becomes available for output transitions of the place.

Tokens fired onto such a place are immediately available for the corresponding output transitions

Immediate transition fires without any delay in zero time.

An enabled timed transition fires after a certain delay.

Transitions change the number of tokens in places

Page 12 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

QPN – Model Example

Ordinary place

Queuing place

Immediate transition

Clients Web Server 1 DB Server

DB connections pool

Page 13 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Formalisms:Queuing Petri Nets

Advantages Disadvantages

Easy to model distributed client-server systems

Analysis suffers the state space explosion problem and this imposes a limit on the size of the models that are analyzable

QPME tool offers convenient graphical user interface for models editing

QPME tool is under development and some problems occur in the analysis package

Difficult to model synchronous requests

Only simulation technique is currently available in QPME tool

Models are not suitable for formal verification

Allows to handle several request types in the same model

Page 14 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Formalisms:Performance Evaluation Process Algebra

Stochastic Process Algebra

Performance Evaluation Process AlgebraDuration is exponentially distributedActivity is called shared if several components synchronize over itThe rate of the shared activity is defined by cooperation with another component.

Process P1 Process P2a,r

Page 15 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

PEPA – Model Building Blocks

Components carry out activities

Activity

Combinators

Components

Combinators allow building expressions to define behavior of components via activities.

Each activity is characterized by an action type α and duration r which is exponentially distributed. This is written as a pair (α, r).

Combinators Semantic

Prefix (α, r).P

Choice P1+P2

Cooperation P1<L>P2

Hiding P/L

Constant A def = P

Page 16 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

ComponentComponent ComponentComponent

PEPA – Model Example

Client Web Server Database

Internal structure of component

a,ra1,r1

a2,r2

a5,r5

a3,r3

a4,r4

Cooperation <a_db>Cooperation <r1,r2>

Page 17 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Formalisms:Performance Evaluation Process Algebra

Advantages Disadvantages

Easy to model several synchronous components

Analysis suffers the state space explosion problem and this imposes a limit on the size of the models that are analyzable

PEPA Workbench supports only text models

Some components (like Load Balancer) are not easy to model.

Powerful tools for models analysis

Models are suitable for formal verification

Packages for direct solution and simulation are available

It’s not easy to make graphical representation of the model

Page 18 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Architecture of the Test System

Title Hardware Software

Web Load Balancer

2.16Ghz Core2Duo PC

Apache Web Server v2.2 with enabled modules mod_proxy and mod_proxy_balancer

WebServer 1

3.5Ghz Celeron PC

Apache Web Server v2.2 with enabled module mod_fast_cgi,PHP v5.2.6 compiled with fast_cgi support;CMS Joomla, v1.5.3

WebServer 2

2.2 Ghz Core2Duo PC

DB Server2.2 Ghz Core2Duo PC

MySQL v 5.1

Page 19 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Modeling of the test system - LQN

Clients

Load Balancer

Database

WebServer1 WebServer2

Request processing

[256]

users[40]

Request processing

[8]

Request processing

[8]

Request processing

[inf]

Workstationwith Users

Web Server 1 Web

Server 2

DB Server 2

Load Balancer

Page 20 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Modeling of the test system - QPN

Clients

Load Balancer

Database

WebServer1 WebServer2

=?

Thread pool

Page 21 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Modeling of the test system - PEPA

Clients

Database

WebServer1 WebServer2

Load Balancer

=?

Component

Component

Component

Component

Cooperation <L>Cooperation <L>

Page 22 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Experiments

Configuration 1 - LB

Configuration 2 – PC1

Configuration 3 – PC2

Load Balancer WebServer1, WebServer2Database

WebServer1Database

WebServer2Database

Throughput and Response Time are measured for three different

configurations with virtual users changing from 1 to 40

Page 23 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Models Calibration

Service rates for Web Server1 ,Web Server2, DB server = ?

WebServer 2 (2.2 Ghz Core2Duo) 1 User

RT = 0.6sec

UsageCPU = 35%

WebServer 2

Tprocessor = RT*UsageCPU*Ncores=

=0.6*0.35*2 = 0.42 sec

WebServer 1 (3.5Ghz Celeron)

Tprocessor = 0.42/3.5*2.2 = 0.264 sec

RateWS1 = 0.42-1=2.38 sec-1

RateWS2 = 0.26-1=3.78 sec-1

RateDB = (0.6-0.42)-1=5.5 sec-1

Need to define parameters in the models

Experiment with one webserver and special

workload – 1 user.

Get the time spent by CPU for request

processing

Identify the same time for another

webserver by normalization to CPU

frequency

Page 24 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Results:Throughput

Page 25 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Results:Response Time

Page 26 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Results:Model errors

QPME model vs.

experiment

LQNS model vs.

experiment

PEPA model vs.

experiment

PC1 5.8% 5.3% 6.4%

PC2 14.2% 15.3% 17.3%

LB 32.8% 27.2% 27.9%

QPME model vs.

experiment

LQNS model vs.

experiment

PEPA model vs.

experiment

PC1 5.2% 6.4% 4.1%

PC2 10.4% 10.3% 10.5%

LB 8.6% 8.6% 8.5%

Page 27 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Conclusions

All of the applied techniques are able to predict system behavior without

detailed knowledge about the internal system structure

Difference between model predictions and experimental results lies in the

acceptable area:

for throughput it’s less than 10%,for response time – less than 30%

Such results make possible to use model predictions during early performance

analysis of infrastructure for distributed business applications

The investigation of errors caused by hidden structure of system components

and methods to estimate them is the subject for further work

Page 28 SEC(R) 2008 © Siemens AG, Corporate TechnologyAlexander Pastsyak, Rebrova Yana

Q&A

Thank you for attention!