Empirical Software Engineering

, Volume 20, Issue 2, pp 374–409 | Cite as

Green mining: a methodology of relating software change and configuration to power consumption

  • Abram Hindle


Power consumption is becoming more and more important with the increased popularity of smart-phones, tablets and laptops. The threat of reducing a customer’s battery-life now hangs over the software developer, who now asks, “will this next change be the one that causes my software to drain a customer’s battery?” One solution is to detect power consumption regressions by measuring the power usage of tests, but this is time-consuming and often noisy. An alternative is to rely on software metrics that allow us to estimate the impact that a change might have on power consumption thus relieving the developer from expensive testing. This paper presents a general methodology for investigating the impact of software change on power consumption, we relate power consumption to software changes, and then investigate the impact of OO software metrics and churn metrics on power consumption. We demonstrated that software change can effect power consumption using the Firefox web-browser and the Azureus/Vuze BitTorrent client. We found evidence of a potential relationship between some software metrics and power consumption. We also investigate the effect of library versioning on the power consumption of rTorrent. In conclusion, we investigate the effect of software change on power consumption on two projects; and we provide an initial investigation on the impact of software metrics on power consumption.


Power Power consumption Mining software repositories Dynamic analysis Energy consumption  Sustainable-software Software metrics 



Thanks to Taras Glek of Mozilla, Andrew Wong, Philippe Vachon, and Andrew Neitsch. This research was supported by an NSERC discovery grant.


  1. Amsel N, Tomlinson B (2010) Green tracker: a tool for estimating the energy consumption of software. In: Proceedings, CHI EA. ACM, New York, NY, pp 3337–3342Google Scholar
  2. Apple Inc (2010) iOS application programming guide: tuning for performance and responsiveness. Accessed 31 Jan 2012
  3. Dong M, Zhong L (2011) Self-constructive, high-rate energy modeling for battery-powered mobile systems. In: Proc. ACM/USENIX int. conf. mobile systems, applications, and services (MobiSys)Google Scholar
  4. Fei Y, Ravi S, Raghunathan A, Jha NK (2007) Energy-optimizing source code transformations for operating system-driven embedded software. ACM Trans Embed Comput Syst 7:2:1–2:26Google Scholar
  5. Godard S (2013) Sysstat utilities home page. Accessed 31 Jan 2012
  6. Gray C (2010) Performance considerations for Windows Phone 7. Accessed 31 Jan 2012
  7. Greenawalt P (1994) Modeling power management for hard disks. In: Proceedings of the second international workshop on MASCOTS ’94, pp 62–66Google Scholar
  8. Gupta A, Zimmermann T, Bird C, Naggapan N, Bhat T, Emran S (2011) Energy consumption in Windows Phone. Tech. Rep. MSR-TR-2011-106, Microsoft ResearchGoogle Scholar
  9. Gurumurthi S, Sivasubramaniam A, Irwin M, Vijaykrishnan N, Kandemir M (2002) Using complete machine simulation for software power estimation: the SoftWatt approach. In: Proc. of 8th int. symp. high-performance computer architectureGoogle Scholar
  10. Hindle A (2012a) Green mining: a methodology of relating software change to power consumption. In: 2012 9th IEEE working conference on Mining Software Repositories (MSR), pp 78–87. Accessed 31 Jan 2012
  11. Hindle A (2012b) Green mining: investigating power consumption across versions. In: Proceedings, ICSE: NIER Track. IEEE Computer Society. Accessed 31 Jan 2012
  12. IBM (2011) IBM active energy manager. Accessed 31 Jan 2012
  13. Intel (2011)—saving power on intel systems with linux. Accessed 31 Jan 2012
  14. Jureczko M, Spinellis D (2010) Using object-oriented design metrics to predict software defects. In: Monographs of system dependability, vol models and methodology of system dependability. Oficyna Wydawnicza Politechniki Wroclawskiej, Wroclaw, Poland, pp 69–81. Accessed 31 Jan 2012
  15. Kocher P, Jaffe J, Jun B (1999) Differential power analysis. In: Wiener M (ed) Advances in cryptology CRYPTO 99. Lecture notes in computer science, vol 1666. Springer, Berlin/Heidelberg, pp 789–789Google Scholar
  16. Larabel M (2007) Ubuntu’s power consumption tested. Accessed 31 Jan 2012
  17. Lattanzi E, Acquaviva A, Bogliolo A (2004) Run-time software monitor of the power consumption of wireless network interface cards. In: Integrated circuit and system design. Power and timing modeling, optimization and simulation. Lecture notes in computer science, vol 3254. Springer, Berlin/Heidelberg, pp 352–361CrossRefGoogle Scholar
  18. Li L, Liang CJM, Liu J, Nath S, Terzis A, Faloutsos C (2011) Thermocast: a cyber-physical forecasting model for data centers. In: Proceedings, ACM SIGKDD. ACMGoogle Scholar
  19. Murugesan S (2008) Harnessing Green IT: principles and practices. IT Prof 10(1):24–33CrossRefGoogle Scholar
  20. Nagappan N, Ball T (2005) Use of relative code churn measures to predict system defect density. In: 27th international conference on software engineering, 2005. ICSE 2005. Proceedings. IEEE, pp 284–292Google Scholar
  21. Selby JWA (2011) Unconventional applications of compiler analysis. Ph.D. thesis, University of WaterlooGoogle Scholar
  22. Shang W, Jiang ZM, Adams B, Hassan AE, Godfrey MW, Nasser MN, Flora P (2011) An exploratory study of the evolution of communicated information about the execution of large software systems. In: WCRE, pp 335–344Google Scholar
  23. Spinellis D (2005) Tool writing: a forgotten art? IEEE Softw 22(4):9–11. doi: 10.1109/MS.2005.111. CrossRefGoogle Scholar
  24. Sundell J (2009) [Libtorrent-devel] LibTorrent 0.12.6 and rTorrent 0.8.6 released. Accessed 31 Jan 2012
  25. Sundell J (2010) [Libtorrent-devel] LibTorrent 0.12.7 and rTorrent 0.8.7 released. Accessed 31 Jan 2012
  26. Sundell J (2012) libTorrent and rTorrent project. Accessed 31 Jan 2012
  27. Tiwari V, Malik S, Wolfe A, Tien-Chien Lee M (1996) Instruction level power analysis and optimization of software. J VLSI Sig Proc Syst 13:223–238CrossRefGoogle Scholar
  28. US Department of Energy (2012) Energy explained: electricity. Accessed 31 Jan 2012
  29. 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 eighth IEEE/ACM/IFIP international conference on hardware/software codesign and system synthesis, CODES/ISSS ’10. ACM, New York, NY, pp 105–114. doi:10.1145/1878961.1878982. Accessed 31 Jan 2012CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2013

Authors and Affiliations

  1. 1.Department of Computing ScienceUniversity of AlbertaEdmontonCanada

Personalised recommendations