Concurrency control (CC) algorithms are important in modern transactional databases, as they enable high performance by executing transactions concurrently while ensuring correctness. However, state-of-the-art CC algorithms struggle to perform well across diverse workloads, and most do not consider workload drifts. In this paper, we propose NeurCC, a novel learned concurrency control algorithm that achieves high performance across diverse workloads. The algorithm is quick to optimize, making it robust against dynamic workloads. It learns a function that captures a large number of design choices from existing CC algorithms. The function is implemented as an efficient in-database lookup table that maps database states to concurrency control actions. The learning process is based on a combination of Bayesian optimization and a novel graph reduction search algorithm, which converges quickly to a function that achieves high transaction throughput. We compare NeurCC against five state-of-the-art CC algorithms and show that it consistently outperforms the baselines both in transaction throughput and in optimization time.
翻译:并发控制(CC)算法在现代事务数据库中至关重要,它们通过并发执行事务在确保正确性的同时实现高性能。然而,最先进的CC算法难以在多样化工作负载下均表现优异,且大多未考虑工作负载漂移。本文提出NeurCC,一种新颖的基于学习的并发控制算法,能够在多样化工作负载下实现高性能。该算法优化迅速,对动态工作负载具有鲁棒性。它学习一个函数,该函数从现有CC算法中捕获大量设计选择。该函数以高效的数据库内查找表形式实现,将数据库状态映射至并发控制操作。学习过程基于贝叶斯优化与一种新颖的图约简搜索算法的结合,能够快速收敛至实现高事务吞吐量的函数。我们将NeurCC与五种最先进的CC算法进行比较,结果表明其在事务吞吐量和优化时间上均持续优于基线方法。