Power Consumption Analyzer

From SDQ-Wiki
Jump to: navigation, search
Palladio Addon (Liste)
Name Power Consumption Analyzer
Contacts Christian Stier (http://sdq.ipd.kit.edu/people/christian stier/)
State Stable
Is Stand-alone Analysis? No
Extends Analyses SimuLizar, SimuCom
Extends Metamodels Annotations

Short Summary

The Power Consumption Analyzer tooling supports the analysis of power and energy consumption of software systems defined in PCM. Power distribution characteristics are defined using instances of the Power Consumption model. The Power Consumption model references PCM's Resource Environment Model and annotates each resource and ResourceContainer with its consumption characteristics.


Please refer to our publications and the dissertation by Christian Stier for details on the Power Consumption model and analysis approach.

The first few sections focus on the general use of the power consumption analysis. #Energy-Conscious Self-Adaptive Systems Analysis details the use of the extended analysis to evaluate the power consumption of self-adaptive software system. This enables the consideration of changes in power consumption caused by system adaptations or reconfigurations.


  1. Follow the Palladio setup instructions.
  2. Install the Power Consumption Analyzer via its update site.

Analysis Design and Use

Power consumption of software system strongly correlates with the utilization of active resources, e.g., CPUs and HDDs. The Power Consumption model defines the consumption characteristics of a software system dependent on the power consumption of its infrastructure. It servers and their resources with their power consumption. The model leverages reusable power models that are parametrized for specific server types and Power Distribution Units (PDUs). For details on the metamodel language design we refer to the PhD thesis by Christian Stier.

Power Consumption Analyzer (PCA) was designed to work independent of specific analysis or simulation tools. It uses measurements results stored in the Experiments (EDP2) measurement framework of Palladio. PCA iterates over a simulation experiment run and evaluates the power consumption of the analyzed system at any point in time. Based on this, it derives the energy consumption over time. Aside from total power consumption, PCA supports the analysis of subsystems on the level of nested PDUs, servers, etc.

Example Instance

An example instance for the Media Store architecture model can be found here. Perform the following steps to perform a power consumption analysis.

  1. Run the SimuCom simulation using the Example 'Energy Analysis Run.launch'. Make sure that 'Delete temporary data after analysis' is unchecked in the 'Analysis Configuration' tab, and that a valid EDP2 repository is opened in the 'Simulation' tab.
  2. Open EDP2's 'Experiments' view.
  3. Select the experiment run:

Selection of Experiment Run in EDP's 'Experiments' view.

  1. Open up the mediastoreElsbeere.infrastructure model in Eclipse's tree editor.
  2. Select the part of the infrastructure for which you want to perform the analysis. Depending on the element in the Infrastructure power distribution hierarchy you have selected, PCA aggregates the power and energy consumption of individual or multiple consumers:

Power Consumption Analysis View

  1. Open the Power Consumption Analysis view.
  2. Parametrize the analyzer, i.e., by setting the sliding window size used to aggregate the CPU utilization:

Power Consumption Analysis View

  1. Start the consumption analysis by clicking the respective button. This will open up graphs for the power consumption, as well as the cumulative energy consumption:

Power and energy consumption charts

Source code

The source code is available in the Palladio SVN.

Energy-Conscious Self-Adaptive Systems Analysis

Self-adaptive software systems adapt their configuration to react to changes in the environment, i.e. varying user demand or available resources.

There are two overlapping use cases for power consumption analysis of self-adaptive software systems.

  1. Adapting the system based on varying requirements regarding energy consumption
    1. Energy being a sparse resource: A mobile device might enforce a different performance/power consumption tradeoff when battery levels are low.
    2. Energy consumption being valued differently based on user load
      • Redistribute load to reduce peak power in data centers
      • Increase EE by redistributing load to make use of efficient resource utilization levels
  2. Analyzing the energy consumption of self-adaptive software systems.

PCA and its SimuLizar extensions support both use cases. The following explains how SimuLizar can be used to analyze Energy Efficiency (EE) of self-adaptive software systems.


Prior to installing the SimuLizar-specific extensions the core PCA needs to be set up. Furthermore, SimuLizar needs to have been installed in your Eclipse, e.g. via the centralized [Palladio p2 Repository |https://sdqweb.ipd.kit.edu/eclipse/palladiosimulator/nightly/]. The SimuLizar PCA extension can be installed via a separate p2 Repository.

Example Model

An example model that makes use of the functionality discussed in the following can be found in the GIT repository. The example model redistributes load to second server when the response time on the first server surpasses a certain threshold. As the second server is idle, the reconfiguration rule controlling the second server's state immediately starts to shut down the server. This reconfiguration rule makes use of the Actions model to specify the server state transition between on and standby states.

Using PCA with SimuLizar

The base PCA functionality as discussed in the above section works the same for SimuLizar as for other simulators like SimuCom. In order to expose energy consumption measurements to self-adaptation mechanisms, a power consumption Monitor needs to be added to SimuLizar's Monitor (*.monitor) model. This makes power measurement estimations available to self-adaptation mechanisms analyzed using SimuLizar. The measurements exposed to adaptation mechanisms are also recorded to the EDP2 repository of the simulation.

In order to record the power consumption and use it as basis of energy-conscious self-adaptations, the following Monitors need to be present in the Monitor model:

  1. Monitors that instruct the recording of resource utilization for all relevant resources. For every CPU, this requires a Monitor that points to an Active Resource Measuring Point. The Monitor should contain two Measurement Specifications:
    1. Measurement Specification with FeedThrough processing type that records the State of Active Resource metric. Triggers self-adaptation should be set to false as the values change frequently. Rather, adaptations should result from the aggrgated utilization listed next:
    2. Measurement Specification with TimeDriven processing type that records the metric Utilization of Active Resource Tuple. This specification relies on the input that results from the prior processing type.
  2. Monitors for each PDU/server for which the power consumption should be recorded. Each Monitor should point to a ResourceURIMeasuringPoint that references the respective PDU/server in the Infrastructure view (*.infrastructure) of the Power Consumption model. The metric should be set to Power Consumption Tuple. Each monitor should contain a TimeDriven processing type. If Triggers Self Adaptations is set to true, the measurements are available to SimuLizar reconfigurations in the Palladio Runtime Measurement (PRM) model.

Stateful Power Models

The Power Model used by PCA supports the definition of stateful power models. The use case of these models is the differentiation between different power consumption states of resources. Examples for these modes are node states (on, off) and power management functionality like Intel's Turbo mode. Switches between these states are triggered by switching between two power model states in a model transformation. Currently, the consideration of power model state switches is only supported by the SimuLizar power consumption analysis.

Source code

The source code for the PCA SimuLizar extension is available in the SimuLizar GIT repository.


  1. Christian Stier, Anne Koziolek, Henning Groenda, and Ralf Reussner. Model-Based Energy Efficiency Analysis of Software Architectures. In Proceedings of the 9th European Conference on Software Architecture (ECSA '15), Dubrovnik/Cavtat, Croatia, 2015, Lecture Notes in Computer Science. Springer. 2015. .pdf
  2. Christian Stier. Adaptation-Aware Architecture Modeling and Analysis of Energy Efficiency for Software Systems. PhD thesis, Karlsruher Institut für Technologie (KIT), Germany, 2018. .pdf
  3. Christian Stier, Henning Groenda, and Anne Koziolek. Towards Modeling and Analysis of Power Consumption of Self-Adaptive Software Systems in Palladio. Technical report, University of Stuttgart, Faculty of Computer Science, Electrical Engineering, and Information Technology, November 2014. Slides, .pdf