How not to Structure Your Database-Backed Web Applications: A Study of Performance Bugs in the Wild

How not to Structure Your Database-Backed Web Applications: A Study of Performance Bugs in the Wild
复制标题

DOI:
10.1145/3180155.3180194
复制
发表时间:
2018-05
期刊:
2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE)
影响因子:
--
通讯作者:
Junwen Yang;Pranav Subramaniam;Shan Lu;Cong Yan;Alvin Cheung
Junwen Yang;Pranav Subramaniam;Shan Lu;Cong Yan;Alvin Cheung
中科院分区:
其他
文献类型:
--
作者:
Junwen Yang;Pranav Subramaniam;Shan Lu;Cong Yan;Alvin Cheung

文献摘要

相似文献

许多Web应用程序使用数据库进行持久数据存储,并且使用对象关系映射(ORM)框架是开发此类数据库支持的Web应用程序的常见方式。不幸的是,开发高效的ORM应用程序是具有挑战性的,因为ORM框架隐藏了底层数据库查询的生成和执行。随着这些应用程序需要处理越来越大量的持久性数据,这个问题变得越来越严重。最近的研究针对ORM应用程序中性能问题的特定方面。然而,还没有任何系统的研究,以确定常见的性能反模式在现实世界中的应用程序,它们如何影响最终的应用程序的性能,以及补救措施。在本文中,我们试图回答这些问题,通过全面的研究,12个代表性的现实世界的ORM应用。我们从200多个性能问题中归纳出9个ORM性能反模式,这些问题是通过研究它们的错误跟踪系统和分析它们的最新版本获得的。为了证明我们的观点,我们在最新版本中手动修复了64个性能问题,并在大多数情况下以不到5行的代码更改获得了2倍(最高39倍)的中值加速。我们发现的许多问题已经得到了开发人员的确认,我们也实现了识别其他具有类似问题的代码片段的方法。
Many web applications use databases for persistent data storage, and using Object Relational Mapping (ORM) frameworks is a common way to develop such database-backed web applications. Unfortunately, developing efficient ORM applications is challenging, as the ORM framework hides the underlying database query generation and execution. This problem is becoming more severe as these applications need to process an increasingly large amount of persistent data. Recent research has targeted specific aspects of performance problems in ORM applications. However, there has not been any systematic study to identify common performance anti-patterns in real-world such applications, how they affect resulting application performance, and remedies for them. In this paper, we try to answer these questions through a comprehensive study of 12 representative real-world ORM applications. We generalize 9 ORM performance anti-patterns from more than 200 performance issues that we obtain by studying their bug-tracking systems and profiling their latest versions. To prove our point, we manually fix 64 performance issues in their latest versions and obtain a median speedup of 2× (and up to 39× max) with fewer than 5 lines of code change in most cases. Many of the issues we found have been confirmed by developers, and we have implemented ways to identify other code fragments with similar issues as well.