How to Measure Energy-Efficiency of Software: Metrics and Measurement Results Timo Johann, Markus Dick, Stefan Naumann, Eva Kern Trier University of Applied Sciences, Germany (t.johann, m.dick, s.naumann, e.kern)@umwelt-campus.de Abstract—In the field of information and computer tech- nology (ICT), saving energy has its focus set on energy efficient hardware and its operation. Recently, efforts have also been made in the area of computer software. However, the development of energy efficient software requires metrics, which measure the software’s energy consumption as well as models to monitor and minimize it. In software and software development processes they hardly exist. In this work we present a generic metric to measure software and a method to apply it in a software engineering process. Keywords-Energy Efficiency, Green Software, Metrics I. I NTRODUCTION Activities in the field of Green IT set new standards for the requirements of information and communication technology. Generally, these requirements primary concern the energy consumption of ICT. The developments in Green IT, which primarily focus on computer hardware, led to the under- standing that “the most strategic aspect of energy efficient computing will be the evolution of application software to facilitate system-wide energy efficiency” [1, p.58]. This paper presents a method to develop and apply metrics and measurement methods to measure the energy consumption that is directly related to the software. The method presented here should enable software developers to continuously measure and monitor the energy consumption of the software during the development process. It seamlessly integrates into the GREENSOFT Model (cf. figure. 1), a reference model for Green and Sustainable Software [2]. II. DEVELOPMENT OF CUSTOM METRICS Metrics for energy efficient software rely on its useful work done [3]. Since, modern software consists of manifold modules that all have a special purpose, there can be more than just one metric. The software parts can be measured individually or combined. For a proper comparison of soft- ware the measured modules should be as similar as possible. Basically a generic metric can be defined as EnergyEfficiency = UsefulWorkDone UsedEnergy . III. MEASURING THE ENERGY CONSUMPTION There already exist approaches for measuring software en- ergy consumption, mostly as black box measurement. White box measurements, relying on source code instrumentation, are hardly used. Figure 2 intends to classify the known Figure 1. The Greensoft Model [2, p. 270] methods of energy efficiency measurement. Benchmarking methods are able to measure a system as a black box and can generate a statement on how the entire system (software and hardware) performs on the whole. When it comes to measuring a given software, one cannot apply these benchmarks because each of them is customized for one specific group of tasks (database benchmarks, graphic benchmarks, etc.). The approach of Dick et al. [4] defines individual scenarios for a specific group of software (e.g. Browsers) and then measures concrete occurrences with the same scenario, which can give a better statement about the software’s energy consumption. These approaches can be categorized as black box measurements because they do not allow to take a look inside, which is their main disadvantage. That is why we propose a kind of white box measurement to tell in which part of software there is potential for energy savings. A white box method is better suited to find resource intensive parts of programs and to improve them. To do so, we will use a known technique: source code instrumentation, which is often used in the context of software profiling, e.g. for runtime analysis. The experimental set-up to perform a white box measurement consists of a set of components (cf. figure 3). The system under test runs an instrumented application and is connected to a power meter. The power meter is connected to the measuring system, where an Energy 978-1-4673-1832-7/12/$31.00 c 2012 IEEE GREENS 2012, Zurich, Switzerland 51