Nothing Special   »   [go: up one dir, main page]

skip to main content
article

An exploratory study on assessing the energy impact of logging on Android applications

Published: 01 June 2018 Publication History

Abstract

Execution logs are debug statements that developers insert into their code. Execution logs are used widely to monitor and diagnose the health of software applications. However, logging comes with costs, as it uses computing resources and can have an impact on an application's performance. Compared with desktop applications, one additional critical computing resource for mobile applications is battery power. Mobile application developers want to deploy energy efficient applications to end users while still maintaining the ability to monitor. Unfortunately, there is no previous work that study the energy impact of logging within mobile applications. This exploratory study investigates the energy cost of logging in Android applications using GreenMiner, an automated energy test-bed for mobile applications. Around 1000 versions from 24 Android applications (e.g., Calculator, FeedEx, Firefox, and VLC) were tested with logging enabled and disabled. To further investigate the energy impacting factors for logging, controlled experiments on a synthetic application were performed. Each test was conducted multiple times to ensure rigorous measurement. Our study found that although there is little to no energy impact when logging is enabled for most versions of the studied applications, about 79% (19/24) of the studied applications have at least one version that exhibit medium to large effect sizes in energy consumption when enabling and disabling logging. To further assess the energy impact of logging, we have conducted a controlled experiment with a synthetic application. We found that the rate of logging and the number of disk flushes are significant factors of energy consumption attributable to logging. Finally, we have examined the relation between the generated OS level execution logs and mobile energy consumption. In addition to the common cross-application log events relevant to garbage collection and graphics systems, some mobile applications also have workload-specific log events that are highly correlated with energy consumption. The regression models built with common log events show mixed performance. Mobile application developers do not need to worry about conservative logging (e.g., logs generated at rates of ≤ 1 message per second), as they are not likely to impact energy consumption. Logging has a negligible effect on energy consumption for most of the mobile applications tested. Although logs have been used effectively to diagnose and debug functional problems, it is still an open problem on how to leverage software instrumentation to debug energy problems.

References

[1]
Aggarwal K, Hindle A, Stroulia E (2015) Greenadvisor: a tool for analyzing the impact of software evolution on energy consumption. In: 2015 IEEE international conference on software maintenance and evolution (ICSME), pp 311-320.
[2]
Aggarwal K, Zhang C, Campbell JC, Hindle A, Stroulia E (2014) The power of system call traces: Predicting the software energy consumption impact of changes. In: Proceedings of the 2014 conference of the center for advanced studies on collaborative research (CASCON).
[3]
Alam F, Panda PR, Tripathi N, Sharma N, Narayan S (2014) Energy optimization in android applications through wakelock placement. In: 2014 design, automation test in europe conference exhibition (DATE), pp 1-4.
[4]
Android Open Source Project. Andriod API For logging. http://developer.android.com/reference/android/util/log.html. Last accessed 02/10/2015.
[5]
Android Open Source Project. Logcat. http://developer.android.com/tools/help/logcat.html. Last accessed 02/10/2015.
[6]
Banerjee A, Chong LK, Chattopadhyay S, Roychoudhury A (2014) Detecting energy bugs and hotspots in mobile apps. In: FSE 2014. Hong Kong, China, pp 588-598.
[7]
Benjamini Y, Hochberg Y (1995) Controlling the false discovery rate: a practical and powerful approach to multiple testing. J R Stat Soc Ser B (Methodol) 57(1):289-300.
[8]
Carroll A, Heiser G (2010) An analysis of power consumption in a smartphone. In: Proceedings of the USENIXATC'10.
[9]
Chowdhury S, Varun S, Hindle A (2016) Client-side energy efficiency of HTTP/2 for web and mobile app developers. In: SANER '16. Osaka, Japan.
[10]
Chowdhury SA, Hindle A (2016) Characterizing energy-aware software projects: are they different? In: Proceedings of the 13th international conference on mining software repositories, MSR '16. ACM, New York, NY, USA, pp 508-511.
[11]
Chowdhury SA, Hindle A (2016) Greenoracle: estimating software energy consumption with energy measurement corpora. In: Proceedings of the 13th international conference on mining software repositories (MSR).
[12]
Chukwa - hadoop wiki. http://wiki.apache.org/hadoop/chukwa. Last accessed 04/18/2015.
[13]
Ding R, Zhou H, Lou J-G, Zhang H, Lin Q, Fu Q, Zhang D, Xie T (2015) Log2: a cost-aware logging mechanism for performance diagnosis. In: 2015 USENIX annual technical conference (USENIX ATC).
[14]
Dong M, Zhong L (2011) Self-constructive high-rate system energy modeling for battery-powered mobile systems. In: Proceedings of the MobiSys '11, pp 335-348.
[15]
Fedotyev A (2014) The real cost of logging. http://blog.appdynamics.com/net/the-real-cost-of-logging/. Last accessed 04/18/2015.
[16]
Flinn J, Satyanarayanan M (1999) Powerscope: a tool for profiling the energy usage of mobile applications. In: WMCSA '99. New Orleans, Louisiana, USA, pp 2-10.
[17]
Fu Q, Zhu J, Hu W, Lou J-G, Ding R, Lin Q, Zhang D, Xie T (2014) Where do developers log? An empirical study on logging practices in industry. In: Companion proceedings of the 36th international conference on software engineering, ICSE companion 2014.
[18]
Georges A, Buytaert D, Eeckhout L (2007) Statistically rigorous java performance evaluation. In: Proceedings of the 22nd annual ACM SIGPLAN conference on object-oriented programming systems and applications (OOPSLA).
[19]
Grabner A (2012) Top performance mistakes when moving from test to production: excessive logging. http://tinyurl.com/q9odfsm. Last accessed 04/18/2015.
[20]
Group TO Application response measurement - ARM. https://collaboration.opengroup.org/tech/management/arm/, visited 2014-11-24.
[21]
Gurumurthi S, Sivasubramaniam A, Irwin MJ, Vijaykrishnan N, Kandemir M, Li T, John LK (2002) Using complete machine simulation for software power estimation: the softwatt approach. In: Proceedings of the 8th international symposium on high-performance computer architecture, HPCA '02, pp 141- 150.
[22]
Hao S, Li D, Halfond WGJ, Govindan R (2013) Estimating mobile application energy consumption using program analysis. In: ICSE '13, pp 92-101.
[23]
Hasan S, King Z, Hafiz M, Sayagh M, Adams B, Hindle A (2016) Energy profiles of java collections classes. In: Proceedings of the 38th International Conference on Software Engineering, ICSE '16. ACM, New York, NY, USA, pp 225-236.
[24]
Hindle A (2013) Green mining: a methodology of relating software change and configuration to power consumption. Empir Softw Eng 20(2):374-409.
[25]
Hindle A, Wilson A, Rasmussen K, Barlow EJ, Campbell JC, Romansky S (2014) Greenminer: a hardware based mining software repositories software energy consumption framework. In: Proceedings of the 11th working conference on mining software repositories (MSR).
[26]
Hlavac M (2015) Stargazer: well-formatted regression and summary statistics tables. Harvard University, Cambridge, USA. R package version 5.2.
[27]
Hopkins WG (2016) A new view of statistics. [online accessed 2017-01-15] http://www.sportsci.org/resource/stats/index.html.
[28]
Jabbarvand R, Sadeghi A, Bagheri H, Malek S (2016) Energy-aware test-suite minimization for android apps. In: Proceedings of the 25th international symposium on software testing and analysis, ISSTA 2016, pp 425-436.
[29]
Jay A Do unused logging statements affect performance in android apps? Stack overflow http://tinyurl.com/ncf2nl9.
[30]
Jay A Log.d and impact on performance. Stack overflow http://stackoverflow.com/questions/3773252/log-d-and-impact-on-performance. Last accessed 04/18/2015.
[31]
Jiang ZM, Hassa AE, Hamann G, Flora P (2008) An automated approach for abstracting execution logs to execution events. Journal Software Maintenance Evolution 20:249-267.
[32]
Jiang ZM, Hassan AE, Hamann G, Flora P (2008) Automatic identification of load testing problems. In: Proceedings of the 24th IEEE international conference on software maintenance (ICSM).
[33]
Jojo. Does logging slow down a production android app? Stack overflow http://stackoverflow.com/questions/6445153/does-logging-slow-down-a-production-android-app. Last accessed 04/18/2015.
[34]
Kalibera T, Jones R (2013) Rigorous benchmarking in reasonable time. In: Proceedings of the 2013 international symposium on memory management (ISMM).
[35]
Li D, Hao S, Gui J, William H (2014) An empirical study of the energy consumption of android applications. In: Proceedings of the 30th international conference on software maintenance and evolution (ICSME).
[36]
Li D, Hao S, Halfond WGJ, Govindan R (2013) Calculating source line level energy information for android applications. In: Proceedings of the 2013 international symposium on software testing and analysis (ISSTA).
[37]
Li D, Jin Y, Sahin C, Clause J, Halfond WGJ (2014) Integrated energy-directed test suite optimization. In: Proceedings of the 2014 international symposium on software testing and analysis (ISSTA).
[38]
Li D, Lyu Y, Gui J, Halfond WGJ (2016) Automated energy optimization of http requests for mobile applications. In: Proceedings of the 38th international conference on software engineering, ICSE '16. ACM, New York, NY, USA, pp 249-260.
[39]
Liu Y, Xu C, Cheung S, Terragni V (2016) Understanding and detecting wake lock misuses for android applications. In: FSE 2014. Seattle, WA, USA.
[40]
Logstash - open source log management. http://logstash.net/. Last accessed 04/18/2015.
[41]
Manotas I, Bird C, Zhang R, Shepherd D, Jaspan C, Sadowski C, Pollock L, Clause J (2016) An empirical study of practitioners' perspectives on green software engineering. In: Proceedings of the 38th international conference on software engineering, ICSE '16. ACM, New York, NY, USA, pp 237-248.
[42]
Mytkowicz T, Diwan A, Hauswirth M, Sweeney PF (2009) Producing wrong data without doing anything obviously wrong! In: Proceedings of the 14th international conference on architectural support for programming languages and operating systems (ASPLOS).
[43]
Neill J (2008) Why use effect sizes instead of significance testing in program evaluation. http://www.wilderdom.com/research/effectsizes.html.
[44]
Oliner A, Ganapathi A, Xu W (2012) Advances and challenges in log analysis. Commun ACM 55(2):55-61.
[45]
Pang C, Hindle A, Adams B, Hassan AE (2016) What do programmers know about software energy consumption? IEEE Softw 33(3):83-89.
[46]
Pathak A, Hu YC, Zhang M (2011) Bootstrapping energy debugging on smartphones: a first look at energy bugs in mobile devices. In: Proceedings of the 10th ACM workshop on hot topics in networks, HotNets-X, pp 5:1-5:6.
[47]
Pathak A, Hu YC, Zhang M (2012) Where is the energy spent inside my app?: fine grained energy accounting on smartphones with eprof. In: EuroSys '12. Bern, Switzerland, pp 29-42.
[48]
Pathak A, Hu YC, Zhang M, Bahl P, Wang Y.-M. (2011) Fine-grained power modeling for smartphones using system call tracing. In: Eurosys '11. Salzburg, Austria, pp 153-168.
[49]
Patil PS, Doshi J, Ambawade D (2015) Reducing power consumption of smart device by proper management of wakelocks. In: Advance computing conference (IACC), 2015 IEEE international, pp 883-887.
[50]
Pinto G, Castor F, Liu YD (2014) Mining questions about software energy consumption. In: Proceedings of the 11th working conference on mining software repositories (MSR).
[51]
Rasmussen K, Wilson A, Hindle A (2014) Green mining: energy consumption of advertisement blocking methods. In: Proceedings of the 3rd international workshop on green and sustainable software, GREENS 2014, pp 38-45.
[52]
Replication Package Android Logcat Energy Study. https://archive.org/details/replicationpackageandroidlogcatenergystudy. Last accessed 05/24/2017.
[53]
Romano J, Kromrey JD, Coraggio J, Skowronek J (2006) Appropriate statistics for ordinal level data: should we really be using t-test and Cohen's d for evaluating group differences on the NSSE and other surveys? In: Annual meeting of the florida association of institutional research.
[54]
Romansky S, Hindle A (2014) On improving green mining for energy-aware software analysis. In: Proceedings of the 2014 conference of the center for advanced studies on collaborative research (CASCON).
[55]
Sahin C, Pollock L, Clause J (2014) How do code refactorings affect energy usage? In: Proceedings of the 8th ACM/IEEE international symposium on empirical software engineering and measurement (ESEM).
[56]
Sahin C, Tornquist P, McKenna R, Pearson Z, Clause J (2014) How does code obfuscation impact energy usage? In: Proceedings of the 30th IEEE international conference on software maintenance and evolution (ICSME).
[57]
Sandalone. Android debugging ? battery drains. Stack Overflow http://stackoverflow.com/questions/4958543/android-debugging-battery-drains. Last accessed 04/18/2015.
[58]
Seo C, Malek S, Medvidovic N (2008) Component-level energy consumption estimation for distributed java-based software systems. Volume 5282 of Lecture Notes in Computer Science. Springer, Berlin, pp 97- 113.
[59]
Shang W, Jiang ZM, Adams B, Hassan AE, Godfrey MW, Nasser M, Flora P (2011) An exploratory study of the evolution of communicated information about the execution of large software systems. In: Proceedings of the 18th working conference on reverse engineering (WCRE).
[60]
Shang W, Jiang ZM, Hemmati H, Adams B, Hassan AE, Martin P (2013) Assisting developers of big data analytics applications when deploying on hadoop clouds. In: Proceedings of the 35th international conference on software engineering (ICSE).
[61]
Shang W, Nagappan M, Hassan AE (2015) Studying the relationship between logging characteristics and the code quality of platform software. Empir Softw Eng 20(1):1-27.
[62]
Shye A, Scholbrock B, Memik G (2009) Into the wild: studying real user activity patterns to guide power optimizations for mobile architectures. In: IEEE/ACM MICRO 42. New York, NY, USA, pp 168-178.
[63]
Sigelman BH, Barroso LA, Burrows M, Stephenson P, Plakal M, Beaver D, Jaspan S, Shanbhag C (2010) Dapper, a large-scale distributed systems tracing infrastructure. Technical report, Google Inc.
[64]
Splunk. http://www.splunk.com/. Last accessed 04/18/2015.
[65]
Summary of Sarbanes-Oxley Act of 2002. http://www.soxlaw.com/.
[66]
Texas Instruments, Dallas, USA (2015) INA219 Zerø-drift bidirectional current/power monitor with I2C interface. http://www.ti.com/lit/ds/symlink/ina219.pdf.
[67]
Thompson B (2000) A suggested revision to the forthcoming 5th edition of the APA publication manual. http://people.cehd.tamu.edu/~bthompson/apaeffec.htm.
[68]
Vásquez ML, Bavota G, Bernal-Cárdenas C, Oliveto R, Penta MD, Poshyvanyk D (2014) Mining energy-greedy API usage patterns in android apps: an empirical study. In: Proceedings of the 11th working conference on mining software repositories (MSR).
[69]
Wang X, Li X, Wen W (2014) Wlcleaner: reducing energy waste caused by wakelock bugs at runtime. In: IEEE 12th international conference on dependable, autonomic and secure computing (DASC), 2014, pp 429-434.
[70]
Woodside M, Franks G, Petriu DC (2007) The future of software performance engineering. In: Proceedings of the future of software engineering (FOSE) track, international conference on software engineering (ICSE).
[71]
Xu W, Huang L, Fox A, Patterson D, Jordan M (2009) Online system problem detection by mining patterns of console logs. In: Proceedings of the ninth IEEE international conference on data mining (ICDM).
[72]
Xu W, Huang L, Fox A, Patterson D, Jordan MI (2009) Detecting large-scale system problems by mining console logs. In: Proceedings of the ACM SIGOPS 22nd symposium on operating systems principles (SOSP).
[73]
Yuan D, Mai H, Xiong W, Tan L, Zhou Y, Pasupathy S (2010) Sherlog: error diagnosis by connecting clues from run-time logs. In: Proceedings of the fifteenth edition of ASPLOS on architectural support for programming languages and operating systems (ASPLOS).
[74]
Yuan D, Park S, Zhou Y (2012) Characterising logging practices in open-source software. In: Proceedings of the 34th international conference on software engineering (ICSE).
[75]
Yuan D, Zheng J, Park S, Zhou Y, Savage S (2011) Improving software diagnosability via log enhancement. In: Proceedings of the sixteenth international conference on architectural support for programming languages and operating systems (ASPLOS).
[76]
Zhang L, Tiwana B, Qian Z, Wang Z, Dick RP, Mao ZM, Yang L (2010) Accurate online power estimation and automatic battery behavior based power model generation for smartphones. In: Proceedings of the 8th IEEE/ACM/IFIP international conference on hardware/software codesign and system synthesis.

Cited By

View all
  • (2024)Method-level Bug Prediction: Problems and PromisesACM Transactions on Software Engineering and Methodology10.1145/364033133:4(1-31)Online publication date: 13-Jan-2024
  • (2023) LoGenText-Plus: Improving Neural Machine Translation Based Logging Texts Generation with Syntactic TemplatesACM Transactions on Software Engineering and Methodology10.1145/362474033:2(1-45)Online publication date: 22-Dec-2023
  • (2023)Towards Utilizing Natural Language Processing Techniques to Assist in Software Engineering TasksProceedings of the 45th International Conference on Software Engineering: Companion Proceedings10.1109/ICSE-Companion58688.2023.00077(286-290)Online publication date: 14-May-2023
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Empirical Software Engineering
Empirical Software Engineering  Volume 23, Issue 3
Jun 2018
717 pages

Publisher

Kluwer Academic Publishers

United States

Publication History

Published: 01 June 2018

Author Tags

  1. Android
  2. Energy consumption
  3. Logging

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Method-level Bug Prediction: Problems and PromisesACM Transactions on Software Engineering and Methodology10.1145/364033133:4(1-31)Online publication date: 13-Jan-2024
  • (2023) LoGenText-Plus: Improving Neural Machine Translation Based Logging Texts Generation with Syntactic TemplatesACM Transactions on Software Engineering and Methodology10.1145/362474033:2(1-45)Online publication date: 22-Dec-2023
  • (2023)Towards Utilizing Natural Language Processing Techniques to Assist in Software Engineering TasksProceedings of the 45th International Conference on Software Engineering: Companion Proceedings10.1109/ICSE-Companion58688.2023.00077(286-290)Online publication date: 14-May-2023
  • (2023)A large-scale empirical study on mobile performance: energy, run-time and memoryEmpirical Software Engineering10.1007/s10664-023-10391-y29:1Online publication date: 27-Dec-2023
  • (2021)A Survey on Automated Log Analysis for Reliability EngineeringACM Computing Surveys10.1145/346034554:6(1-37)Online publication date: 13-Jul-2021
  • (2021)An exploratory semantic analysis of logging questionsJournal of Software: Evolution and Process10.1002/smr.236133:7Online publication date: 1-Jul-2021
  • (2020)Energy efficient adaptation engines for android applicationsInformation and Software Technology10.1016/j.infsof.2019.106220118:COnline publication date: 1-Feb-2020
  • (2019)An Energy Efficiency Study of Web-Based Communication in Android PhonesScientific Programming10.1155/2019/82354582019Online publication date: 1-Jan-2019
  • (2019)Search-based energy testing of AndroidProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00115(1119-1130)Online publication date: 25-May-2019
  • (2019)GreenBundleProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00114(1107-1118)Online publication date: 25-May-2019
  • Show More Cited By

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media