ABSTRACT
Context. Object-Relational Mapping (ORM) frameworks are widely used in business software applications to interact with database systems. Even if ORMs introduce several benefits when compared to a plain SQL approach, these techniques have known disadvantages.
Goal. In this paper, we present an empirical study that evaluates the energy efficiency of three different approaches to programmatically access SQL databases in PHP applications. The selected approaches are: plain SQL queries in the source code, and two specialized frameworks, Propel and TinyQueries.
Method. We performed an empirical experiment in a controlled environment. We selected three factors for our experimentation: the different ORM approaches, the type of query (Create, Read, Update, Delete) and the size of database tables. Our response variables were execution time and energy consumption.
Results. As expected, pure SQL yielded the best performance and energy efficiency in all test cases. Propel exhibited a much higher energy consumption and longer execution times. The TinyQueries tool performed slightly worse than SQL, but significantly better than Propel, offering a convenient trade--off between ORM benefits and energy efficiency.
Conclusions. Our experiment shows that ORM approaches have a significant impact on both energy consumption and performance. This helps developers and architects when considering the trade-off between their benefits (e.g. in terms of code maintainability and readability) and drawbacks.
- N. An, S. Gurumurthi, A. Sivasubramaniam, N. Vijaykrishnan, M. Kandemir, and M. J. Irwin. Energy-performance trade-offs for spatial access methods on memory-resident data. The International Journal on Very Large Data Bases, 11(3):179--197, 2002. Google ScholarDigital Library
- V. Basili and G. Caldiera. Rombach. HD the goal question metric approach. Encyclopedia of Software Engineering, Wiley, 2(1994):528--532, 1994.Google Scholar
- C. Chen, B. He, X. Tang, C. Chen, and Y. Liu. Green Databases Through Integration of Renewable Energy. In 6th Biennial Conference on Innovative Data Systems Research (CIDR), 2013.Google Scholar
- M. Ferreira, E. Hoekstra, B. Merkus, B. Visser, and J. Visser. Seflab: A lab for measuring software energy footprints. In Green and Sustainable Software (GREENS), 2013 2nd International Workshop on, pages 30--37, May 2013. Google ScholarDigital Library
- E. Gelenbe and Y. Caseau. The impact of information technology on energy consumption and carbon emissions. Ubiquity, 2015(June):1:1--1:15, June 2015. Google ScholarDigital Library
- S. Götz, T. Ilsche, J. Cardoso, J. Spillner, T. Kissinger, U. Aβmann, W. Lehner, W. E. Nagel, and A. Schill. Energy-efficient databases using sweet spot frequencies. In Proceedings of the 2014 IEEE/ACM 7th International Conference on Utility and Cloud Computing, pages 871--876. IEEE Computer Society, 2014. Google ScholarDigital Library
- C. Gough, I. Steiner, and W. Saunders. Energy Efficient Servers: Blueprints for Data Center Optimization, chapter Data Center Management, pages 307--318. Apress, Berkeley, CA, 2015. Google ScholarDigital Library
- A. Hindle. Green mining: Investigating power consumption across versions. In ICSE, pages 1301--1304, jun 2012. Google ScholarDigital Library
- N. Iimura, N. Nishikawa, M. Nakano, and M. Oguchi. A proposal of storage power control method with data placement in an environment using many hdds. In Proceedings of the 9th International Conference on Ubiquitous Information Management and Communication, IMCOM '15, pages 73:1--73:8, New York, NY, USA, 2015. ACM. Google ScholarDigital Library
- J. G. Koomey, S. Berard, M. Sanchez, and H. Wong. Implications of historical trends in the electrical efficiency of computing. IEEE Ann. Hist. Comput., 33(3):46--54, Mar. 2011. Google ScholarDigital Library
- P. Lago, R. Kazman, N. Meyer, M. Morisio, H. A. Müller, F. Paulisch, G. Scanniello, B. Penzenstadler, and O. Zimmermann. Exploring initial challenges for green software engineering: summary of the first GREENS workshop, at ICSE 2012. SIGSOFT Softw. Eng. Notes, 38(1):31--33, Jan. 2013. Google ScholarDigital Library
- P. Lago, N. Meyer, M. Morisio, H. Müller, and others. Leveraging energy efficiency to software users: summary of the second GREENS workshop, at ICSE 2013. ACM SIGSOFT Software, 2014. Google ScholarDigital Library
- W. Lang, R. Kandhan, and J. M. Patel. Rethinking Query Processing for Energy Efficiency: Slowing Down to Win the Race. IEEE Data Eng. Bull., 34(1):12--23, 2011.Google Scholar
- W. Lang and J. M. Patel. Towards eco-friendly database management systems. In 4th Biennial Conference on Innovative Data Systems Research (CIDR). www.cidrdb.org, 2009.Google Scholar
- D. Li and W. G. J. Halfond. An investigation into energy-saving programming practices for android smartphone app development. In Proceedings of the 3rd International Workshop on Green and Sustainable Software, GREENS 2014, pages 46--53, New York, NY, USA, 2014. ACM. Google ScholarDigital Library
- M. Linares-Vásquez, G. Bavota, C. Bernal-Cárdenas, 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, MSR 2014, pages 2--11, New York, NY, USA, 2014. ACM. Google ScholarDigital Library
- R. Perez-Castillo and M. Piattini. Analyzing the harmful effect of god class refactoring on power consumption. Software, IEEE, 31(3):48--54, May 2014.Google ScholarCross Ref
- G. Pinto, F. Castor, and Y. D. Liu. Understanding energy behaviors of thread management constructs. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA '14, pages 345--360, New York, NY, USA, 2014. ACM. Google ScholarDigital Library
- J. Pisharath, A. Choudhary, and M. Kandemir. Energy Management Schemes for Memory-resident Database Systems. In Proceedings of the Thirteenth ACM International Conference on Information and Knowledge Management, CIKM '04, pages 218--227, New York, NY, USA, 2004. ACM. Google ScholarDigital Library
- J. Pisharath, A. Choudhary, and M. Kandemir. Reducing Energy Consumption of Queries in Memory-resident Database Systems. In Proceedings of the 2004 International Conference on Compilers, Architecture, and Synthesis for Embedded Systems, CASES '04, pages 35--45, New York, NY, USA, 2004. ACM. Google ScholarDigital Library
- G. Procaccianti, H. Fernandez, and P. Lago. Empirical evaluation of two best practices for energy-efficient software development. Journal of Systems and Software, 2016. DOI: 10.1016/j.jss.2016.02.035. Google ScholarDigital Library
- G. Procaccianti, H. Fernandez, and P. Lago. Empirical evaluation of two Best-Practices for Energy-Efficient software development. J. Syst. Softw., 117(July 2016):185--198, 2016. Google ScholarDigital Library
- G. Procaccianti, P. Lago, A. Vetro, D. Méndez Fernández, and R. J. Wieringa. The green lab: Experimentation in software energy efficiency. In International Conference on Software Engineering (ICSE), 2015. Google ScholarDigital Library
- 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, ESEM '14, pages 36:1--36:10, New York, NY, USA, 2014. ACM. Google ScholarDigital Library
- J. Song, T. Li, X. Liu, and Z. Zhu. Comparing and analyzing the energy efficiency of cloud database and parallel database. In Advances in Computer Science, Engineering & Applications, pages 989--997. Springer, 2012.Google Scholar
- D. Tsirogiannis, S. Harizopoulos, and M. A. Shah. Analyzing the Energy Efficiency of a Database Server. In Proceedings of the 2010 ACM SIGMOD International Conference on Management of Data, SIGMOD '10, pages 231--242, New York, NY, USA, 2010. ACM. Google ScholarDigital Library
- Y.-C. Tu, X. Wang, B. Zeng, and Z. Xu. A system for energy-efficient data management. ACM SIGMOD Record, 43(1):21--26, 2014. Google ScholarDigital Library
- J. W. Tukey. Comparing individual means in the analysis of variance. Biometrics, 5(2):99--114, June 1949.Google ScholarCross Ref
- N. Wirth. A plea for lean software. IEEE Computer, 28(2):64--68, Feb. 1995. Google ScholarDigital Library
- C. Wohlin, P. Runeson, M. Höst, M. C. Ohlsson, B. Regnell, and A. Wesslén. Experimentation in software engineering. Springer Science & Business Media, 2012. Google ScholarDigital Library
- Z. Xu. Building a Power-aware Database Management System. In Proceedings of the Fourth SIGMOD PhD Workshop on Innovative Database Research, IDAR '10, pages 1--6, New York, NY, USA, 2010. ACM. Google ScholarDigital Library
- Z. Xu, Y. Tu, and X. Wang. Online Energy Estimation of Relational Operations in Database Systems. Computers, IEEE Transactions on, 64(11):3223--3236, Nov. 2015. Google ScholarDigital Library
- Z. Xu, Y.-C. Tu, and X. Wang. Exploring power-performance tradeoffs in database systems. In Data Engineering (ICDE), 2010 IEEE 26th International Conference on, pages 485--496, Mar. 2010.Google ScholarCross Ref
Recommendations
Multi-platform Performance Analysis for CRUD Operations in Relational Databases from Java Programs Using Hibernate
Big Data Intelligence and ComputingAbstractA data set is a collection of information about something. Almost every application nowadays needs data persistence to maintain track of its status in the event of a problem. Databases are the primary component of an application for storing data ...
Energy Saving and Efficiency Tool
SMARTGREENS 2016: Proceedings of the 5th International Conference on Smart Cities and Green ICT SystemsThe problem of Energy Efficiency in industry is a hot topic but companies are not still implementing, on a
mass scale, energy efficiency actions. One of the most important barriers is that companies are scarcely
aware of their consumptions and consider ...
Energy efficiency and energy saving potential in China: An analysis based on slacks-based measure model
This paper analyzes energy efficiency of 30 regions in China mainland for the period of 2000-2009. The slacks-based measure model of data envelopment analysis is for the first time employed to investigate the energy consumption slacks and energy saving ...
Comments