Where is the energy spent inside my app?: fine grained energy accounting on smartphones with Eprof

Where is the energy spent inside my app? Despite the immense popularity of smartphones and the fact that energy is the most crucial aspect in smartphone programming, the answer to the above question remains elusive. This paper first presents eprof, the first fine-grained energy profiler for smartphone apps. Compared to profiling the runtime of applications running on conventional computers, profiling energy consumption of applications running on smartphones faces a unique challenge, asynchronous power behavior, where the effect on a component's power state due to a program entity lasts beyond the end of that program entity. We present the design, implementation and evaluation of eprof on two mobile OSes, Android and Windows Mobile. We then present an in-depth case study, the first of its kind, of six popular smartphones apps (including Angry-Birds, Facebook and Browser). Eprof sheds lights on internal energy dissipation of these apps and exposes surprising findings like 65%-75% of energy in free apps is spent in third-party advertisement modules. Eprof also reveals several "wakelock bugs", a family of "energy bugs" in smartphone apps, and effectively pinpoints their location in the source code. The case study highlights the fact that most of the energy in smartphone apps is spent in I/O, and I/O events are clustered, often due to a few routines. Thismotivates us to propose bundles, a new accounting presentation of app I/O energy, which helps the developer to quickly understand and optimize the energy drain of her app. Using the bundle presentation, we reduced the energy consumption of four apps by 20% to 65%.

[1]  Lin Zhong,et al.  Power modeling of graphical user interfaces on OLED displays , 2009, 2009 46th ACM/IEEE Design Automation Conference.

[2]  Lei Yang,et al.  Accurate online power estimation and automatic battery behavior based power model generation for smartphones , 2010, 2010 IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS).

[3]  Byung-Gon Chun,et al.  Augmented Smartphone Applications Through Clone Cloud Execution , 2009, HotOS.

[4]  Youngki Lee,et al.  SeeMon: scalable and energy-efficient context monitoring framework for sensor-rich mobile environments , 2008, MobiSys '08.

[5]  J. Flinn,et al.  Energy-aware adaptation for mobile applications , 1999, SOSP.

[6]  Arun Venkataramani,et al.  Energy consumption in mobile phones: a measurement study and implications for network applications , 2009, IMC '09.

[7]  Mikhail Dmitriev Profiling Java applications using code hotswapping and dynamic call graph revelation , 2004, WOSP '04.

[8]  Ramesh Govindan,et al.  Energy-delay tradeoffs in smartphone applications , 2010, MobiSys '10.

[9]  Philip Levis,et al.  Energy management in mobile devices with the cinder operating system , 2011, EuroSys '11.

[10]  Feng Zhao,et al.  Virtual machine power metering and provisioning , 2010, SoCC '10.

[11]  Kelly Koskelin,et al.  EProf : an energy profiler for the iPAQ , 2004 .

[12]  David Grove,et al.  Call graph construction in object-oriented languages , 1997, OOPSLA '97.

[13]  Jason Flinn,et al.  Energy-aware adaptation for mobile applications , 1999, SOSP.

[14]  Feng Qian,et al.  Profiling resource usage for mobile applications: a cross-layer approach , 2011, MobiSys '11.

[15]  Freeman Leigh Rawson MEMPOWER: A Simple Memory Power Analysis Tool Set , 2004 .

[16]  Feng Qian,et al.  Characterizing radio resource allocation for 3G networks , 2010, IMC '10.

[17]  Philip Levis,et al.  Usenix Association 8th Usenix Symposium on Operating Systems Design and Implementation 323 Quanto: Tracking Energy in Networked Embedded Systems , 2022 .

[18]  Gernot Heiser,et al.  An Analysis of Power Consumption in a Smartphone , 2010, USENIX Annual Technical Conference.

[19]  Mahadev Satyanarayanan,et al.  PowerScope: a tool for profiling the energy usage of mobile applications , 1999, Proceedings WMCSA'99. Second IEEE Workshop on Mobile Computing Systems and Applications.

[20]  Alec Wolman,et al.  Wireless wakeups revisited: energy management for voip over wi-fi smartphones , 2007, MobiSys '07.

[21]  Yi Wang,et al.  A framework of energy efficient mobile sensing for automatic user state recognition , 2009, MobiSys '09.

[22]  Gokhan Memik,et al.  Into the wild: Studying real user activity patterns to guide power optimizations for mobile architectures , 2009, 2009 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[23]  Paramvir Bahl,et al.  Fine-grained power modeling for smartphones using system call tracing , 2011, EuroSys '11.

[24]  David Notkin,et al.  An empirical study of static call graph extractors , 1998, TSEM.

[25]  William J. Kaiser,et al.  The Energy Endoscope: Real-Time Detailed Energy Accounting for Wireless Sensor Nodes , 2007, 2008 International Conference on Information Processing in Sensor Networks (ipsn 2008).

[26]  Ming Zhang,et al.  Bootstrapping energy debugging on smartphones: a first look at energy bugs in mobile devices , 2011, HotNets-X.

[27]  J. Michael Spivey,et al.  Fast, accurate call graph profiling , 2004, Softw. Pract. Exp..

[28]  Susan L. Graham,et al.  Gprof: A call graph execution profiler , 1982, SIGPLAN '82.

[29]  Alec Wolman,et al.  MAUI: making smartphones last longer with code offload , 2010, MobiSys '10.

[30]  Lizy Kurian John,et al.  Run-time modeling and estimation of operating system power consumption , 2003, SIGMETRICS '03.