Monitoring energy hotspots in software

Status:: 🟩
Links:: Measure energy consumption at source code level

Metadata

Authors:: Noureddine, Adel; Rouvoy, Romain; Seinturier, Lionel
Title:: Monitoring energy hotspots in software
Publication Title:: "Automated Software Engineering"
Date:: 2015
URL:: https://doi.org/10.1007/s10515-014-0171-1
DOI:: 10.1007/s10515-014-0171-1

Bibliography

Noureddine, A., Rouvoy, R., & Seinturier, L. (2015). Monitoring energy hotspots in software. Automated Software Engineering, 22(3), 291–332. https://doi.org/10.1007/s10515-014-0171-1

Zotero

Type:: #zotero/journalArticle
Zotero::

Keywords:: [Measurement, Green Software, Energy Efficiency, Benchmarking]

Relations

Abstract

Green IT has emerged as a discipline concerned with the optimization of software solutions with regards to their energy consumption. In this domain, most of the state-of-the-art solutions concentrate on coarse-grained approaches to monitor the energy consumption of a device or a process. In this paper, we report on a fine-grained runtime energy monitoring framework we developed to help developers to diagnose energy hotspots with a better accuracy. Concretely, our approach adopts a two-layer architecture including OS-level and process-level energy monitoring. OS-level energy monitoring estimates the energy consumption of processes according to different hardware devices (CPU, network card). Process-level energy monitoring focuses on Java-based applications and builds on OS-level energy monitoring to provide an estimation of energy consumption at the granularity of classes and methods. We argue that this per-method analysis of energy consumption provides better insights to the application in order to identify potential energy hotspots. In particular, our preliminary validation demonstrates that we can monitor energy hotspots of Jetty web servers and monitor their variations under stress scenarios.

Notes & Annotations

📑 Annotations (imported on 2023-12-19#12:02:06)

noureddine.etal.2015.monitoringenergyhotspots (pg. 6)

we note that power consumption is not always linearly dependent to the percentage of CPU utilization. This is due to dynamic voltage and frequency scaling (DVFS) and also to the fact that power depends on the voltage (and subsequently the frequency) of the processor. For example, a process at 100 % CPU utilization will not necessarily consume more power than a process running at 50 % CPU utilization but with a higher voltage. Therefore, a simple CPU utilization profiler is not enough in order to monitor power consumption.

noureddine.etal.2015.monitoringenergyhotspots (pg. 21)

Our results show network consumption around 0.017 W compared to CPU consumption of Iperf process around 0.9 W. These numbers show that, although CPU power is quite low (average around 0.9 W) and the network card uses all its capacity, the consumed network power is largely negligible

noureddine.etal.2015.monitoringenergyhotspots (pg. 26)

These results outline the importance of using percentages when comparing energy consuming of software code. This is mainly due to the different hardware that machines use, thus consuming different amount of energy while still keeping similar energy trends and distribution in software.

noureddine.etal.2015.monitoringenergyhotspots (pg. 27)

The goal of our approach is to detect where the energy is being spend in software, or energy hotspots. This detection allows developers and other users to understand where and how the energy is consumed, and also to detect abnormal functioning in applications (e.g., energy bugs).

noureddine.etal.2015.monitoringenergyhotspots (pg. 28)

We stress Jetty’s asynchronous REST web application example (async-rest) using ApacheBench. The latter uses 25 concurrent users with 100,000 requests. We run the experiment 5 times, for around 205 s in total execution time (the first run at 54 s, then the others run at 37 s in average due mainly to the Java JVM’s JIT functionality).

noureddine.etal.2015.monitoringenergyhotspots (pg. 31)

The goal of our approach is to observe trends in energy consumption and profile applications to detect energy hotspots. Therefore, we argue that using percentages when comparing energy consumption of methods and classes is more useful and representative than raw values. Our approach is thus useful in profiling applications in order to find the origin of energy leaks. Developers can then provide hotfixes for the application in order to reduce its energy footprint.

noureddine.etal.2015.monitoringenergyhotspots (pg. 32)

Our results show a low overhead for sampling (at around 3 %), in comparison to the high overhead of instrumentation (at around 130 %). This overhead cripples any real world uses of instrumentation for energy measurements.

noureddine.etal.2015.monitoringenergyhotspots (pg. 39)

In Seo et al. (2007), the authors propose formulae to compute the energy cost of a software component as the sum of its computational and communication energy costs. For a Java application running in a virtual machine, the authors take into account the cost of the virtual machine and eventually the cost of the called OS routines.

Seo, C., Malek, S., Medvidovic, N.: An energy consumption framework for distributed java-based systems. In: ASE’07: Proceedings of the Twenty-Second IEEE/ACM International Conference on Automated Software Engineering, pp. 421–424. ACM, New York, (2007). doi:10.1145/1321631.1321699

noureddine.etal.2015.monitoringenergyhotspots (pg. 39)

In Kansal and Zhao (2008), the authors take into account the cost of the wait and idle states of the application (e.g., an application consumes energy when waiting for a message on the network). We also take these states into account by only using the actual time spent running on a resource (i.e., CPU, network card).

Kansal, A., Zhao, F.: Fine-grained energy profiling for power-aware application design. SIGMETRICS Perform. Eval. Rev. 36(2), 26–31 (2008). doi:10.1145/1453175.1453180

noureddine.etal.2015.monitoringenergyhotspots (pg. 40)

Several open-source or commercial Java profiling tools already propose some statistics of Java applications. Tools, such as VisualVM, Java Interactive Profiler (JIP), or the Oktech Profiler, offer coarse-grained information on the application and fine-grained resource utilization statistics. However, they fail in providing power consumption information of the application at the granularity of threads or methods. For example, the profiler of VisualVM only provides self wall time (e.g., time spend between the entry and exit of the method) for its instrumented methods.