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

skip to main content
10.1109/MSR.2019.00033acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Recommending energy-efficient Java collections

Published: 26 May 2019 Publication History

Abstract

Over the last years, increasing attention has been given to creating energy-efficient software systems. However, developers still lack the knowledge and the tools to support them in that task. In this work, we explore our vision that energy consumption non-specialists can build software that consumes less energy by alternating, at development time, between third-party, readily available, diversely-designed pieces of software, without increasing the development complexity. To support our vision, we propose an approach for energy-aware development that combines the construction of application-independent energy profiles of Java collections and static analysis to produce an estimate of in which ways and how intensively a system employs these collections. By combining these two pieces of information, it is possible to produce energy-saving recommendations for alternative collection implementations to be used in different parts of the system. We implement this approach in a tool named CT+ that works with both desktop and mobile Java systems, and is capable of analyzing 40 different collection implementations of lists, maps, and sets. We applied CT+ to twelve software systems: two mobile-based, seven desktop-based, and three that can run in both environments. Our evaluation infrastructure involved a high-end server, a notebook, and three mobile devices. When applying the (mostly trivial) recommendations, we achieved up to 17.34% reduction in energy consumption just by replacing collection implementations. Even for a real world, mature, highly-optimized system such as Xalan, CT+ could achieve a 5.81% reduction in energy consumption. Our results indicate that some widely used collections, e.g., ArrayList, HashMap, and HashTable, are not energy-efficient and sometimes should be avoided when energy consumption is a major concern.

References

[1]
Gustavo Pinto and Fernando Castor. Energy efficiency: a new concern for application software developers. Communications of the ACM, 60(12):68--75, 2017.
[2]
Irene Manotas, Christian Bird, Rui Zhang, David Shepherd, Ciera Jaspan, Caitlin Sadowski, Lori Pollock, and James Clause. An empirical study of practitioners' perspectives on green software engineering. In ICSE, pages 237--248, 2016.
[3]
Shaiful Alam Chowdhury and Abram Hindle. Characterizing energy-aware software projects: Are they different? In Proceedings of the 13th International Conference on Mining Software Repositories, MSR '16, pages 508--511, New York, NY, USA, 2016. ACM.
[4]
C. Pang, A. Hindle, B. Adams, and A. E. Hassan. What do programmers know about software energy consumption? IEEE Software, 33(3):83--89, May 2016.
[5]
Gustavo Pinto, Kenan Liu, Fernando Castor, and Yu David Liu. A comprehensive study on the energy efficiency of java thread-safe collections. In ICSME, 2016.
[6]
Wellington Oliveira, Renato Oliveira, and Fernando Castor. A Study on the Energy Consumption of Android App Development Approaches. In 2017 IEEE/ACM 14th International Conference on Mining Software Repositories (MSR), 2017.
[7]
Mario Linares-Vásquez, Gabriele Bavota, Carlos Bernal-Cárdenas, Rocco Oliveto, Massimiliano Di Penta, and Denys Poshyvanyk. Mining energy-greedy api usage patterns in android apps: An empirical study. In Proceedings of the 11th Working Conference on Mining Software Repositories, MSR 2014, pages 2--11, New York, NY, USA, 2014. ACM.
[8]
L. G. Lima, F. Soares-Neto, P. Lieuthier, F. Castor, G. Melfe, and J. P. Fernandes. Haskell in green land: Analyzing the energy behavior of a purely functional language. In 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), volume 1, pages 517--528, March 2016.
[9]
Samir Hasan, Zachary King, Munawar Hafiz, Mohammed Sayagh, Bram Adams, and Abram Hindle. Energy profiles of java collections classes. In Proceedings of the 38th International Conference on Software Engineering, pages 225--236, New York, NY, USA, 2016.
[10]
John Doe-I. Blind. Blind, 2011. Blind.
[11]
Diego Costa, Artur Andrzejak, Janos Seboek, and David Lo. Empirical study of usage and performance of java collections. In Proceedings of the 8th ACM/SPEC on International Conference on Performance Engineering, ICPE '17, pages 389--400, New York, NY, USA, 2017. ACM.
[12]
Oracle Corporation. JFC. https://docs.oracle.com/javase/8/docs/technotes/guides/collections/. Last access: 2019-01-22.
[13]
The Apache Foundation. Apache Collections. https://commons.apache.org/proper/commons-collections/. Last access: 2019-01-22.
[14]
The Eclipse Foundations. Eclipse Collections. https://www.eclipse.org/collections/. Last access: 2019-01-22.
[15]
Rubén Saborido, Rodrigo Morales, Foutse Khomh, Yann-Gaël Guéhéneuc, and Giuliano Antoniol. Getting the most from map data structures in Android. Empirical Software Engineering, March 2018.
[16]
Irene Manotas, Lori Pollock, and James Clause. Seeds: A software engineer's energy-optimization decision support framework. In Proceedings of the 36th International Conference on Software Engineering, ICSE 2014, pages 503--514, 2014.
[17]
Rui Pereira, Pedro Simão, Jácome Cunha, and João Saraiva. jStanley: Placing a green thumb on java collections. In Proceedings of the 33rd
[18]
Mario Linares-Vásquez, Gabriele Bavota, Carlos Eduardo Bernal Cárdenas, Rocco Oliveto, Massimiliano Di Penta, and Denys 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, ESEC/FSE 2015, pages 143--154, New York, NY, USA, 2015. ACM. ACM/IEEE International Conference on Automated Software Engineering, ASE 2018, pages 856--859, New York, NY, USA, 2018. ACM.
[19]
Rui Pereira, Marco Couto, João Saraiva, Jácome Cunha, and João Paulo Fernandes. The influence of the java collection framework on overall energy consumption. In Proceedings of the 5th International Workshop on Green and Sustainable Software, GREENS '16, pages 15--21, New York, NY, USA, 2016. ACM.
[20]
Benito Fernandes, Gustavo Pinto, and Fernando Castor. Assisting non-specialist developers to build energy-efficient software. In Proceedings - 2017 IEEE/ACM 39th International Conference on Software Engineering Companion, ICSE-C 2017, pages 158--160, May 2017.
[21]
Mario Linares-Vásquez, Gabriele Bavota, Carlos Bernal-Cárdenas, Massimiliano Di Penta, Rocco Oliveto, and Denys Poshyvanyk. Multi-objective optimization of energy consumption of guis in android apps. ACM Trans. Softw. Eng. Methodol., 27(3):14:1--14:47, 2018.
[22]
Mian Wan, Yuchen Jin, Ding Li, Jiaping Gui, Sonal Mahajan, and William GJ Halfond. Detecting display energy hotspots in android apps. Software Testing, Verification and Reliability, 27(6):16--35, 2017.
[23]
Andy Georges, Dries Buytaert, and Lieven Eeckhout. Statistically rigorous java performance evaluation. SIGPLAN Not., 42(10):57--76, October 2007.
[24]
Kenan Liu, Gustavo Pinto, and David Liu. Data-oriented characterization of application-level energy optimization. In Proceedings of the 18th International Conference on Fundamental Approaches to Software Engineering, FASE'15, 2015.
[25]
Raphael Ernani Rodrigues, Péricles Alves, Fernando Pereira, and Laure Gonnord. Real-world loops are easy to predict: a case study. In Workshop on Software Termination (WST'14), 2014.
[26]
IBM. IBM T. J. Watson Libraries for Analysis. http://wala.sourceforge.net/wiki/index.php/Main_Page. Last access: 2019-01-22.
[27]
Edd Barrett, Carl Friedrich Bolz-Tereick, Rebecca Killick, Sarah Mount, and Laurence Tratt. Virtual machine warmup blows hot and cold. Proc. ACM Program. Lang., 1(OOPSLA):52:1--52:27, October 2017.
[28]
Cagri Sahin, Lori Pollock, and James Clause. How do code refactorings affect energy usage? In Proceedings of the 8th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM '14, pages 36:1--36:10, 2014.
[29]
Stephen M. Blackburn, Robin Garner, Chris Hoffmann, Asjad M. Khang, Kathryn S. McKinley, Rotem Bentzur, Amer Diwan, Daniel Feinberg, Daniel Frampton, Samuel Z. Guyer, Martin Hirzel, Antony Hosking, Maria Jump, Han Lee, J. Eliot B. Moss, Aashish Phansalkar, Darko Stefanović, Thomas VanDrunen, Daniel von Dincklage, and Ben Wiedermann. The dacapo benchmarks: Java benchmarking development and analysis. In Proceedings of the 21st Annual ACM SIGPLAN Conference on Object-oriented Programming Systems, Languages, and Applications, OOPSLA '06, pages 169--190, New York, NY, USA, 2006. ACM.
[30]
S. S. Shapiro and M. B. Wilf. An Analysis of Variance Test for Normality (complete samples). Biometrika, 52(3--4):591--611, 1965.
[31]
Daniel S. Wilks. Statistical methods in the atmospheric sciences. Elsevier Academic Press, Amsterdam; Boston, 2011.
[32]
N. Cliff. Dominance Statistics: Ordinal Analyses to Answer Ordinal Questions. Psychological Bulletin, 114(3):494--509, 1993.
[33]
J. Romano, J. D. Kromrey, J. Coraggio, and J. Skowronek. 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, 2006.
[34]
Martin Peterson. Decisions under ignorance, page 4063. Cambridge Introductions to Philosophy. Cambridge University Press, 2009.
[35]
Yu Lin and Danny Dig. A study and toolkit of CHECK-THEN-ACT idioms of java concurrent collections. Softw. Test., Verif. Reliab., 25(4):397--425, 2015.

Cited By

View all
  • (2024)Beyond Functional Correctness: An Exploratory Study on the Time Efficiency of Programming AssignmentsProceedings of the 46th International Conference on Software Engineering: Software Engineering Education and Training10.1145/3639474.3640065(320-330)Online publication date: 14-Apr-2024
  • (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
  • (2022)Complexity-guided container replacement synthesisProceedings of the ACM on Programming Languages10.1145/35273126:OOPSLA1(1-31)Online publication date: 29-Apr-2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
MSR '19: Proceedings of the 16th International Conference on Mining Software Repositories
May 2019
640 pages

Sponsors

Publisher

IEEE Press

Publication History

Published: 26 May 2019

Check for updates

Qualifiers

  • Research-article

Conference

ICSE '19
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all
  • (2024)Beyond Functional Correctness: An Exploratory Study on the Time Efficiency of Programming AssignmentsProceedings of the 46th International Conference on Software Engineering: Software Engineering Education and Training10.1145/3639474.3640065(320-330)Online publication date: 14-Apr-2024
  • (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
  • (2022)Complexity-guided container replacement synthesisProceedings of the ACM on Programming Languages10.1145/35273126:OOPSLA1(1-31)Online publication date: 29-Apr-2022
  • (2020)Probabilistic Model-Based Analysis to Improve Software Energy EfficiencyProceedings of the XXXIV Brazilian Symposium on Software Engineering10.1145/3422392.3422422(132-136)Online publication date: 21-Oct-2020
  • (2020)Understanding performance concerns in the API documentation of data science librariesProceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering10.1145/3324884.3416543(895-906)Online publication date: 21-Dec-2020
  • (2019)A Model-based Framework for the Analysis of Software Energy ConsumptionProceedings of the XXXIII Brazilian Symposium on Software Engineering10.1145/3350768.3353813(67-72)Online publication date: 23-Sep-2019

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media