Because database systems are the critical component of modern data-intensive applications, it is important to ensure that they operate correctly. To this end, developers extensively test these systems to eliminate bugs that negatively affect functionality. In addition to functional bugs, however, there is another important class of bugs: performance bugs. These bugs negatively affect the response time of a database system and can therefore affect the overall performance of the system. Despite their impact on end-user experience, performance bugs have received considerably less attention than functional bugs. In this paper, we present AMOEBA, a system for automatically detecting performance bugs in database systems. The core idea behind AMOEBA is to construct query pairs that are semantically equivalent to each other and then compare their response time on the same database system. If the queries exhibit a significant difference in their runtime performance, then the root cause is likely a performance bug in the system. We propose a novel set of structure and predicate mutation rules for constructing query pairs that are likely to uncover performance bugs. We introduce feedback mechanisms for improving the efficacy and computational efficiency of the tool. We evaluate AMOEBA on two widely-used DBMSs, namely PostgreSQL and CockroachDB. AMOEBA has discovered 20 previously-unknown performance bugs, among which developers have already confirmed 14 and fixed 4.
翻译:由于数据库系统是现代数据密集型应用程序的关键组成部分,因此必须确保其正确运行。为此,开发者广泛测试这些系统以消除对功能有负面影响的错误。但是,除了功能性错误之外,还有另一类重要的错误:性能错误。这些错误对数据库系统的反应时间产生了负面影响,因此可能影响系统的整体性能。尽管对终端用户经验的影响,但性能错误得到的关注远远低于功能性错误。在本文件中,我们介绍了AMOEBA,这是一个自动检测数据库系统性能错误的系统。AMOEBA的核心想法是建立相互等同的查询配对,然后比较同一数据库系统中的响应时间。如果询问显示其运行时间有显著差异,那么根部可能就会影响系统的整体性能问题。我们提出了一套新颖的结构和上游突变规则,用于构建可能发现性能错误的查询配对。我们引入了反馈机制,以提高工具的效能和计算效率。AMOEBA和DBA已经广泛应用的DBS 4,我们评估了AMO-BAS已经发现的两个已广泛使用的DBS 。