确定交易数据库中差异的主要来源:走向更可预测的数据库
Identifying the Major Sources of Variance in Transaction Latencies: Towards More Predictable Databases
摘要:
几十年的研究都在寻求提高数据库管理系统(DBMS)中的事务处理性能和可伸缩性。然而,很少有人关注性能的可预测性:单个事务显示出远离平均值的执行延迟的频率如何?当事务处理位于复杂企业软件或交互式Web服务的关键路线上时,以及在新兴的数据库即服务市场中,客户签订合同以保证性能水平时,性能可预测性至关重要。在本文中,我们采取了几个步骤,实现更可预测的数据库系统。首先,我们提出了一个分析框架,称为VProfiler,给定的DBMS的源代码,是能够确定的主要来源的变化,在事务延迟。VProfiler自动对DBMS源代码进行检测,将事务延迟的总体方差分解为各个函数执行时间的方差和协方差,从而深入了解方差的根本原因。其次,我们使用VProfiler来分析MySQL和Postgres -两个最流行和最复杂的开源数据库系统。我们的案例研究表明,MySQL和Postgres差异的主要原因分别是锁调度和集中式日志记录。最后,基于VProfiler的研究结果,我们进一步关注通过以下方式来弥补MySQL的性能差异:(1)提出一种新的锁调度算法,称为Variance-Aware Transaction Scheduling(VATS),(2)增强缓冲池替换策略,以及(3)确定可以显着减少方差的调优参数。我们的实验结果表明,我们的计划减少整体交易延迟方差平均37%(高达64%),而不影响吞吐量或平均延迟。
英文摘要:
Decades of research have sought to improve transaction processing performance and scalability in database management systems (DBMSs). However, significantly less attention has been dedicated to the predictability of performance: how often individual transactions exhibit execution latency far from the mean? Performance predictability is vital when transaction processing lies on the critical path of a complex enterprise software or an interactive web service, as well as in emerging database-as-a-service markets where customers contract for guaranteed levels of performance. In this paper, we take several steps towards achieving more predictable database systems. First, we propose a profiling framework called VProfiler that, given the source code of a DBMS, is able to identify the dominant sources of variance in transaction latency. VProfiler automatically instruments the DBMS source code to deconstruct the overall variance of transaction latencies into variances and covariances of the execution time of individual functions, which in turn provide insight into the root causes of variance. Second, we use VProfiler to analyze MySQL and Postgres - two of the most popular and complex open-source database systems. Our case studies reveal that the primary causes of variance in MySQL and Postgres are lock scheduling and centralized logging, respectively. Finally, based on VProfiler's findings, we further focus on remedying the performance variance of MySQL by (1) proposing a new lock scheduling algorithm, called Variance-Aware Transaction Scheduling (VATS), (2) enhancing the buffer pool replacement policy, and (3) identifying tuning parameters that can reduce variance significantly. Our experimental results show that our schemes reduce overall transaction latency variance by 37% on average (and up to 64%) without compromising throughput or mean latency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。