skip to main content
10.1145/2168836.2168841acmconferencesArticle/Chapter ViewAbstractPublication PageseurosysConference Proceedingsconference-collections
research-article

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

Published:10 April 2012Publication History

ABSTRACT

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%.

References

  1. "Mobile app internet recasts the software and services landscape." URL: http://tinyurl.com/5s3hhx6Google ScholarGoogle Scholar
  2. "Apples app store downloads top 10 billion." URL: http://www.apple.com/pr/library/2011/01/22appstore.htmlGoogle ScholarGoogle Scholar
  3. S. L. Graham, P. B. Kessler, and M. K. McKusick, "gprof: A call graph execution profiler," in Proc. of PLDI, 1982.Google ScholarGoogle Scholar
  4. A. Pathak, Y. C. Hu, M. Zhang, P. Bahl, and Y.-M. Wang, "Fine-grained power modeling for smartphones using system-call tracing," in Proc. of EuroSys, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. N. Balasubramanian and et.al., "Energy consumption in mobile phones: a measurement study and implications for network applications," in Proc of IMC, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Zhang and et.al., "Accurate Online Power Estimation and Automatic Battery Behavior Based Power Model Generation for Smartphones," in Proc. of CODES+ISSS, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. "Flurry: Mobile analytics." URL: http://www.flurry.com/Google ScholarGoogle Scholar
  8. "Android powermanager: Wakelocks." URL: http://developer.android.com/reference/android/os/PowerManager.htmlGoogle ScholarGoogle Scholar
  9. A. Pathak, Y. C. Hu, and M. Zhang, "Bootstrapping energy debugging for smartphones: A first look at energy bugs in mobile devices," in Proc. of Hotnets, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. "Facebook 1.3 not releasing partial wake lock." URL: http://geekfor.me/news/facebook-1--3-wakelock/Google ScholarGoogle Scholar
  11. "Email 2.3 app keeps awake when no data connection is available." URL: http://www.google.com/support/forum/p/Google+Mobile/thread?tid=53bfe134321358e8Google ScholarGoogle Scholar
  12. "Email application partial wake lock." URL: http://code.google.com/p/android/issues/detail?id=9307Google ScholarGoogle Scholar
  13. "Using a locationlistener is generally unsafe for leaving a permanent partial_wake_lock." URL: http://code.google.com/p/android/issues/detail?id=4333Google ScholarGoogle Scholar
  14. F. Qian, Z. Wang, A. Gerber, Z. Mao, S. Sen, and O. Spatscheck, "Characterizing radio resource allocation for 3g networks," in Proc of IMC, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. A. Kansal, F. Zhao, J. Liu, N. Kothari, and A. Bhattacharya, "Virtual machine power metering and provisioning," in Proc. of SOCC, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. F. Rawson, "MEMPOWER: A simple memory power analysis tool set," IBM Austin Research Laboratory, 2004.Google ScholarGoogle Scholar
  17. M. Dong, Y. Choi, and L. Zhong, "Power modeling of graphical user interfaces on OLED displays," in Proc. of DAC, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. "perf: Linux profiling with performance counters." URL: https://perf.wiki.kernel.org/Google ScholarGoogle Scholar
  19. "Android debug class." URL: http://en.wikipedia.org/wiki/Nexus\_One\#HardwareGoogle ScholarGoogle Scholar
  20. "Android debug class." URL: http://developer.android.com/reference/android/os/Debug.htmlGoogle ScholarGoogle Scholar
  21. "Android ndk profiler." URL: http://code.google.com/p/android-ndk-profiler/Google ScholarGoogle Scholar
  22. "Cyanogenmod." URL: http://www.cyanogenmod.com/Google ScholarGoogle Scholar
  23. "Introducing utrace." URL: http://lwn.net/Articles/224772/Google ScholarGoogle Scholar
  24. System tap." URL: http://sourceware.org/systemtap/Google ScholarGoogle Scholar
  25. "Profiling with traceview." URL: http://developer.android.com/guide/developing/debugging/debugging-tracing.htmlGoogle ScholarGoogle Scholar
  26. Skin recognition in c#." URL: http://www.codeproject.com/KB/cs/Skin_RecC_.aspxGoogle ScholarGoogle Scholar
  27. "C# micro chess (huo chess)." URL: http://archive.msdn.microsoft.com/cshuochessGoogle ScholarGoogle Scholar
  28. "Open source Android app." URL: http://en.wikipedia.org/wiki/List_of_open_source_Android_applicationsGoogle ScholarGoogle Scholar
  29. "itextsharp." URL: http://itextsharp.sourceforge.net/Google ScholarGoogle Scholar
  30. "Exocortex.dsp: C# complex number and fft library for microsoft .net." URL: http://www.exocortex.org/dsp/Google ScholarGoogle Scholar
  31. "Chess free: Ai factory limited." URL: https://market.android.com/details?id=uk.co.aifactory.chessfreeGoogle ScholarGoogle Scholar
  32. J. Flinn and M. Satyanarayanan, "Powerscope: A tool for profiling the energy usage of mobile applications," in Proc. of WMCSA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. F. Jason and S. Mahadev, "Energy-aware adaptation for mobile applications," in Proc. of SOSP, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. T. Li and L. John, "Run-time modeling and estimation of operating system power consumption," SIGMETRICS, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. R. Fonseca, P. Dutta, P. Levis, and I. Stoica, "Quanto: Tracking energy in networked embedded systems," in OSDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. A. Roy, S. M. Rumble, R. Stutsman, P. Levis, D. Mazieres, and N. Zeldovich, "Energy management in mobile devices with the Cinder operating system," in Proc. of EuroSys, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. "Power monitor for Android." URL: http://powertutor.org/Google ScholarGoogle Scholar
  38. "Monsoon power monitor." URL: http://www.msoon.com/ LabEquipment/PowerMonitor/Google ScholarGoogle Scholar
  39. E. Cuervo, B. Aruna, D. ki Cho, A. Wolman, S. Saroiu, R. Chandra, and P. Bahl, "Maui: Making smartphones last longer with code offload," in MobiSys, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. B.-G. Chun and P. Maniatis, "Augmented Smartphone Applications Through Clone Cloud Execution ," in HotOs, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. "Khronos: Egl interface." URL: http://www.khronos.org/Google ScholarGoogle Scholar
  42. "Adwhirl by admod." URL: https://www.adwhirl.com/Google ScholarGoogle Scholar
  43. "Jackson: Json processor." URL: http://jackson.codehaus.org/Google ScholarGoogle Scholar
  44. "Skyhook: Location positioning, context and intelligence." URL: http://www.skyhookwireless.com/Google ScholarGoogle Scholar
  45. "Android proguard." URL: http://developer.android.com/guide/developing/tools/proguard.htmlGoogle ScholarGoogle Scholar
  46. "Decompiling apps." URL: http://siis.cse.psu.edu/ded/Google ScholarGoogle Scholar
  47. G. C. Murphy, D. Notkin, W. G. Griswold, and E. S. Lan, "An empirical study of static call graph extractors," ACM Trans. Softw. Eng. Methodol., vol. 7, April 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. J. Spivey, "Fast, accurate call graph profiling," Software: Practice and Experience, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. M. Dmitriev, "Profiling Java applications using code hotswapping and dynamic call graph revelation," in Proceedings of the 4th International Workshop on Software and Performance. ACM, 2004, pp. 139--150. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. D. Grove, G. DeFouw, J. Dean, and C. Chambers, "Call graph construction in object-oriented languages," ACM SIGPLAN Notices, vol. 32, no. 10, pp. 108--124, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. "Oprofile." URL: http://oprofile.sourceforge.net/news/Google ScholarGoogle Scholar
  52. K. Asanovic and K. Koskelin, "EProf: an energy profiler for the iPAQ," MS Thesis, MIT 2004.Google ScholarGoogle Scholar
  53. T. Stathopoulos, D. McIntire, and W. Kaiser, "The energy endoscope: Real-time detailed energy accounting for wireless sensor nodes," in IPSN, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. A. Carroll and G. Heiser, "An analysis of power consumption in a smartphone," in Proc. of USENIX ATC, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. A. Shye, B. Scholbrock, and G. Memik, "Into the wild: studying real user activity patterns to guide power optimizations for mobile architectures," in Proc. of MICRO, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Y. Wang, J. Lin, M. Annavaram, Q. Jacobson, J. Hong, B. Krishnamachari, and N. Sadeh, "A framework of energy efficient mobile sensing for automatic user state recognition," in Proc. of Mobisys, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. S. Kang, J. Lee, H. Jang, H. Lee, Y. Lee, S. Park, T. Park, and J. Song, "Seemon: scalable and energy-efficient context monitoring framework for sensor-rich mobile environments," in Proc. of Mobisys, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. Y. Agarwal, R. Chandra, A. Wolman, P. Bahl, K. Chin, and R. Gupta, "Wireless wakeups revisited: energy management for voip over wi-fi smartphones," in Proc. of Mobisys, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. F. Qian, Z. Wang, A. Gerber, Z. Mao, S. Sen, and O. Spatscheck, "Profiling resource usage for mobile applications: a cross-layer approach," in Proc. of Mobisys, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. M. Ra, J. Paek, A. Sharma, R. Govindan, M. Krieger, and M. Neely, "Energy-delay tradeoffs in smartphone applications," in Proc. of Mobisys, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      EuroSys '12: Proceedings of the 7th ACM european conference on Computer Systems
      April 2012
      394 pages
      ISBN:9781450312233
      DOI:10.1145/2168836

      Copyright © 2012 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 10 April 2012

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate241of1,308submissions,18%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader