[en] Modeling the power profile of mobile applications is a crucial activity to identify the causes behind energy leaks. To this aim, researchers have proposed hardware-based tools as well as model-based and software-based techniques to approximate the actual energy profile. However, all these solutions present their own advantages and disadvantages. Hardware-based tools are highly precise, but at the same time their use is bound to the acquisition of costly hardware components. Model-based tools require the calibration of parameters needed to correctly create a model on a specific hardware device. Software-based approaches do not need any hardware components, but they rely on battery measurements and, thus, they are hardware-assisted. These tools are cheaper and easier to use than hardware-based tools, but they are believed to be less precise. In this paper, we take a deeper look at the pros and cons of software-based solutions investigating to what extent their measurements depart from hardware-based solutions. To this aim, we propose a software-based tool named PETRA that we compare with the hardware-based MONSOON toolkit on 54 Android apps. The results show that PETRA performs similarly to MONSOON despite not using any sophisticated hardware components. In fact, in all the apps the mean relative error with respect to MONSOON is lower than 0.05. Moreover, for 95% of the analyzed methods the estimation error is within 5% of the actual values measured using the hardware-based toolkit.
Disciplines :
Computer science
Author, co-author :
Di Nucci, Dario; University of Salerno > Computer Science
Palomba, Fabio; University of Salerno > Computer Science
Prota, Antonio; University of Salerno > Computer Science
Panichella, Annibale ; University of Luxembourg > Interdisciplinary Centre for Security, Reliability and Trust (SNT)
Zaidman, Andy; Delft University of Technology > EWI
De Lucia, Andrea; University of Salerno > Computer Science
External co-authors :
yes
Language :
English
Title :
Software-Based Energy Profiling of Android Apps: Simple, Efficient and Reliable?
Publication date :
21 February 2017
Event name :
International Conference on Software Analysis, Evolution, and Reengineering
Event place :
Klagenfurt, Austria
Event date :
from 21-02-2017 to 24-02-2016
Audience :
International
Main work title :
Proceedings of the 24th IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER 2017)
The statistics portal association. [Online]. Available: http://www.statista.com/statistics/330695/number-of-smartphoneusers-worldwide
A. Hindle, A. Wilson, K. Rasmussen, E. J. Barlow, J. C. Campbell, and S. Romansky, "Greenminer: A hardware based mining software repositories software energy consumption framework," in Proceedings of the 11th Working Conference on Mining Software Repositories, ser. MSR 2014. New York, NY, USA: ACM, 2014, pp. 12-21. [Online]. Available: http://doi.acm.org/10.1145/2597073.2597097
C. Wilke, S. Richly, S. Gotz, C. Piechnick, and U. Aßmann, "Energy consumption and efficiency in mobile applications: A user feedback study," in Green Computing and Communications (GreenCom), 2013 IEEE and Internet of Things (iThings/CPSCom), IEEE International Conference on and IEEE Cyber, Physical and Social Computing. IEEE, 2013, pp. 134-141
J. Flinn and M. Satyanarayanan, "Energy-aware adaptation for mobile applications," in Proceedings of the Seventeenth ACM Symposium on Operating Systems Principles, ser. SOSP '99. New York, NY, USA: ACM, 1999, pp. 48-63. [Online]. Available: http://doi.acm.org/10.1145/319151.319155
C. Sahin, F. Cayci, I. L. M. Guti'errez, J. Clause, F. Kiamilev, L. Pollock, and K. Winbladh, "Initial explorations on design pattern energy usage," in Proceedings of the First International Workshop on Green and Sustainable Software, ser. GREENS '12. Piscataway, NJ, USA: IEEE Press, 2012, pp. 55-61. [Online]. Available: http://dl.acm.org/citation.cfm?id=2663779.2663789
M. Linares-V'asquez, G. Bavota, C. Bernal-C'ardenas, R. Oliveto, M. Di Penta, and D. Poshyvanyk, "Mining energy-greedy api usage patterns in android apps: An empirical study," in Proceedings of the 11th Working Conference on Mining Software Repositories, ser. MSR 2014. New York, NY, USA: ACM, 2014, pp. 2-11. [Online]. Available: http://doi.acm.org/10.1145/2597073.2597085
C. Sahin, L. Pollock, and J. Clause, "How do code refactorings affect energy usage?" in Proceedings of the 8th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ser. ESEM '14. New York, NY, USA: ACM, 2014, pp. 36:1-36:10. [Online]. Available: http://doi.acm.org/10.1145/2652524.2652538
S. Hasan, Z. King, M. Hafiz, M. Sayagh, B. Adams, and A. Hindle, "Energy profiles of Java collections classes," in Proceedings of the 38th International Conference on Software Engineering, ser. ICSE '16. New York, NY, USA: ACM, 2016, pp. 225-236. [Online]. Available: http://doi.acm.org/10.1145/2884781.2884869
J.-J. Park, J.-E. Hong, and S.-H. Lee, "Investigation for software power consumption of code refactoring techniques," in Proceedings of the Twenty-Sixth International Conference on Software Engineering and Knowledge Engineering, ser. SEKE '14, 2014
M. Harman, Y. Jia, and Y. Zhang, "Achievements, open problems and challenges for search based software testing," in 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST). IEEE, 2015, pp. 1-12
S. Hao, D. Li, W. G. J. Halfond, and R. Govindan, "Estimating mobile application energy consumption using program analysis," in Proceedings of the 2013 International Conference on Software Engineering, ser. ICSE '13. Piscataway, NJ, USA: IEEE Press, 2013, pp. 92-101. [Online]. Available: http://dl.acm.org/citation.cfm?id=2486788.2486801
R. Saborido, V. V. Arnaoudova, G. Beltrame, F. Khomh, and G. Antoniol, "On the impact of sampling frequency on software energy measurements," PeerJ PrePrints, Tech. Rep., 2015
Moonsoon-solutions. power monitor. [Online]. Available: http: //www.msoon.com/LabEquipment/PowerMonitor
I. Hur and C. Lin, "A comprehensive approach to dram power management," in 2008 IEEE 14th International Symposium on High Performance Computer Architecture, Feb 2008, pp. 305-316
P. Choudhary and D. Marculescu, "Power management of voltage/frequency island-based systems using hardware-based methods," IEEE Transactions on Very Large Scale Integration (VLSI) Systems, vol. 17, no. 3, pp. 427-438, March 2009
J. Flinn and M. Satyanarayanan, "Powerscope: A tool for profiling the energy usage of mobile applications," in WMCSA'99, 1999, pp. 1-9
A. Bourdon, A. Noureddine, R. Rouvoy, and L. Seinturier, "Powerapi: A software library to monitor the energy consumed at the process-level," in PoweERCIM News, 2013
A. Noureddine, A. Bourdon, R. Rouvoy, and L. Seinturier, "Runtime monitoring of software energy hotspots," in Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering, ser. ASE 2012. New York, NY, USA: ACM, 2012, pp. 160-169. [Online]. Available: http://doi.acm.org/10.1145/2351676.2351699
A. Pathak, Y. C. Hu, M. Zhang, P. Bahl, and Y.-M. Wang, "Finegrained power modeling for smartphones using system call tracing," in Proceedings of the sixth conference on Computer systems. ACM, 2011, pp. 153-168
A. Pathak, Y. C. Hu, and M. Zhang, "Where is the energy spent inside my app?: fine grained energy accounting on smartphones with eprof," in Proceedings of the 7th ACM european conference on Computer Systems. ACM, 2012, pp. 29-42
F. Xu, Y. Liu, Q. Li, and Y. Zhang, "V-edge: Fast self-constructive power modeling of smartphones based on battery voltage dynamics," in NSDI'13, 2013, pp. 43-56
N. Balasubramanian, A. Balasubramanian, and A. Venkataramani, "Energy consumption in mobile phones: A measurement study and implications for network applications," in Proceedings of the 9th ACM SIGCOMM Conference on Internet Measurement Conference, ser. IMC '09. New York, NY, USA: ACM, 2009, pp. 280-293. [Online]. Available: http://doi.acm.org/10.1145/1644893.1644927
F. Ding, F. Xia, W. Zhang, X. Zhao, and C. Ma, "Monitoring energy consumption of smartphones," in Internet of Things (iThings/CPSCom), 2011 International Conference on and 4th International Conference on Cyber, Physical and Social Computing. IEEE, 2011, pp. 610-613
L. Zhang, B. Tiwana, Z. Qian, Z. Wang, R. P. Dick, Z. M. Mao, and L. Yang, "Accurate online power estimation and automatic battery behavior based power model generation for smartphones," in Proceedings of the eighth IEEE/ACM/IFIP international conference on Hardware/software codesign and system synthesis. ACM, 2010, pp. 105-114
T. Do, S. Rawshdeh, and W. Shi, "ptop: A process-level power profiling tool," in in Proceedings of the 2nd Workshop on Power Aware Computing and Systems (HotPower09, 2009
N. Amsel and B. Tomlinson, "Green tracker: A tool for estimating the energy consumption of software," in CHI '10 Extended Abstracts on Human Factors in Computing Systems, ser. CHI EA '10. New York, NY, USA: ACM, 2010, pp. 3337-3342. [Online]. Available: http://doi.acm.org/10.1145/1753846.1753981
K. Aggarwal, C. Zhang, J. C. Campbell, A. Hindle, and E. Stroulia, "The power of system call traces: Predicting the software energy consumption impact of changes," in Proceedings of 24th Annual International Conference on Computer Science and Software Engineering, ser. CASCON '14. Riverton, NJ, USA: IBM Corp., 2014, pp. 219-233. [Online]. Available: http://dl.acm.org/citation.cfm?id=2735522.2735546
L. Zhang, B. Tiwana, Z. Qian, Z. Wang, R. P. Dick, Z. M. Mao, and L. Yang, "Accurate online power estimation and automatic battery behavior based power model generation for smartphones," in Proceedings of the Eighth IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis, ser. CODES/ISSS '10. New York, NY, USA: ACM, 2010, pp. 105-114. [Online]. Available: http://doi.acm.org/10.1145/1878961.1878982
A. Gupta, T. Zimmermann, C. Bird, N. Nagappan, T. Bhat, and S. Emran, "Mining energy traces to aid in software development: An empirical case study," in Proceedings of the 8th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ser. ESEM '14. New York, NY, USA: ACM, 2014, pp. 40:1-40:8. [Online]. Available: http://doi.acm.org/10.1145/2652524.2652578
D. Li, S. Hao, W. G. J. Halfond, and R. Govindan, "Calculating source line level energy information for android applications," in Proceedings of the 2013 International Symposium on Software Testing and Analysis, ser. ISSTA 2013. New York, NY, USA: ACM, 2013, pp. 78-89. [Online]. Available: http://doi.acm.org/10.1145/2483760.2483780
A. Hindle, "Green mining: A methodology of relating software change and configuration to power consumption," Empirical Softw. Engg., vol. 20, no. 2, pp. 374-409, Apr. 2015. [Online]. Available: http://dx.doi.org/10.1007/s10664-013-9276-6
C. Sahin, P. Tornquist, R. Mckenna, Z. Pearson, and J. Clause, "How does code obfuscation impact energy usage?" in Proceedings of the 2014 IEEE International Conference on Software Maintenance and Evolution, ser. ICSME '14. Washington, DC, USA: IEEE Computer Society, 2014, pp. 131-140. [Online]. Available: http://dx.doi.org/10.1109/ICSME.2014.35
A. Noureddine and A. Rajan, "Optimising energy consumption of design patterns," in Proceedings of the 37th International Conference on Software Engineering-Volume 2, ser. ICSE '15. Piscataway, NJ, USA: IEEE Press, 2015, pp. 623-626. [Online]. Available: http://dl.acm.org/citation.cfm?id=2819009.2819120
C. Bunse, H. Hpfner, E. Mansour, and S. Roychoudhury, "Exploring the energy consumption of data sorting algorithms in embedded and mobile environments," in 2009 Tenth International Conference on Mobile Data Management: Systems, Services and Middleware, May 2009, pp. 600-607
N. Hunt, P. S. Sandhu, and L. Ceze, "Characterizing the performance and energy efficiency of lock-free data structures," in 2011 15th Workshop on Interaction between Compilers and Computer Architectures, Feb 2011, pp. 63-70
M. Linares-V'asquez, G. Bavota, C. E. B. C'ardenas, R. Oliveto, M. Di Penta, and D. Poshyvanyk, "Optimizing energy consumption of guis in android apps: A multi-objective approach," in Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, ser. ESEC/FSE 2015. New York, NY, USA: ACM, 2015, pp. 143-154. [Online]. Available: http://doi.acm.org/10.1145/2786805.2786847
M. Dong and L. Zhong, "Self-constructive high-rate system energy modeling for battery-powered mobile systems," in Proceedings of the 9th international conference on Mobile systems, applications, and services. ACM, 2011, pp. 335-348
C. Zhang and A. Hindle, "A green miner's dataset: Mining the impact of software change on energy consumption," in Proceedings of the 11th Working Conference on Mining Software Repositories, ser. MSR 2014. New York, NY, USA: ACM, 2014, pp. 400-403. [Online]. Available: http://doi.acm.org/10.1145/2597073.2597130
C. Zhang, J. Campbell, and A. Hindle, "Green trace: The impact of software change on system calls and energy consumption," in in submission to Mining Software Repositories (MSR), 2014 11th IEEE Working Conference on. IEEE, 2014
X. Li and J. P. Gallagher, "Fine-grained energy modeling for the source code of a mobile application," PeerJ PrePrints, Tech. Rep., 2016
D. Li, S. Hao, J. Gui, and W. G. J. Halfond, "An empirical study of the energy consumption of android applications," in Software Maintenance and Evolution (ICSME), 2014 IEEE International Conference on, Sept 2014, pp. 121-130
L. C. Briand and I. Wieczorek, "Resource estimation in software engineering," Encyclopedia of software engineering, 2002
S. D. Conte, H. E. Dunsmore, and V. Y. Shen, Software engineering metrics and models. Benjamin-Cummings Publishing Co., Inc., 1986
D. P. U. V. Nguyen, "Studies of confidence in software cost estimation research based on the criterions mmre and pred," 2009
M. Jorgensen, "Experience with the accuracy of software maintenance task effort prediction models," IEEE Transactions on software engineering, vol. 21, no. 8, pp. 674-681, 1995
E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns: Elements of Reusable Object-oriented Software. Boston, MA, USA: Addison-Wesley Longman Publishing Co., Inc., 1995
P. Hurni, B. Nyffenegger, T. Braun, and A. Hergenroeder, "On the accuracy of software-based energy estimation techniques," in Proceedings of the 8th European Conference on Wireless Sensor Networks, ser. EWSN'11. Berlin, Heidelberg: Springer-Verlag, 2011, pp. 49-64. [Online]. Available: http://dl.acm.org/citation.cfm?id=1966251.1966257