Professional Documents
Culture Documents
G .Casale G .Serazzi 1
tutorial outline
G .Casale G .Serazzi 2
Java Modelling Tools (http://jmt.sf.net)
CS2
CS3
CS4
CS1
CS1
CS4
G .Casale G .Serazzi 3
architecture
Views
JAVA/JWAT/JMVA JSIMwiz JSIMgraph
Model
XSLT Status
XML XML
XSLT
Update
Controller
G .Casale G .Serazzi 4
software development
G .Casale G .Serazzi 6
core algorithms jSIMengine: simulation
admit
route
complete
G .Casale G .Serazzi 7
core algorithms jSIMengine: statistical analysis
Transient
(Steady State)
[Pawlikowski, CSUR, 1990] [Heidelberger&Welch, CACM, 1981]
G .Casale G .Serazzi 8
core algorithms jSIMengine: simulation stop
confidence level
traditional control
parameters
G .Casale G .Serazzi 9
Politecnico di Milano
Dip. Elettronica e Informazione
Milan, Italy
CASE STUDY 1:
Bottlenecks identification
Performance evaluation
Optimal load
closed model
multiclass workload
JABA + JMVA
G .Casale G .Serazzi 10
Outline
objectives
system topology
performance evaluation
optimal loading
G .Casale G .Serazzi
11
characteristics of the system
G .Casale G .Serazzi
12
topology of a 3-tier enterprise system
...
G .Casale G .Serazzi
13
workload parameters
G .Casale G .Serazzi
14
Service Demands (resource Loadings)
natural bottleneck
of class 1
(Storage 2) natural bottleneck
of class 2
(Storage 1)
Storage 3:
potential system bottleneck
G .Casale G .Serazzi
15
What-if analysis (JMVA with multiple executions)
fraction of
class 1 requests
G .Casale G .Serazzi
16
Bottlenecks switching (JABA asymptotic analysis)
global loadings of class 2
bottlenecks
bottlenecks
Common
system Saturation
0.0181 r/ms Sector
system
5.5 ms equiload
class 1
class 2
class 2
Common
Saturation
Sector class 1
0.48
throughput X
G .Casale G .Serazzi
Response times
18
Utilizations and Power {N=1,99}{99,1}
system
best QoS
to class 1
Storage 1
Storage 2
class 1
Common class 2
Saturation
Sector
Utilizations
G .Casale G .Serazzi Power (X/R)
19
optimized load: service demands and bottlenecks
94.5
2 95
94.5
multiple bottlenecks
equi-utilization line
Class 1
20
G .Casale G .Serazzi
optimized load: U and X
Storage 3 system
0.0209 r/ms
Storage 2
Storage 1 class 1
equi-utilization
mix
class 2
0.48
Utilizations throughput X
G .Casale G .Serazzi 21
optimized load: Response times and Residence times
Common
Saturation
Sector
class 2
system
4.78 ms
system
Storage 2
4.78 ms Storage 1
class 1 Storage 3
0.48 0.48
CASE STUDY 2:
model with multiple exit paths
open model
single class workload
different routing policies
JSIMgraph
G .Casale G .Serazzi 23
Outline
objectives
system topology
what-if analysis
G .Casale G .Serazzi
24
objectives
G .Casale G .Serazzi
25
system topology
exponential distributions
source of requests
S = 0.3 sec
0.5
path 1
utilizations
S = 1 sec
path 2
0.5
selection of the
routing policy
Casale - Serazzi 26
What-if analysis settings
enable the
control parameter what-if analysis
number of models
requested
G .Casale G .Serazzi
27
n. of customers N in the two paths (prob. routing)
path 1 path 2
G .Casale G .Serazzi
28
Utilizations (per path) with prob. routing
path 1 path 2
U = 0.89
U = 0.27
G .Casale G .Serazzi
29
system Response time (prob. routing)
mean R = 5.51 s
number of models
executed no requested precision
in this run (What-if)
30
Response time per path (prob. routing)
path 1 path 2
G .Casale G .Serazzi
31
Utilizations with least utilization routing
path 1 path 2
U = 0.41
U = 0.41
G .Casale G .Serazzi
32
Response times with least utilization routing
path 1 path 2
R = 3.55 sec
R = 0.88 sec
G .Casale G .Serazzi
33
Utilizations with Joint the Shortest Queue routing
path 1 path 2
U = 0.61
U = 0.35
G .Casale G .Serazzi
34
N of customers with JSQ routing
path 1 path 2
N = 0.88
N = 0.47
G .Casale G .Serazzi
35
Response times with JSQ routing
path 1 path 2
R = 1.72 sec
R = 0.70 sec
G .Casale G .Serazzi
36
Politecnico di Milano
Dip. Elettronica e Informazione
Milan, Italy
CASE STUDY 3
Resource Contention
(use of Finite Capacity Regions - FCR)
contention of components
hardware: I/O devices, memory, servers, ...
software: threads, locks, semaphores, ...
bandwidth
open model
single class workload
JSIMgraph
G .Casale G .Serazzi 37
modeling contention
G .Casale G .Serazzi 38
threads (resource hw/sw) contention (simple model)
DI/O=0.047s
DCPU=0.010s
clients
...
CPU I/O
sink
threads = 1
G .Casale G .Serazzi 39
model definition (unlimited threads and queue size)
selection of perf.indices
simulation results
fraction of
capacity used sink
queue resource
source of requests
= 1 20 req/sec
fraction of
n.o of requests
G .Casale G .Serazzi 40
input parameters (service demands)
G .Casale G .Serazzi 41
system Response time (=20 req/sec)
perf.indexes selected
confidence interval
transient duration
the number of
samples analyzed is
greater than the
max defined here
G .Casale G .Serazzi 42
=120 req/s, unlimited threads & queue size (JSIMgraph)
Utilization of I/O
X = 19.86 r/s
throughput
same as
no limitations
system Power
G .Casale G .Serazzi 43
Number of requests (unlimited threads & queue size)
G .Casale G .Serazzi 44
set of a Finite Capacity Region FCR
drop
G .Casale G .Serazzi 45
FCR parameters
G .Casale G .Serazzi 46
system Number of requests (limited n. threads and drop)
unlimited 15 threads
10 threads 5 threads
G .Casale G .Serazzi 47
Utilization of I/O server (limited n. threads and drop)
unlimited 15 threads
10 threads 5 threads
G .Casale G .Serazzi 48
system Response time (limited n. threads and drop)
unlimited 15 threads
10 threads 5 threads
G .Casale G .Serazzi 49
external finite queue for limited threads
queue Dserver=0.047s
clients
server
sink
the queue for threads is limited (e.g., to limit the number of connections in
case of denial of service attack, to guarantee a negotiated response time
for the accepted requests, ...)
the requests arriving when the queue is full are rejected (drop policy)
the number of threads is limited and the requests are queued in a resource
different from the server (load balancer, firewall, ...)
evaluate the combination of different admission policies
G .Casale G .Serazzi 50
set Block After Service (BAS) blocking policy
selection of the
BAS policy
BAS policy:
requests are blocked in the
sender station when the max
capacity of the receiver
max number of requests
is reached
in the station
G .Casale G .Serazzi 51
different admission policies for Queue and Server
G .Casale G .Serazzi 52
Politecnico di Milano
Dip. Elettronica e Informazione
Milan, Italy
CASE STUDY 4
closed models
single class and multiclass workloads
fork-join
JSIMgraph+JWAT
G .Casale G .Serazzi 53
performance evaluation of a multi-tier application
G .Casale G .Serazzi 54
transaction lifecycle
Worker Thread
Simultaneous
Service time (1) Resource Possession CPU
Request Server
Response Response DB query time (1) Data access
time time
G .Casale G .Serazzi 55
modelling abstraction (easier to define and study)
Client-Side Server-Side
Worker Thread
Server
Service time (1) Steps CPU
Request Server
Response Response Service time (2) Data access
time time
Service time (...)
CPU+I/O
G .Casale G .Serazzi 56
modelling multi-tier applications
send to jMVA
simulate
Exponential
N=300 Distributions
app users
Scpu = 0.072s Sdb = 0.032s
4 Servers (Cores)
PS scheduling FCR
FCR Admission
Queue is Hidden ! Zload = 0.015s
FCR Capacity
FCR Admission
Policy
G .Casale G .Serazzi 57
simulation vs jMVA model
G .Casale G .Serazzi 58
SAP Business Suite [Li, Casale, Ellahi; ICPE 2010]
Response Time
REAL
SIM
Quad-Core Server
R
S N=300 users
R S
MVA M M R S M
G .Casale G .Serazzi 59
what-if analysis adding a web service class
worker thread remains busy for the entire duration of the web
service workflow
G .Casale G .Serazzi 60
business trip planning (BTP) web service
pBTP=1.0
FCR Class-Based
Admission
G .Casale G .Serazzi 61
BTP web service sub-model
Logger
Zsce=0.025s, Exp
S2=?, Exp?
S0=?, Exp?
S1=?, Exp?
N=1 WS instance
G .Casale G .Serazzi 62
jWAT Workload Analysis Tool
Column-Oriented
Log File
Specify Format
Data Format
Templates
Load Data
G .Casale G .Serazzi 63
jWAT data filtering
Ignore Negative
Samples
G .Casale G .Serazzi 64
jWAT descriptive statistics
Scatter plots
Histogram
Hyper-Exp
(c >1)
G .Casale G .Serazzi 65
jWAT scatter plot
Scatter plot
Outliers?
G .Casale G .Serazzi 66
BTP web service sub-model
log inter-arrival
times
N=1 WS instance
Zsce=0.025s, Exp
S2=0.911
HyperExp c=2.9081
S0=0.967
HyperExp c=3.1434
S1=2.151,
HyperExp c=1.689
G .Casale G .Serazzi 67
BTP response times
e.g., Weibull,
Lognormal.
Gamma
logarithmic
transformation
G .Casale G .Serazzi 68
response time distribution logger components
Sbtp = 3.611s
Gamma c=1.44
timestamp, class id,
job id
job class
logger id
G .Casale G .Serazzi 69
response time distribution analysis
(matlab)
cumulative distribution
95th percentile
cdf
[seconds]
G .Casale G .Serazzi 70
Politecnico di Milano
Dip. Elettronica e Informazione
Milan, Italy
CONCLUSION
71
Final remarks
G .Casale G .Serazzi 72
References
G.Casale, G.Serazzi. Quantitative System Evaluation with Java Modelling Tools (Tutorial).
in Proc. of ACM/SPEC ICPE 2011 (companion paper).
M.Bertoli, G.Casale, G.Serazzi. User-Friendly Approach to Capacity Planning Studies with
Java Modelling Tools, in Proc. of SIMUTOOLS 2009.
M.Bertoli, G.Casale, G.Serazzi. JMT - Performance Engineering Tools for System Modeling.
ACM Perf. Eval. Rev., 36(4), 2009
M.Bertoli, G.Casale, G.Serazzi. The JMT Simulator for Performance Evaluation of Non
Product-Form Queueing Networks, in Proc. of SCS Annual Simulation Symposium 2007,
3-10, Norfolk, VA, Mar 2007.
M.Bertoli, G.Casale, G.Serazzi. Java Modelling Tools: an Open Source Suite for Queueing
Network Modelling and Workload Analysis, in Proc. of QEST 2006, 119-120, Sep 2006.
E.Lazowska, J.Zahorjan, G.S.Graham, K.C.Sevcik, Quantitative System Performance:
Computer System Analysis Using Queueing Network Models, Prentice-Hall, 1994.
K.Pawlikowski: Steady-State Simulation of Queuing Processes: A Survey of Problems and
Solutions. ACM Comput. Surv. 22(2): 123-170, 1990.
P.Heidelberger and P.D.Welch. A spectral method for confidence interval generation and
run length control in simulations. Comm. ACM. 24, 233-245, 1981.
S.C.Spratt. Heuristics for the startup problem. M.S. Thesis, Department of Systems
Engineering, University of Virginia, 1998.
G .Casale G .Serazzi 73
Politecnico di Milano
Dip. Elettronica e Informazione
Milan, Italy
Contact us!
g.casale@imperial.ac.uk
giuseppe.serazzi@polimi.it
74