An investigation into energy-saving programming practices for Android smartphone app development

Developing energy efficient mobile applications is an impor- tant goal for software developers as energy usage can di- rectly affect the usability of a mobile device. Unfortunately, developers lack guidance as to how to improve the energy efficiency of their implementation and which practices are most useful. In this paper we conducted a small-scale em- pirical evaluation of commonly suggested energy-saving and performance-enhancing coding practices. In the evaluation we evaluated the degree to which these practices were able to save energy as compared to their unoptimized code coun- terparts. Our results provide useful guidance for mobile app developers. In particular, we found that bundling network packets up to a certain size and using certain coding prac- tices for reading array length information, accessing class fields, and performing invocations all led to reduced energy consumption. However, other practices, such as limiting memory usage had a very minimal impact on energy us- age. These results serve to inform the developer community about specific coding practices that can help lower the over- all energy consumption and improve the usability of their applications.

[1]  A. Sinha,et al.  JouleTrack-a Web based tool for software energy profiling , 2001, Proceedings of the 38th Design Automation Conference (IEEE Cat. No.01CH37232).

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

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

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

[5]  Ming Zhang,et al.  Where is the energy spent inside my app?: fine grained energy accounting on smartphones with Eprof , 2012, EuroSys '12.

[6]  Luca Ardito,et al.  Definition, implementation and validation of energy code smells: an exploratory study on an embedded system , 2013 .

[7]  Margaret Martonosi,et al.  Wattch: a framework for architectural-level power analysis and optimizations , 2000, Proceedings of 27th International Symposium on Computer Architecture (IEEE Cat. No.RS00201).

[8]  Lori L. Pollock,et al.  Initial explorations on design pattern energy usage , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

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

[10]  David C Linehan,et al.  Choosing "The best". , 2011, Archives of surgery.

[11]  Sam Malek,et al.  Component-Level Energy Consumption Estimation for Distributed Java-Based Software Systems , 2008, CBSE.

[12]  Lori L. Pollock,et al.  Investigating the impacts of web servers on web application energy usage , 2013, 2013 2nd International Workshop on Green and Sustainable Software (GREENS).

[13]  Suman Roychoudhury,et al.  Choosing the "Best" Sorting Algorithm for Optimal Energy Consumption , 2009, ICSOFT.

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

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

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

[17]  Luca Ardito,et al.  Profiling Power Consumption on Mobile Devices , 2013 .

[18]  Aiko Pras,et al.  Inside dropbox: understanding personal cloud storage services , 2012, Internet Measurement Conference.

[19]  Sharad Malik,et al.  Power analysis of embedded software: a first step towards software power minimization , 1994, IEEE Trans. Very Large Scale Integr. Syst..

[20]  Chi-Ying Tsui,et al.  Low power architecture design and compilation techniques for high-performance processors , 1994, Proceedings of COMPCON '94.

[21]  Sharad Malik,et al.  Instruction level power analysis and optimization of software , 1996, Proceedings of 9th International Conference on VLSI Design.

[22]  W.J. Kaiser,et al.  The low power energy aware processing (LEAP) embedded networked sensor system , 2006, 2006 5th International Conference on Information Processing in Sensor Networks.

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

[24]  Sam Malek,et al.  An energy consumption framework for distributed java-based systems , 2007, ASE.

[25]  Alexander Chatzigeorgiou,et al.  Energy Consumption Analysis of Design Patterns , 2007 .

[26]  Mary Jane Irwin,et al.  Techniques for low energy software , 1997, Proceedings of 1997 International Symposium on Low Power Electronics and Design.

[27]  Jack W. Davidson,et al.  Memory access coalescing: a technique for eliminating redundant memory accesses , 1994, PLDI '94.