D4.5 Iterative Quality Enhancement Tools Initial Version
D4.5 Iterative Quality Enhancement Tools Initial Version
D4.5 Iterative Quality Enhancement Tools Initial Version
Ares(2016)3988271 - 28/07/2016
Deliverable: D4.5
Title: Iterative quality enhancement tools Initial version
Editor(s): Giuliano Casale, Chen Li (IMP)
Contributor(s): Giuliano Casale (IMP), Chen Li (IMP), Weikun Wang (IMP), Jose-Ignacio
Requeno (ZAR)
Reviewers: Danilo Ardagna (PMI), Craig Sheridan (FLEXI)
Type (R/DEM/DEC): DEM
Version: 1.0
Date: 31-July-2016
Status: Final version
Dissemination level: Public
Download page: http://www.dice-h2020.eu/deliverables/
Copyright: Copyright 2016, DICE consortium All rights reserved
DICE partners
ATC: Athens Technology Centre
FLEXI: Flexiant Limited
IEAT: Institutul e-Austria Timisoara
IMP: Imperial College of Science, Technology & Medicine
NETF: Netfective Technology SA
PMI: Politecnico di Milano
PRO: Prodevelop SL
XLAB: XLAB razvoj programske opreme in svetovanje d.o.o.
ZAR: Unversidad De Zaragoza
The DICE project (February 2015-January 2018) has received funding from the European
Unions Horizon 2020 research and innovation programme under grant agreement No. 644869
Executive summary
This deliverable documents the initial work on tools for iterative quality enhancement, developed as part
of task T4.3. This component feeds results back into the design models to provide guidance to the
developer on the quality offered by the application at runtime. In the initial version, the tool is able to
estimate and fit application parameter related to memory and execution times and annotate UML models.
Moreover, initial work has been carried out towards defining architecture and algorithms for anti-pattern
detection and architecture refactoring. Initial validation has been carried across a variety of technologies,
including Cassandra, Hadoop/MapReduce, and an in-memory DB.
Glossary
ADL Architecture Description Language
ADT Anomaly Detection Tool
APR Anti-Patterns & Refactoring
PAML Performance Anti-pattern Modeling Language
CTMC Continuous-time Markov chain
DIAs Data-intensive applications
DICE Data-Intensive Cloud Applications with iterative quality enhancements
DMon DICE Monitoring platform
FG Filling-the-Gap
MARTE Modeling and Analysis of Real-Time and Embedded Systems
MCR MATLAB Compiler Runtime
MODAClouds MOdel-Driven Approach for design and execution of applications on multiple Clouds
M2M Model-to-Model Transformation
QN Queueing Network
SLOs Service level objectives
TraCT Trace checking tool
UML Unified Modelling Language
VM Virtual Machine
Table of contents
List of Figures
3 Figure 3. Manual guess of parameters by the DICE designer at DPIM model level for
performance prediction .................................................................................................................... 17
4 Figure 4. DICE-FG avoids at DTSM the parameter guessing through inference and fitting of
monitoring data ................................................................................................................................. 17
11 Figure 11. Varying the design constraints in terms of component replicability (Y yes, N no).
Components are ordered in this way: Application Server, Database Server, Database I/O ...... 36
14 Figure 14. Analytical model of Apache Cassandra used to validate DICE-FG ........................... 44
16 Figure 16. DICE-FG distribution fitting results on MapReduce execution time data ................ 45
List of Tables
Chapter 3 presents an updated architecture and design details of the Enhancement tool, which
extends the initial design provided in deliverable D1.3.
Chapter 4 presents the design principle of DICE-FG which is the key part of this initial release
Enhancement tool.
Chapter 5 discusses the new scientific algorithms we have developed specifically for the DICE-
FG module.
Chapter 6 discusses the envisioned technical approach for application refactoring and anti-pattern
detection, reporting on initial results on a cloud-based software system, as part of the Anti-
Patterns & Refactoring (APR) submodule.
Chapter 7 summarises achievements, overall progress, and outlines the future work.
Appendix A provides more detail on experimental validation of the tool against a number of cases studies.
2. Requirements
This section reviews the requirements of the ENHANCEMENT_TOOLS. Then we explain how
requirements have been fulfilled in the current prototype.
2.1. Requirements
Deliverable D1.2 Requirements specifications [1] describes the requirements analysis for the DICE
project. This section summarizes these requirements. We here list the Must have requirement of the
ENHANCEMENT_TOOLS. Should have and could have requirements are available in [1] and in
successive versions of D1.2 released on the DICE website 1.
Table 1: Resource consumption breakdown Requirement
ID R4.11
Title Resource consumption breakdown
Priority Must have
Description The DEVELOPER MUST be able to obtain via the ENHANCEMENT_TOOLS the
resource consumption breakdown into its atomic components.
ID R4.12
Title Bottleneck Identification
Priority Must have
Description The ENHANCEMENT_TOOLS MUST indicate which classes of requests represent
bottlenecks for the application in a given deployment.
ID R4.13
Title Semi-automated anti-pattern detection
Priority Must have
Description The ENHANCEMENT_TOOLS MUST feature a semi-automated analysis to detect
and notify the presence of anti-patterns in the application design.
ID R4.17
Title Enhancement tools data acquisition
Priority Must have
Description The ENHANCEMENT_TOOLS must perform its operations by retrieving the
relevant monitoring data from the MONITORING_TOOLS.
ID R4.18
Title Enhancement tools model access
Priority Must have
Description The ENHANCEMENT_TOOLS MUST be able to access the DICE profile model
associated to the considered version of the APPLICATION.
1
www.dice-h2020.eu/deliverables/
ID R4.19
Title Parameterization of simulation and optimization models.
Priority Must have
Description The ENHANCEMENT_TOOLS MUST extract or infer the input parameters needed
by the SIMULATION_TOOLS and OPTIMIZATION_TOOLS to perform the
quality analyses.
ID R4.27
Title Propagation of changes/automatic annotation of UML models
Priority Must have
Description ENHANCEMENT_TOOLS MUST be capable of automatically updating UML
models with analysis results (new values)
Together, DICE-FG and APR cover the entire workflow of the Enhancement Tool. Since the output of
DICE-FG is required by APR, in the initial work carried out in WP4 up to M18, we have focused
primarily on DICE-FG, whereas APR has been designed and the technical methodology validated, with
the goal of delivering an implementation of a prototype at M24, in conjunction with the first release of the
DICE framework, and a final version at M30, with the second release of the DICE framework.
The main logical components of the DICE-FG tool are the Analyzer and the Actuator. Below we describe
each component:
DICE-FG Analyzer: The DICE-FG Analyzer executes the statistical methods necessary to
obtain the estimates of the performance models parameters, relying on the monitoring
information available on the input files.
DICE-FG Actuator: The DICE-FG Actuator updates the parameters in the UML models, e.g.,
resource demands, think times, which are obtained from the DICE-FG Analyzer.
DICE-FG relies on the MATLAB Compiler Runtime (MCR R2016a) for execution, this is a royalty-free
environment that does not require a MATLAB license. MATLAB source code is also provided in the
release. The proposed architecture is leaner than the original FG tool developed in MODAClouds,
henceforth denoted as MODAClouds-FG, a decision we have taken considering that DICE-FG may have
to cope with a much larger number of parameters and models than MODAClouds-FG, which was more
intended for use at run-time in applications such as load-balancing. Here is a detailed comparison of the
two tools, highlighting all the major differences.
Table 8: Comparison of MODAClouds-FG and DICE-FG
MODAClouds-FG DICE-FG
consider, for each AP, a problem statement, which identifies the AP but observable problems, and the
corresponding solution actions, which need to be applied to the software system in order to remove the
SP. In our case, the solutions should support the feedback generation which leads to architecture
refactoring (e.g., a set of modifications in the parameters of models).
The DICE Anti-Patterns and Refactoring (APR) module is designed to achieve the following objectives:
Transforming UML diagrams annotated with DICE profiles to performance model (e.g., Petri
Nets and/or Queueing Networks) for performance analysis.
Specifying the selected popular AP of DIAs in a formal way (e.g., a logic formula which is
suitable for model checking, executable codes).
Detecting the potential AP from the performance model.
Generating refactoring decisions to update the architecture model (manually or automatically) to
fix the design flaws according to the AP solution.
The components of the APR module are Model-to-Model (M2M) Transformation, Anti-patterns
Detection and Architecture Refactoring as detailed below.
Model-to-Model (M2M) Transformation: The component is based on some of the
transformations developed in T3.1 and APR-specific transformations developed in T4.3. It
provides the transformation of annotated UML model with DICE Profile into quality analysis
model. The target performance models can be Petri Nets or Queueing Networks.
Anti-patterns Detection: The Anti-patterns detection component relies on the analysis results of
the M2M Transformation component. The selected anti-patterns are formally specified for
identifying if there are any anti-patterns issues in the model.
Architecture Refactoring: According to the solution of discovered anti-patterns, refactoring
decisions will be proposed, e.g., component replacement or component reassignment, to solve
them. The Architecture model will be shared back to the DICE IDE for presentation, to the user
in order to decide if the proposed modification should be applied or not.
4. DICE-FG tool
In this section, we present the design principle for DICE-FG the key component of this first release of
the Enhancement tool.
4.1. Goal
As a core component of the Enhancement tool, the DICE-FG tool plays two roles:
Updating parameters of design time model (UML models annotated with DICE Profile)
Providing in the UML resource usage breakdown information for the data-intensive application.
Together these features provide to the DICE designer the possibility to:
Benefit from a semi-automated parameterization of simulation and optimization models. This
supports the state goal of DICE of reducing the learning curve of the DICE platform for users
with limited skills in performance and reliability engineering.
Inspect in Eclipse the automated annotations placed by DICE-FG to understand the resource
usage placed by a workload across software and infrastructure resources.
The above features are graphically illustrated in Figure 3, which illustrates the model parameterization
process undertaken without DICE-FG. Figure 4 instead shows the result with the DICE-FG automatic
parameterization, i.e., the determination of parameters such as resource processing rates that are
indispensable to predict performance and reliability through the cycle of iterative refinement.
Figure 3. Manual guess of parameters by the DICE designer at DPIM model level for performance prediction
Figure 4. DICE-FG avoids at DTSM the parameter guessing through inference and fitting of monitoring data
Note that Figure 4 effectively provides a resource usage breakdown. This is because the rate of
processing is easily related to the time a request spends at each resource as follows, i.e., let R be the rate
of processing of a request at a given resource, then the mean time spent in execution at the resource is
1/R, after discount of contention overheads. Such mean time parameter is explicitly captured by the
hostDemand parameter in the DICE UML model and one of the key parameters estimated by DICE-FG.
Other parameter of interests include the parallelism level at a resource, and the inter-arrival times of jobs,
among others.
We have also been working towards annotating average memory requirements of individual jobs. At the
moment this can be estimated by DICE-FG from the data, but there is a lack of a suitable annotation in
the DICE profile, since memory annotations are inherited from UML MARTE for a host, but not for
individual job. This limitation is now identified and will be addressed in the next released of the DICE
profile.
where MCR_FOLDER needs to be replaced with the installation folder of the Matlab Compiler Runtime,
and configuration_val.xml is a test configuration file, similar to the one provided in the next section. After
the execution of DICE-FG terminates, normally within very few seconds, the UML model(s) specified
within the configuration file will be annotated with concrete value of the unknown parameters.
Detailed installation and running instructions for DICE-FG are available on the DICE-FG wiki at
https://github.com/dice-project/DICE-Enhancement-FG/wiki/.
The above configuration file specifies a complete DICE-FG analysis, consisting of a statistical
distribution fitting step and an estimation analysis step. At the end of this execution, the parameters
$redT, $RT, and $mapT in the UML model ./tests/test2/model.uml will be replaced by concrete numbers.
The <configuration> tree specifies general configuration parameters of DICE-FG, such as the
amount of data shown on the standard output.
The <dataset> tree specifies the dataset to be loaded in memory at the beginning of the DICE-FG
execution. Each execution of DICE-FG can rely only on a single dataset. The dataset will be
loaded from MAT (Matlab native) or JSON files, transformed into an internal data structure,
validated and in some case sanitized for erroneous or missing entries. A dataset is defined by a
collection of files:
ResourceDataFile contains the measurements that are used for estimation or fitting,
collected at the level of the individual resources that compose the system.
ResourceClassList is a list of text labels that assign names to different classes of jobs that
arrive at the resources. It is assumed that properties of different job classes have been
measured separately (e.g., for a NoSQL DB response times one may collect in
ResourceDataFile separate measurements for read operations and write operations).
ResourceList lists the resources at which the measurements have been collected.
SystemDataFile contains the measurements which are used for estimation or fitting,
collected across a collection of resources that compose the system. For example, the end-
to-end response time is a property that typically depends on the traversal of multiple
resources.
SystemClassList provides a list of system-wide classes. These can either be in 1-to-1
mapping with the ResourceClassList ones, or a combination therefore.
The <fitting> tree defines a fitting analysis to be carried out with a specified algorithm (here fit-
norm) on the given metric (here qlen) at the specified resource, which is specified using the
<resource> tree.
The <output> defines the handler in charge of writing the parameters to the UML models, in this
example the UML MARTE handler.
The <estimation> tree requires to estimate a missing parameter using statistical inference, for the
given resource and metrics.
The <resource> tree can be replaced by a <system> tree, which defines an estimation problem
over a collection of resources, as opposed to a single resource. This requires the SystemDataFile
and SystemClassList information.
More examples are provided within the DICE-FG release. We limit here to provide more details on the
above notions of System, Resource, SystemClass and ResourceClass using the diagram below. The figure
depicts and application composed of 3 resources:
The above definitions allow to specify in DICE-FG a variety of analyses, from estimating the
requirements of individual resource classes at a specific resource, to fitting the response time distribution
of a system class over the system resources. Such flexibility is useful to describe complex topology
featured by DIAs, such as those based on stream processing systems like Storm.
We now discuss more in the details the parameters presented in the above configuration XML file and
their allowed values.
Configuration Verbose Controls the verbose level of the tool, allowed values:
0: silent
1: normal
2: debug
Dataset period Timestamps defining the time window for the data. The times
can be logical (e.g., for simulation data) or physical (e.g.,
UNIX timestamp).
File ResourceClassList Path to input class file in .mat or .json format. The list includes
only classes in the ResourceDataFile.
File SystemClassList Path to input class file in .mat or .json format. The list includes
only classes in the SystemDataFile.
Estimation flags A string of text with custom options, see wiki for extended
documentation.
fitting flags A string of text with custom options, see wiki for extended
documentation.
resource flags A string of text with custom options, see wiki for extended
documentation.
metric class Class label, from those read in ClassList, associated to the
parameter of interest.
metric name Metric label, used to indicate to DICE-FG which metric should
be fitted. The parameter is not required by estimation
algorithms. See Section 4.3.2.1 for supported values (e.g., arvT
for arrival times).
metric type Parameter type from Table 10, e.g., hostDemand, extDelay,
etc.
More details about required parametrization for each DICE-FG option is available at the DICE-FG
repository: https://github.com/dice-project/DICE-Enhancement-FG/wiki/ .
Data is associated to a subsystem of E<=M resources. If E=1, the data is stored in ResourceDataFile,
conversely if it is associated to a subsystem of multiple resources (E>1) the data is stored in
SystemDataFile. We discuss the two cases separately.
2 Utilization n/a, in [0,1] util Holds the average CPU utilization for
each sampling window. Typically, only
overall CPU utilization is collected, thus
only the column K +1 will hold an array,
while the other columns will be empty.
times
10 JobId n/a, integer jobId Holds the id of the job that generated the
sample (e.g., id of arriving job)
ts Timestamps at the end of the sampling periods. For aggregate measurements, the
sampling period ends when all the required metrics have been collected.
util Percentage of admitted jobs in the sampling period, assuming a limited number of
jobs can be admitted in the subsystem.
arvT Timestamps of arrivals from node M+1 into any of the M resources.
respT Response time between arrival from node M+1 to return to node M+1, for each
request visiting the M resources (or a subset thereof).
respTAvg Average value of response times seen during each sampling period.
tputAvg Mean departure rate from any of the M resources to node M+1 seen during each
sampling period.
qlen Number of jobs observed in the system at the end of each sampling period.
qlenAvg Average number of jobs observed in the system at the end of each sampling period.
mem Memory usage summed across the M resources as seen at arrival instants of jobs
from node M+1.
memAvg Cumulative average memory usage summed across the M resources as seen at the
end of each sampling period.
DICE Monitoring Platform will return a JSON string which includes CPU utilization, job information, etc.
Figure 6 shows the example of obtained JSON results.
This data is then used to automatically generate a valid set of input files for DICE-FG. This is done by
loading in memory the JSON file and operating a basic parsing of individual metrics until recovering the
required information by DICE-FG shown in Table 13.
5. DICE-FG Algorithms
In this chapter we define the technical advances to the DICE-FG tool developed as part of DICE. We first
provide an overview and then summarize the algorithms part of DICE-FG.
5.1. Overview
The work done as part of DICE to extend the FG tool baseline to the specific needs of DIA development
has focused on these following:
Memory usage patterns. These are critical to understand the performance of in-memory
operations. For such operations, the DIA designer wishes to avoid memory swapping, which can
compromise performance and reliability, as it can render the application so slow to be unavailable.
Therefore, the DICE-FG methods in DICE consider this metric. We describe the support of
DICE-FG for this feature in Section 5.2.
Confidence intervals on estimates. One of the requirements of the Enhancement tools involves
providing information about the uncertainty on estimated requirements. This information can
provide a measure of confidence on the quality of the inference and, for example, suggest to the
developer and QA engineer that more test experiments are needed to gain confidence about the
parameters of the simulation and optimization models. We have investigated this problem
systematically, and we report results in Section 5.3.
Applicability to DIA of baseline algorithms for mean execution times. DIAs are also ordinary
Java-based software systems, hence several methods that apply to resource consumption
estimation in ordinary applications can also be applied as-is to DIAs. However, we are not aware
of systematic studies in the literature about this. During the second year we have investigated this
research direction by applying DICE-FG to a case study being developed jointly with the
MIKELANGELO H2020 project in the context of Cassandra performance engineering. We report
in Section 5.3 and the appendix initial results for this line of work.
Distribution of execution times. Compared to a canonical three-tier application, a DIA typically
features smaller concurrency levels, since each operation is more intensive in terms of volumes of
data processed or memory usage. Therefore, it is often the case that one has at disposal precise
measurements about the running times of an application, which are not inflated by contention
overheads. In this setting, it is possible to provide a distributional characterization of execution
times, which increases the accuracy of simulation and optimization. In Section 5.4 we describe
the extension of DICE-FG developed in DICE to fit execution time data into phase-type
distributions.
In this study we have run test experiments on a HANA testbed using an analytic workload (TPC-H)
representative of business analytics applications. The experiments have been carried out an IBM x3950
X6 server running SLES 11 SP3. This test server features 8 processor sockets with a total of 120 physical
cores and provides a total of 6 TB RAM corresponding to 750GB per socket. 64 experiments have been
carried out, varying the factors shown in Table 14.
Table 13: Description of the factors
Each factor is assigned one of two possible levels, as shown in Table 15, which considers scenarios of
varying complexity, involving multiple tenant databases.
Table 14: Lower and upper bound of each factor
Throughout each experiment, we have recorded total memory consumption of the analytic workload.
Moreover, we have carried out isolation experiments, in which the memory consumed by each individual
request was monitored, without memory interference from the other requests. Our analysis considered
two aspects:
Memory inference via stochastic models. Whether the analytic models used in DICE, in particular those
based on queueing network models and JMT, could correctly predict the total memory consumption using
only the memory consumption information of individual requests. This is done using the formula:
,
=
=1
in which Mi represents the memory consumed at the i-th time interval, Qc,i is the mean number of jobs of
class c in execution in the system during interval i, mc is the memory consumption of jobs of class c
obtained by isolation tests, and lc is the parallelism level of a class c job. This memory model depends on
the mean number of jobs in execution, Qc,i, which can either be obtained by direct measurement or via
simulation, in case of predictive studies. In this study, we use Qc,i computed by simulation and try to
match with the above formula the memory consumption observed in the real system. We point to [27] for
a description of the JMT queueing network model used to describe this application and report here the
qualitative conclusions of our study.
Memory inference via regression. DICE-FG obtains from the above expressions the memory
consumptions mc. We studied how these can be used for model-based prediction compared to developing
a memory consumption model based on response surfaces, which interpolate the experimental results
through nonlinear regression methods. Clearly, such surfaces do not require the development of a
stochastic model, hence they are simpler to fit to observations. DICE integrates the fitting of regression
surfaces as part of the Anomaly Detection tool, developed in WP4, and we have used this feature to
model memory consumption on this application, without knowledge of the memory behavior of
individual requests. We consider in particular response surfaces that encompass the six configuration
parameters varied in the experiments, trained on a fraction of the data available (8, 16 or 32 experiments).
The inference step is delegated to the computation of memory consumption using inference formulas such
as the one provided above for Mi. If the performance and reliability analysis is carried out with JMT, it is
however possible for the user to obtain a direct estimate of Mi by using a metric called FCR - Mean
Memory Consumption that has been contributed by the DICE team to JMT.
An experimental validation of the predicting capabilities of the memory estimation features integrated in
DICE-FG is given in Appendix A.1 of the present document.
Here the bs superscript indicates that the formula of the estimator is obtained by relying on a theoretical
approximation known as Bard-Schweitzer algorithm, we point the interested reader to [24] for details.
The above formula allows to compute the 95% confidence interval of the mean execution times using
the expression where c=1.96 and the term under square root is the element in inverse of
the Fisher information matrix associated to the maximum-likelihood estimator of .
We provide explicit formulas for the Fisher information matrix in [24] and these have been integrated in
DICE-FG tool as part of the DICE activities. A validation of the correctness of the expressions has been
given in [24], we point the interested reader to the paper. In the paper we show that the results of the
above confidence interval expression are exact.
In order to apply the above results to DICE-FG estimation results, the user simply needs to specify the
Confidence parameter in the input XML, as discussed in Table 11. For example, if Confidence is set to
upper then the confidence interval half-width at 95% significance level is automatically added to the
mean execution time. The same principle is also applied to fitting of statistical distributions, for example
with the fit-normal option confidence intervals are generated for both the estimators of the mean and
standard deviation for the normal and used to correct the estimate of these parameters according to the
setting of the Confidence parameter.
It is interesting to note that in both cases the execution times of the phases is quite long tailed, with the
cumulative distribution function extending over a wide range of values before converging to 100%. This
essentially means that large samples are observed in the execution time of the application, which albeit
rare can induce significant deviations from the expected execution times. As noted above, this can have a
large impact in the modelling of synchronizations in DIAs.
As shown in Table 11, DICE-FG accepts several algorithms for fitting input data to parametric
distributions, including Normal, Gamma, Exponential, and Erlang. We also added support for Markov-
chain based distribution modelling, via the fit-ph2 and fit-map2 options. We here review just the former
fitting option and point the interested reader to the DICE tutorial at ICPE 2016 for an introduction to the
Markovian arrival process fitted with the fit-map2 option [26].
In PH, an arbitrary statistical distribution is modelled by the fitting the function where is
an arbitrary probability vector to be fitted to the data, is the matrix exponential of T evaluated at point
t, and is a column vector of ones. Based on the above definitions, it is easy to see that in order to fit a
PH distribution one needs to assign the rates in the matrix T and vector automatically, up to matching
the desired cumulative distribution function.
2
https://github.com/kpctoolboxteam/kpc-toolbox
For instance, the authors in [7] have applied a M2M transformation from UML diagrams annotated with
MARTE profiles into queuing networks. They define the AP in terms of OCL rules that are evaluated at
the UML level. Next, the paper [8], [8] use the Palladio Component Model (PCM) [10] for describing
component-based software architectures, extended queuing networks as performance models, and
performance AP defined by a set of rules and actions. Finally, the work in [11] presents a Performance
Anti-Pattern Modeling Language (PAML) for models described in the Architecture Description Language
(ADL). These papers differ on the modeling language, the performance model, the language that they use
for expressing AP, and the AP that they can detect and solve.
server). These models are more suitable than UML diagrams for executing a model checking analysis.
Tools such as GreatSPN [14] allow the verification of properties expressed in terms of temporal logic
(e.g., CTL [15] or CSLta [16]) over Petri nets.
On the other hand, current efforts try to formulate the performance AP in terms of a first-order logic [17].
The temporal logics used by the verification tools are propositional formulas qualified in terms of time. In
this kind of logics, the time is used for imposing a causal relationship between two set of states of the
model determined by a propositional equation. Therefore, all properties expressible in first-order logic
can also be expressed in temporal logic.
We are also considering another option which is similar to some methodologies [7,17,18]. The idea is
translating the high level specification - UML models which annotated with DICE profiles into
quantitatively analysis performance models Queueing Network models (QN) [19]. Currently, we are
investigating PUMA [20] which might help to translate the UML models to QN. After the QN model is
generated, we can easily obtain the performance indices of interest (i.e., response time, throughput, etc.).
Since performance anti-patterns problem and solution are usually described in natural language, we need
to use a formal definition for the performance anti-patterns for anti-pattern detection. Like we mentioned
before, there are several ways to define the performance anti-patterns, for example, OCL rules, first-order
logic. We are currently doing the research on these areas to see if AP rules can be implement into our
model. Once the anti-patterns are detected, we need to provide quick and efficient feedbacks to refactor
our models. In our previous work [21,22,23], we developed an approach to refactoring cloud-based
applications for reducing the total costs while optimizing the allocation of software components. Though
DICE project focused on the Big-data application which is not the same as cloud application (e.g., the
runtime information of infrastructure, platform, and application are different), the proposed approach also
considers both the hardware and software knowledge to minimize the costs of cloud resources and it will
be a valuable reference to the Big-data application.
Once the anti-patterns are detected, the Enhancement tool will generate the feedback and refactoring
(manually or automatically) the architecture model. The refactoring decisions will help to modify the
application. Table 16 shows some popular refactoring decisions we are considering to use.
Table 15: Popular refactoring decisions
Furthermore, deployment decisions (i.e., allocation decisions for each software component to a set of
resources.) and design constraints (i.e., limiting the application of refactoring and deployment decisions
when a software component cannot be replaced or replicated) are also considered for supporting
architecture refactoring.
In order to synthetically describe the above approaches, Table 17 gives a conceptual idea of core
processing of how we might implement the performance analysis, anti-patterns detection and refactoring.
Table 16: Anti-pattern and refactoring processing
Results Interpretation & Feedback Refactoring architecture models according to detection and
Generation solution of Anti-patterns
In summary, the methodologies that we will follow for the detection and fixing AP issues in a big data
context consist of:
The description of the system using UML diagrams annotated with the DICE profile.
The identification and selection of the more important AP for the analysis in big data systems.
The transformation of UML diagrams into performance models expressed as Petri nets or
queueing networks, relying on transformations developed in task T3.1 and ad-hoc transformations
for APR.
The formalization of performance AP in code level or with a logic suitable for model checking.
The evaluation of the performance AP in the model.
If the verification tool discovers that the performance AP is present in the system, we execute a
refactorization of the software that mitigates the flaw.
We identified three main steps of our decision-making process: (i) apply to the initial model the merge
and replace refactorings to reduce the overall computational needs of the system; (ii) reassign requests
and create component replicas to reduce the complexity of the models; (iii) calculate an optimal
deployment by deciding which resources to rent and how to map components to them. After the third step,
we obtain a decision on the desirable configuration of the system that minimizes the overall costs, which
may be used to perform a reconfiguration of the deployed system. Since the application requirements and
the environment may change overtime, we expect our approach to be implemented as the decision-
making part of a loop in which the optimization and adaptation processes are repeated when there are
significant changes in the system model.
We evaluated our approach on a cloud-based distributed application [29], which represents an enterprise-
level business to business e-commerce workload of a realistic complexity. This represents an initial step
to deliver a proof-of-concept on a class of applications that are well understood, the next step will be to
focus on a specific data-intensive application and general the approach. The system is composed of an
Application Server, and a Database subsystem. Figure 11 reports the results we obtained by modifying the
design constraints on component replicability. Additional refactoring analyses are presented in [20].
Figure 11. Varying the design constraints in terms of component replicability (Y yes, N no). Components
are ordered in this way: Application Server, Database Server, Database I/O
The experiments results show that our approach is able to reduce the costs in all scenarios up to 60%
when compared to an approach that does not use model-driven application refactoring. In most of our
experiments the reassignment refactoring is typically responsible for 50% of such improvement, while the
replacement refactoring (which depends on the alternative components provided as input) is responsible
for the remaining 10%. The cost for this improvement is paid in terms of additional QN evaluations,
which has shown an increase of up to 4 times. However, since our QNs are evaluated in a matter of
seconds in our system, and the increment in convergence speed is constant, we expect our approach to be
fast enough to be used to drive periodical reconfigurations of the system. The MATLAB source code and
the Amazon EC2 price traces we used to perform these experiments are available on Zenodo (cf., [20]),
these provide a baseline for the implementation of the APR module.
The above work is an exploratory investigation which is based on our chosen cloud applications, we are
currently thinking to borrow some above ideas to help us to perform the architecture refactoring for Big-
data applications of DICE project.
Apache Cassandra
Apache Hadoop/MapReduce (see also deliverable D3.8, Section 6).
An in-memory database system (SAP HANA).
DICE-FG has been extended along several dimensions that are important to model DIAs:
We have investigated the technical approach for the future Anti-Patterns Detection and
Refactoring (APR) tool, and demonstrated the promise of the methodology on a case study
involving an enterprise cloud application.
The DICE FG tool is available online on DICEs Github repository. The following are the main links:
DICE-FG Source Code: https://github.com/dice-project/DICE-Enhancement-FG
DICE-FG Documentation: https://github.com/dice-project/DICE-Enhancement-FG/wiki
The APR module capabilities are planned for official release by M30, with the final version of this report.
The current implementation of DICE-FG will be included in the first release of the DICE framework at
M24.
The M30 implementation of APR will be included in the second release of the DICE framework at M30.
References
[1] DICE Consortium, Requirement Specification M16 update (Deliverable 1.2 companion
document), 2016, M16 updated version. http://wp.doc.ic.ac.uk/dice-h2020/wp-
content/uploads/sites/75/2016/05/Requirement-Specification-M16.pdf
[3] Smith, C. U. and Williams, L. G. (2002). New software performance antipatterns: More ways to
shoot yourself in the foot. In Int. CMG Conference, pages 667-674.
[4] Smith, C. U. and Williams, L. G. (2003). More new software performance antipatterns: Even
more ways to shoot yourself in the foot. In Computer Measurement Group Conference, pages
717-725.
[7] Cortellessa, V., Di Marco, A., Eramo, R., Pierantonio, A., and Trubiani, C. (2010). Digging into
uml models to remove performance antipatterns. In Proceedings of the 2010 ICSE Workshop on
Quantitative Stochastic Models in the Verification and Design of Software Systems, pages 9-16.
ACM.
[8] Trubiani, C. and Koziolek, A. (2011). Detection and solution of software performance
antipatterns in palladio architectural models. In ACM SIGSOFT Software Engineering Notes,
volume 36, pages 19-30. ACM.
[9] Trubiani, C., Koziolek, A., Cortellessa, V., and Reussner, R. (2014). Guilt-based handling of
software performance antipatterns in palladio architectural models. Journal of Systems and
Software, 95:141-165.
[10] Becker, S., Koziolek, H., and Reussner, R. (2009). The palladio component model for model-
driven performance prediction. Journal of Systems and Software, 82(1):3-22.
[11] Cortellessa, V., De Sanctis, M., Di Marco, A., and Trubiani, C. (2012). Enabling performance
antipatterns to arise from an adl-based software architecture. In Software Architecture (WICSA)
and European Conference on Software Architecture (ECSA), 2012 Joint Working IEEE/IFIP
Conference on, pages 310-314. IEEE.
[12] Grumberg, O. and Veith, H. (2008). 25 years of model checking: History, achievements,
perspectives. Springer, Berlin.
[14] Dipartimento di informatica, Universit di Torino (Dec., 2015). GRaphical Editor and Analyzer
for Timed and Stochastic Petri Nets. url: www.di.unito.it/~greatspn/index.html
[15] Clarke, E. M., Emerson, E. A., and Sistla, A. P. (1986). Automatic verification of finite-state
concurrent systems using temporal logic specifications. ACM Transactions on Programming
Languages and Systems (TOPLAS), 8(2):244-263.
[16] Donatelli, S., Haddad, S., and Sproston, J. (2009). Model checking timed and stochastic
properties with CSLTA. IEEE Transactions on Software Engineering, 35(2):224-240.
[17] Cortellessa, V., Di Marco, A., and Trubiani, C. (2014). An approach for modeling and detecting
software performance antipatterns based on first-order logics. Software & Systems Modeling,
13(1):391-432.
[18] Xu, J. (2010). Rule-based automatic software performance diagnosis and improvement.Perform.
67: 585611.
[19] Baskett, F., Chandy, K. M., Muntz, R. R., and Palacios, F. G.(1975). Open,Closed, and Mixed
Networks of Queues with Different Classes of Customers. J. ACM, 22(2):248260.
[20] Woodside, M., Petriu, D.C., Petriu, D.B., Shen, H., Israr, T. and Merseguer, J. (2005).
Performance by Unified Model Analysis (PUMA), Proc. WOSP '2005, Mallorca, 1-12.
[21] Dubois, D. J. and Casale, G. (2015). Autonomic Provisioning and Application Mapping on Spot
Cloud Resources. In ICCAC 15, 5768.
[22] Dubois, D. J. and Casale, G. (2016). OptiSpot: minimizing application deployment cost using
spot cloud resources. Cluster Comp., 2016.
[23] Dubois, D. J, Trubiani, C., Casale, G. (2016). Model-driven Application Refactoring to Minimize
Deployment Costs in Preemptible Cloud Resources. IEEE CLOUD 2016, San Francisco, CA,
USA.
[25] Weikun Wang, Juan F. Prez, Giuliano Casale. Filling the gap: a tool to automate parameter
estimation for software performance models. In Proc. of QUDOS@SIGSOFT FSE 2015, pages
31-32.
[26] Giuliano Casale, Simon Spinner, Weikun Wang. Automated Parameterization of Performance
Models from Measurements. In Proc. of ICPE 2016, pages 325-326.
[28] Trubiani, C., Marco, A. D., Cortellessa, V., Mani, N., and Petriu, D. C. (2014). Exploring
synergies between bottleneck analysis and performance antipatterns. In ICPE 14, 7586.
The results indicate that all the approach can produce good results, with the accuracy of simulation being
between 20% and 30%, and the accuracy of the response surface methods increasing as more data is fed
into the estimation procedure. This suggests that both methods are viable in DICE.
To further verify the applicability of this memory inference approach, we have compared the distribution
of memory usage in the real system compared to the one observed during the simulation experiments with
JMT. The results are shown below in Figure 13, showing good agreement.
Summarizing, our validation has revealed that memory consumption in DIA neither necessarily require
advanced inference techniques to decouple the memory contribution of an individual request from the one
of the others requests, nor the development of empirical response surfaces, which require extensive
experimentation. Conversely, using simple tests in isolation from each individual requests we were able
to obtain good predictive accuracy. As a result, the estimation of this parameter in UML models can
proceed directly using the averaged memory consumption collected by DMon.
The simulation considers aspects such as the CPU demand (c1_cpu), the disk demand (c1_disk), the
network demand (c*_net), and the forking (c1_fork) and joining (c1_join) of jobs into tasks that are
served either locally or by other nodes of the clusters, until conclusion (exit). The A->B elements
denote a change of request type throughout its lifetime, an abstract needed for example to distinguish
requests that are received and executed locally to a Cassandra node, from those that are received from
remote Cassandra nodes.
One of the goals of this case studies was to apply DICE-FG to the estimation of demands in DIA of this
kind, and confirm the quality of the estimated demands by mean of simulation-based prediction. Since the
NETF case study relies on Cassandra, this work also goes in the direction of validating the DICE
simulation models developed in WP3. To this end, we conducted experiments on a 4-node cluster. Each
data item was replicated 3 times across random nodes, and we considered different consistency levels for
the requests: ALL (all 3 nodes that hold the data need to retrieve the data), QUORUM (2 out of 3 need to
reply), and ONE (a single node needs to reply). In each of these experiments, we varied the number of
jobs that act as a client to the DIA, increasing their number up to reaching saturation (about 95%
utilization).
DICE-FG has been applied on each node using the utilization-based regression (UBR) algorithms in order
to obtain all required mean execution times needed to specify the model. Based on these estimated values,
we have parameterized the simulation and estimated the performance trends as the number of jobs is
increased.
The results, shown in Figure 15 below suggest that DICE-FG provides good input parameters to the
simulation model, which result in fairly accurate estimates of mean execution times. Some deviations are
seen above 30 jobs, but our investigation reveals that these are due to memory trashing effects that are not
modelled and that normally do not arise in production systems, where the application is generally tuned to
run at lighter loads than 90%.
It is quite interesting to note, in particular, that the parameterization is obtained on an experiment with 1
job and these values are then applied to the prediction of the system with more jobs. Therefore, similarly
to what observed in the case of memory consumption estimation, running experiments at low concurrency
levels and that stress features one-at-a-time appears to be sufficient to parameterize simulation models of
DIA.
Figure 16. DICE-FG distribution fitting results on MapReduce execution time data
The diagrams indicate that the PH model delivers an accurate fitting of the empirical distribution. We also
show the complementary c.d.f, which is here the probability that a reducer execution time exceeds the
value shown in the x-axis. The fitting is very accurate, illustrating the capability of the algorithms
integrated in DICE-FG to model long-tailed execution time distributions.
The above distributions have been used in the Hadoop/MapReduce case study reported in D3.8 - DICE
Optimization Tools in Chapter 6. Earlier attempts based on exponential distribution fitting produced
incorrect predictions, with large inaccuracies exceeding 60% error on response time. The introduction of
phase-type distribution resulting in much more accurate predictions of the order of 15-30% accuracy
errors.