by Aurélien Bourdon, Adel Noureddine, Romain Rouvoy and Lionel Seinturier
Energy consumption by information and communication technologies (ICT) has been growing rapidly over recent years. Comparable to the civil aviation domain, the research community now considers ICT energy consumption as a major concern. Several studies report that energy consumption is an issue during all steps of a computer’s life, from hardware assemblage, to usage, and dismantling. Research in the area of Green IT has proposed various approaches to save energy at the hardware and software levels. In the context of software, this challenge requires identification of new development methodologies that can help reduce the energy footprint. To tackle this challenge, we propose PowerAPI, a tool to quantify this energy consumption, by providing an application programming interface (API) that monitors, in real-time, the energy consumed at the granularity of a system process.
“Two per cent of the global energy consumption”, “equivalent to the annual production of eight nuclear plants”, a number of studies agree that Information and Communication Technologies (ICT) energy consumption has become a major issue. Several studies aim at reducing this energy footprint at each step of the computer's Life Cycle Assessment (LCA). At the usage stage, this involves not only building new kinds of energy-efficient hardware but also acquiring an understanding of the energy impact of software and how we can influence it. In order to provide a basis for this knowledge, the Inria ADAM project team has developed a library, named PowerAPI, providing an application programming interface (API) to monitor in real-time the energy consumed at the granularity of a system process.
Monitor energy spent at the process level
Unlike current state-of-the-art technology, PowerAPI does not require any external device to measure energy consumption. This is a purely software approach where the estimation is based on energy analytical models that characterize the consumption of various hardware components (eg CPU, memory, disk). PowerAPI is based on a highly modular architecture where each module represents a measurement unit for a specific hardware component (see Figure 1).
Figure 1: PowerAPI architecture
One objective of PowerAPI is to provide a simple and efficient way to estimate the energy consumption of a given process. (1) Simple, because API is close to the user requirements. For instance, the question: “What is the CPU energy consumption of my process #123. Please give me fresh results, every 500 milliseconds, displayed on my console.”, can be transcribed into PowerAPI as illustrated by the instruction displayed in Figure 2, where Process(123) is the process #123, 500 milliseconds the real-time refresh period and CpuListener a listener responsible for reporting energy consumption on the user console. (2) Efficient, because the library is an actor-based framework in which the user builds the library by choosing modules to consider for the user’s particular requirements. PowerAPI is thus limited to the user’s needs, avoiding any extra computational cost.
Figure 2: Example of PowerAPI requirement
The following two research contributions, which have been developed on top of PowerAPI, demonstrate the benefits of this software library.
What is the energy consumption of the programming languages?
First, we want to compare the implementations of a given algorithm, using several programming languages. The results highlight that the choice of a programming language has an impact on the energy footprint of the application itself. Interpreted languages consume more energy than compiled ones. This result can be intuitive as a first insight, but raises the question of the rise of interpreted languages, especially with their recent increase in use on the server-side by the Web community. Details about this experiment are available in .
Where are energy hotpots located within an application?
Second, we want to delve deeper into the previous result, by monitoring not only the process, but also the process' source code itself. The aim of this experiment is to develop a tool that can provide developers a real-time cartography of energy hotspots in their application code. This study reports that, when using a Web container like Jetty, around 80 % of the global energy consumption under stress conditions is attributable to a mere seven classes (out of 146). This information is useful for developers who want to know what changes could be made to reduce the energy footprint of the application. Details about this experiment are available in .
On-going work includes the development of additional use cases for PowerAPI. In particular, in collaboration with several Green IT actors, such as ADEME, Green Code Lab, and GreenIt.fr, we are currently working on a project called Web Energy Archive that aims at monitoring and comparing the energy consumption of Internet Web sites.
 A. Noureddine et al: “A Preliminary Study of the Impact of Software Engineering on GreenIT”, Greens@ICSE’12
 A. Noureddine et al: “Runtime Monitoring of Software Energy Hotspots”, ASE’12,
Inria, LIFL, University Lille 1, France