一句话:提出 Amoeba,通过构造语义等价查询对并比较响应时间来自动检测 DBMS 中的性能缺陷。
现代数据密集型应用高度依赖数据库系统(DBMS),开发者虽会大量测试以消除功能缺陷,但另一类影响响应时间的性能缺陷却长期被忽视。本文提出 Amoeba,一种自动检测 DBMS 性能缺陷的技术与工具。其核心思想是构造语义等价的查询对,在待测 DBMS 上分别执行并比较响应时间;若两者响应时间差异显著,则提示该 DBMS 可能存在性能缺陷。为构造等价查询,作者设计了一组面向性能缺陷发现的结构变异与表达式变异规则,并引入反馈机制以提升方法的有效性与效率。作者在 PostgreSQL 和 CockroachDB 两个广泛使用的 DBMS 上评估 Amoeba,结果较有前景:截至目前共发现 39 个潜在性能缺陷,其中开发者已确认 6 个并修复 5 个。
Because modern data-intensive applications rely heavily on database systems (DBMSs), developers extensively test these systems to eliminate bugs that negatively affect functionality. Besides functional bugs, however, there is another important class of faults that negatively affect the response time of a DBMS, known as performance bugs. Despite their potential impact on end-user experience, performance bugs have received considerably less attention than functional bugs. To fill this gap, we present Amoeba, a technique and tool for automatically detecting performance bugs in DBMSs. The core idea behind Amoeba is to construct semantically equivalent query pairs, run both queries on the DBMS under test, and compare their response time. If the queries exhibit significantly different response times, that indicates the possible presence of a performance bug in the DBMS. To construct equivalent queries, we propose to use a set of structure and expression mutation rules especially targeted at uncovering performance bugs. We also introduce feedback mechanisms for improving the effectiveness and efficiency of the approach. We evaluate Amoeba on two widely-used DBMSs, namely PostgreSQL and CockroachDB, with promising results: Amoeba has so far discovered 39 potential performance bugs, among which developers have already confirmed 6 bugs and fixed 5 bugs.
DOI 原文 ·
@inproceedings{paperbot6958,
title = {Automatic detection of performance bugs in database systems using equivalent queries},
author = {Xinyu Liu and Qi Zhou and Joy Arulraj and Alessandro Orso},
booktitle = {ICSE},
year = {2022},
doi = {10.1145/3510003.3510093}
}