Fine-Grained Power Modeling for Smartphones Using System Call Tracing Abhinav Pathak Purdue University pathaka@purdue.edu Y. Charlie Hu Purdue University ychu@purdue.edu Ming Zhang Microsoft Research mzh@microsoft.com Paramvir Bahl Microsoft Research bahl@microsoft.com Yi-Min Wang Microsoft Research ymwang@microsoft.com Abstract Accurate, fine-grained online energy estimation and ac- counting of mobile devices such as smartphones is of criti- cal importance to understanding and debugging the energy consumption of mobile applications. We observe that state- of-the-art, utilization-based power modeling correlates the (actual) utilization of a hardware component with its power state, and hence is insufficient in capturing several power behavior not directly related to the component utilization in modern smartphones. Such behavior arise due to various low level power optimizations programmed in the device drivers. We propose a new, system-call-based power modeling ap- proach which gracefully encompasses both utilization-based and non-utilization-based power behavior. We present the detailed design of such a power modeling scheme and its implementation on Android and Windows Mobile. Our ex- perimental results using a diverse set of applications confirm that the new model significantly improves the fine-grained as well as whole-application energy consumption accuracy. We further demonstrate fine-grained energy accounting enabled by such a fined-grained power model, via a manually im- plemented eprof, the energy counterpart of the classic gprof tool, for profiling application energy drain. Categories and Subject Descriptors D.4.8 [Operating Systems]: Performance–Modeling and Prediction. General Terms Design, Experimentation, Measurement. Keywords Smartphones, Mobile, Energy. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. EuroSys’11, April 10–13, 2011, Salzburg, Austria. Copyright c 2011 ACM 978-1-4503-0634-8/11/04. . . $10.00 1. Introduction Mobile devices such as smartphones provide significant con- venience and capability to the users. A recent market anal- ysis [Com] shows that the smartphone market is the fastest growing segment of the mobile phone market; in 2010 over 45.5 million people in the United States owned smartphones. Despite the incredible market penetration of smartphones, their utility has been and will remain severely limited by their battery life. As such, understanding the power con- sumption of applications running on mobile devices has at- tracted much research effort. Early research [Flinn 1999a;b, Mahesri 2005] has focused on power measurement, i.e., measuring the power consumption of the mobile device dur- ing the execution of an application using a power meter, with the goal of understanding energy consumption by individual applications. These studies directly rely on the availability of power meters and do not develop a power estimation model for use in the “wild” without a power meter. More recent efforts have focused on developing online power models for mobile devices. Typically, during the train- ing phase, a power consumption model is developed by run- ning sample applications, and correlating certain application behavior, or triggers, with specific power states or power state transitions, of individual components or the entire sys- tem, measured using an external power meter. The generated power model during this training phase can then be used on- line, without any measurement from a power meter, for esti- mating the energy consumption in running any application. Thus such an online power model enables application devel- opers to develop energy profiling tools to profile and con- sequently optimize the energy consumption of mobile ap- plications, without the expensive power meters, much like how performance profiling enabled by gprof [Graham 1982] has facilitated performance optimization in the past several decades.