Generating Real-Time Profiles of Runtime Energy Consumption for Java Applications Muhammad Nassar, Julian Jarrett, Iman Saleh, M. Brian Blake Department of Computer Science University of Miami Coral Gables, Florida, USA m.mansour1@umiami.edu {j.jarrett, iman, m.brian.blake}@miami.edu Abstract— Energy consumption of computer-based systems is a growing concern, especially for large scaled distributed systems that operate in data centers and server farms. Currently, there exist many hardware implementations that holistically measure the consumption of energy for hardware and software systems. These approaches are limited as they measure the current power consumption of the overarching system - an approach that does not necessarily assist in making the underlying software more power-aware while under operation. This paper introduces the algorithm and process of calculating the energy consumption of Java applications at runtime. This approach is evaluated using a new energy profiler tool that is designed to integrate with a Java application leveraging the underlying physical architecture of the hardware. By incorporating the awareness of energy consumption within the software application, then that application can dynamically choose the most energy-efficient processing paths within its operations. Keywords - power consumption; java; energy; distributed systems; software profiling I. INTRODUCTION Energy consumption is a significant global challenge. Data centers and servers in the United States consume huge amounts of energy and consequently challenge the sustainability of our natural resources [8,9,10]. The use of enterprise service-oriented systems has only exacerbated the challenges [7,16]. Furthermore, on an individual basis with the prevalence of mobile devices, it is important to optimize software operations in order to extend battery capabilities. What attributes are required and which are most effective in calculating energy consumption in a runtime environment of a Java application? What are the challenges for disambiguating residual power consumption from the hardware platform with power consumed by the targeted software application? Are there approaches for reducing the amount of residual power calculated within the software application-specific calculation? To address these research questions, we introduce a unique method for profiling applications in terms of their runtime power consumption. To support this method, we conceptualized and developed a novel Energy Profiler for Java applications. The profiler integrates with Java applications in such a way that provides an energy consumption estimate for the software in question. The profiler leverages the energy model described in [1], where the authors estimate the power consumption of a computational model with N number of processors, a separate cache memory for each processor and main memory. This approach enables software developers to use energy efficiency as a key performance metric influencing their software design decisions. Moreover, software engineers will be able to abstract design practices and patterns that decrease the energy footprint of applications. We evaluate this model by comparing estimated values produced from the energy profiler with measures produce from a physical power consumption meter. Using varying programming constructs to implement the same function, we show a significant degree of accuracy with our model and implementation when comparing energy consumption trends to processing intensity. II. RELATED WORK Many frameworks have been proposed to profile power and energy consumption across different types of computer systems. These frameworks utilize both hardware and software techniques for profiling energy and target both servers and mobile devices. In the early work of one of the co-authors of this paper, a method was proposed that leveraged design-time testing of web services using generic loads of web traffic. The energy was measured during a training phase and was used to develop a model for a specific web service at various server and software states [5]. The work described in [5] and [6] uses a more predictive model applied towards the efficient power management of web services and redundantly deployed cloud environments. Some of the previous efforts in this area evaluate the overall system energy usage [11,12], while others have the capability of applying more granular measurement techniques to isolate and profile individual components. The authors in [2] introduce the PowerPak Framework; a combination of hardware and software components capable of low-level 592