Log4Perf: suggesting and updating logging locations for web-based systems’ performance monitoring

Performance assurance activities are an essential step in the release cycle of software systems. Logs have become one of the most important sources of information that is used to monitor, understand and improve software performance. However, developers often face the challenge of making logging decisions, i.e., neither logging too little and logging too much is desirable. Although prior research has proposed techniques to assist in logging decisions, those automated logging guidance techniques are rather general, without considering a particular goal, such as monitoring software performance. In this paper, we present Log4Perf, an automated approach that provides suggestions of where to insert logging statement with the goal of monitoring web-based systems’ CPU usage. In the first part of our approach, we leverage the performance model’s prediction errors to suggest the need for updating logging locations when software evolves. In the second part of our approach, we build and manipulate a statistical performance model to identify the locations in the source code that statistically significantly influence CPU usage. To evaluate Log4Perf, we conduct case studies on two open source systems, i.e., CloudStore and OpenMRS, and one large-scale commercial system. Our evaluation results show that our approach can suggest the need for updating logging locations and identify the logging locations that can be kept unchanged. We manually examine the logging locations that are newly suggested or deprecated. We find that our approach can build well-fit statistical performance models, indicating that such models can be leveraged to investigate the influence of locations in the source code on performance. The suggested logging locations are often in small and simple methods that do not have logging statements, and are not performance hotspots. Our approach can be used to complement traditional approaches that are based on software metrics or performance hotspots. In addition, we identify seven root-causes of these suggested or deprecated logging locations. Log4Perf is integrated into the release engineering process of the commercial software to provide logging suggestions on a regular basis.

[1]  Yang Liu,et al.  Be conservative: enhancing failure diagnosis with proactive logging , 2012, OSDI 2012.

[2]  Ewan D. Tempero,et al.  Performance Analysis Using Subsuming Methods: An Industrial Case Study , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[3]  Ahmed E. Hassan,et al.  Detecting performance anti-patterns for applications developed using object-relational mapping , 2014, ICSE.

[4]  Cor-Paul Bezemer,et al.  Performance optimization of deployed software-as-a-service applications , 2014, J. Syst. Softw..

[5]  Armando Fox,et al.  Capturing, indexing, clustering, and retrieving system history , 2005, SOSP '05.

[6]  Johan A. Pouwelse,et al.  Detecting and analyzing I/O performance regressions , 2014, J. Softw. Evol. Process..

[7]  M Alghmadi Hammam,et al.  An Automated Approach for Recommending When to Stop Performance Tests , 2016 .

[8]  Brian W. Kernighan,et al.  The Practice of Programming , 1999 .

[9]  Ahmed E. Hassan,et al.  Finding and Evaluating the Performance Impact of Redundant Data Access for Applications that are Developed Using Object-Relational Mapping Frameworks , 2016, IEEE Transactions on Software Engineering.

[10]  Yu Luo,et al.  Simple Testing Can Prevent Most Critical Failures: An Analysis of Production Failures in Distributed Data-Intensive Systems , 2014, OSDI.

[11]  Qiang Fu,et al.  Where do developers log? an empirical study on logging practices in industry , 2014, ICSE Companion.

[12]  Cor-Paul Bezemer,et al.  Logging Library Migrations: A Case Study for the Apache Software Foundation Projects , 2016, 2016 IEEE/ACM 13th Working Conference on Mining Software Repositories (MSR).

[13]  Yu Luo,et al.  The Game of Twenty Questions: Do You Know Where to Log? , 2017, HotOS.

[14]  Elaine J. Weyuker,et al.  Experience with Performance Testing of Software Systems: Issues, an Approach, and Case Study , 2000, IEEE Trans. Software Eng..

[15]  Michael W. Godfrey,et al.  An Exploratory Study of the Evolution of Communicated Information about the Execution of Large Software Systems , 2011, 2011 18th Working Conference on Reverse Engineering.

[16]  Jianmei Guo,et al.  Java Performance Troubleshooting and Optimization at Alibaba , 2017, 2018 IEEE/ACM 40th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP).

[17]  Wang Zhi-jian Using Benchmarking to Advance Research:A Challenge to Software Engineering , 2005 .

[18]  Ahmed E. Hassan,et al.  Continuous validation of performance test workloads , 2017, Automated Software Engineering.

[19]  Max Kuhn,et al.  Building Predictive Models in R Using the caret Package , 2008 .

[20]  Zhenyun Zhuang,et al.  Capacity Planning and Headroom Analysis for Taming Database Replication Latency: Experiences with LinkedIn Internet Traffic , 2015, ICPE.

[21]  Gilbert Hamann,et al.  Automated performance analysis of load tests , 2009, 2009 IEEE International Conference on Software Maintenance.

[22]  Ying Zou,et al.  Mining Performance Regression Testing Repositories for Automated Performance Analysis , 2010, 2010 10th International Conference on Quality Software.

[23]  Christopher Stewart,et al.  Exploiting nonstationarity for performance prediction , 2007, EuroSys '07.

[24]  Wilhelm Hasselbring,et al.  Including Performance Benchmarks into Continuous Integration to Enable DevOps , 2015, SOEN.

[25]  Rick Kazman,et al.  Strategic Prototyping for Developing Big Data Systems , 2016, IEEE Software.

[26]  David A. Freedman,et al.  Statistical Models: Theory and Practice: References , 2005 .

[27]  Jinfu Chen,et al.  An Exploratory Study of Performance Regression Introducing Code Changes , 2017, 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[28]  Ying Zou,et al.  Towards just-in-time suggestions for log changes , 2016, Empirical Software Engineering.

[29]  Marin Litoiu,et al.  A Framework to Evaluate the Effectiveness of Different Load Testing Analysis Techniques , 2016, 2016 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[30]  Ahmed E. Hassan,et al.  Understanding the impact of code and process metrics on post-release defects: a case study on the Eclipse project , 2010, ESEM '10.

[31]  Ahmed E. Hassan,et al.  CacheOptimizer: helping developers configure caching frameworks for hibernate-based database-centric web applications , 2016, SIGSOFT FSE.

[32]  Ding Yuan,et al.  Improving Software Diagnosability via Log Enhancement , 2012, TOCS.

[33]  Heng Li,et al.  Adopting Autonomic Computing Capabilities in Existing Large-Scale Systems , 2017, 2018 IEEE/ACM 40th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP).

[34]  Ewan D. Tempero,et al.  Subsuming Methods: Finding New Optimisation Opportunities in Object-Oriented Software , 2015, ICPE.

[35]  Heng Li,et al.  Which log level should developers choose for a new logging statement? , 2017, Empirical Software Engineering.

[36]  Michael D. Ernst,et al.  Proactive detection of inadequate diagnostic messages for software configuration errors , 2015, ISSTA.

[37]  Audris Mockus,et al.  Organizational volatility and its effects on software defects , 2010, FSE '10.

[38]  Wilhelm Hasselbring,et al.  Continuous Monitoring of Software Services: Design and Application of the Kieker Framework , 2009 .

[39]  Jeffrey S. Chase,et al.  Correlating Instrumentation Data to System States: A Building Block for Automated Diagnosis and Control , 2004, OSDI.

[40]  N. Cliff Dominance statistics: Ordinal analyses to answer ordinal questions. , 1993 .

[41]  Andrei Toma,et al.  Log4Perf: Suggesting Logging Locations for Web-based Systems' Performance Monitoring , 2018, ICPE.

[42]  Ahmed E. Hassan,et al.  Automated Detection of Performance Regressions Using Regression Models on Clustered Performance Counters , 2015, ICPE.

[43]  Calton Pu,et al.  vPerfGuard: an automated model-driven framework for application performance diagnosis in consolidated cloud environments , 2013, ICPE '13.

[44]  Michael D. Ernst,et al.  Which configuration option should I change? , 2014, ICSE.

[45]  H. J. Arnold Introduction to the Practice of Statistics , 1990 .

[46]  Cor-Paul Bezemer,et al.  Examining the stability of logging statements , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[47]  Marco Tulio Valente,et al.  Learning from Source Code History to Identify Performance Failures , 2016, ICPE.

[48]  Audris Mockus,et al.  High-impact defects: a study of breakage and surprise defects , 2011, ESEC/FSE '11.

[49]  Ahmed E. Hassan,et al.  Automated detection of performance regressions using statistical process control techniques , 2012, ICPE '12.

[50]  Wilhelm Hasselbring,et al.  Kieker: a framework for application performance monitoring and dynamic software analysis , 2012, ICPE '12.

[51]  Cor-Paul Bezemer,et al.  Studying the Effectiveness of Application Performance Management (APM) Tools for Detecting Performance Regressions for Web Applications: An Experience Report , 2016, 2016 IEEE/ACM 13th Working Conference on Mining Software Repositories (MSR).

[52]  Qiang Fu,et al.  Learning to Log: Helping Developers Make Informed Logging Decisions , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[53]  Paul Brebner Automatic Performance Modelling from Application Performance Management (APM) Data: An Experience Report , 2016, ICPE.

[54]  Ingo Weber,et al.  Experience report: Anomaly detection of cloud application operations using log and cloud metric correlation analysis , 2015, 2015 IEEE 26th International Symposium on Software Reliability Engineering (ISSRE).