In-vivo and offline optimisation of energy use in the presence of small energy signals: A case study on a popular Android library

Energy demands of applications on mobile platforms are increasing. As a result, there has been a growing interest in optimising their energy efficiency. As mobile platforms are fast-changing, diverse and complex, the optimisation of energy use is a non-trivial task. To date, most energy optimisation methods either use models or external meters to estimate energy use. Unfortunately, it becomes hard to build widely applicable energy models, and external meters are neither cheap nor easy to set up. To address this issue, we run application variants in-vivo on the phone and use a precise internal battery monitor to measure energy use. We describe a methodology for optimising a target application in-vivo and with application-specific models derived from the device's own internal meter based on jiffies and lines of code. We demonstrate that this process produces a significant improvement in energy efficiency with limited loss of accuracy.

[1]  Kalyanmoy Deb,et al.  An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part I: Solving Problems With Box Constraints , 2014, IEEE Transactions on Evolutionary Computation.

[2]  Westley Weimer,et al.  Post-compiler software optimization for reducing energy , 2014, ASPLOS.

[3]  Fabio Pellacini,et al.  User-configurable automatic shader simplification , 2005, ACM Trans. Graph..

[4]  Xin Yao,et al.  Many-Objective Evolutionary Algorithms , 2015, ACM Comput. Surv..

[5]  Fan Wu,et al.  Deep Parameter Optimisation , 2015, GECCO.

[6]  Alexander E. I. Brownlee,et al.  Object-Oriented Genetic Improvement for Improved Energy Consumption in Google Guava , 2015, SSBSE.

[7]  Justyna Petke,et al.  Reducing Energy Consumption Using Genetic Improvement , 2015, GECCO.

[8]  Mark Harman,et al.  Genetic Improvement of Software: A Comprehensive Survey , 2018, IEEE Transactions on Evolutionary Computation.

[9]  Ramesh Govindan,et al.  Estimating mobile application energy consumption using program analysis , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[10]  Alireza Sadeghi,et al.  EcoDroid: An Approach for Energy-Based Ranking of Android Apps , 2015, 2015 IEEE/ACM 4th International Workshop on Green and Sustainable Software.

[11]  Mark Harman,et al.  Approximate Oracles and Synergy in Software Energy Search Spaces , 2019, IEEE Transactions on Software Engineering.

[12]  Justyna Petke,et al.  Deep Parameter Optimisation for Face Detection Using the Viola-Jones Algorithm in OpenCV , 2016, SSBSE.

[13]  Narseo Vallina-Rodriguez,et al.  Exhausting battery statistics: understanding the energy demands on mobile handsets , 2010, MobiHeld '10.

[14]  Abhik Roychoudhury,et al.  Detecting energy bugs and hotspots in mobile apps , 2014, SIGSOFT FSE.

[15]  Markus Wagner,et al.  Deep parameter optimisation on Android smartphones for energy minimisation: a tale of woe and a proof-of-concept , 2017, GECCO.

[16]  Abram Hindle,et al.  GreenMiner: a hardware based mining software repositories software energy consumption framework , 2014, MSR 2014.

[17]  Ramesh Govindan,et al.  Estimating Android applications' CPU energy usage via bytecode profiling , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

[18]  Mathias Payer,et al.  Impact of GC design on power and performance for Android , 2015, SYSTOR.

[19]  Hojung Cha,et al.  AppScope: Application Energy Metering Framework for Android Smartphone Using Kernel Activity Monitoring , 2012, USENIX Annual Technical Conference.

[20]  Karel De Vogeleer,et al.  The Energy/Frequency Convexity Rule: Modeling and Experimental Validation on Mobile Devices , 2013, PPAM.

[21]  Markus Wagner,et al.  Validation of Internal Meters of Mobile Android Devices , 2017, ArXiv.

[22]  Abram Hindle,et al.  What Do Programmers Know about Software Energy Consumption? , 2016, IEEE Software.

[23]  William B. Langdon,et al.  Optimising Quantisation Noise in Energy Measurement , 2016, PPSN.

[24]  Naehyuck Chang,et al.  Cycle-accurate energy consumption measurement and analysis: case study of ARM7TDMI , 2000, ISLPED '00.

[25]  Lin Zhong,et al.  Self-constructive high-rate system energy modeling for battery-powered mobile systems , 2011, MobiSys '11.

[26]  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.

[27]  Gabriele Bavota,et al.  Optimizing energy consumption of GUIs in Android apps: a multi-objective approach , 2015, ESEC/SIGSOFT FSE.

[28]  Ding Li,et al.  Making web applications more energy efficient for OLED smartphones , 2014, ICSE.

[29]  Rajesh Gupta,et al.  Evaluating the effectiveness of model-based power characterization , 2011 .

[30]  Peter Marwedel,et al.  An Accurate and Fine Grain Instruction-Level Energy Model Supporting Software Optimizations , 2007 .

[31]  Gregory M. Kapfhammer,et al.  An experimental study of methods for executing test suites in memory constrained environments , 2009, 2009 ICSE Workshop on Automation of Software Test.

[32]  Miryung Kim,et al.  An Empirical Study of API Stability and Adoption in the Android Ecosystem , 2013, 2013 IEEE International Conference on Software Maintenance.

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

[34]  Markus Wagner,et al.  Evolutionary many-objective optimization: A quick-start guide , 2015 .

[35]  Alexander E. I. Brownlee,et al.  Search-Based Energy Optimization of Some Ubiquitous Algorithms , 2017, IEEE Transactions on Emerging Topics in Computational Intelligence.

[36]  Anantha Chandrakasan,et al.  JouleTrack: a web based tool for software energy profiling , 2001, DAC '01.

[37]  Ramesh Govindan,et al.  Calculating source line level energy information for Android applications , 2013, ISSTA.