Concurrency control algorithms are key determinants of the performance of in-memory databases. Existing algorithms are designed to work well for certain workloads. For example, optimistic concurrency control (OCC) is better than two-phase-locking (2PL) under low contention, while the converse is true under high contention. To adapt to different workloads, prior works mix or switch between a few known algorithms using manual insights or simple heuristics. We propose a learning-based framework that instead explicitly optimizes concurrency control via offline training to maximize performance. Instead of choosing among a small number of known algorithms, our approach searches in a "policy space" of fine-grained actions, resulting in novel algorithms that can outperform existing algorithms by specializing to a given workload. We build Polyjuice based on our learning framework and evaluate it against several existing algorithms. Under different configurations of TPC-C and TPC-E, Polyjuice can achieve throughput numbers higher than the best of existing algorithms by 15% to 56%.
翻译:货币控制算法是模拟数据库工作表现的关键决定因素。 现有的算法设计是为了很好地处理某些工作量。 例如, 乐观的货币控制(OCC) 优于低争议下的两阶段锁定(2PL), 而相反则在高争议下是真实的。 要适应不同的工作量、 先前的工作组合或利用人工洞察力或简单的超常理论转换一些已知的算法。 我们提议了一个基于学习的框架, 而不是通过离线培训来明确优化同值控制, 以最大限度地提高绩效。 我们的方法不是在少数已知的算法中选择精细行动“ 政策空间”, 而是在“ 政策空间” 中进行搜索, 导致新的算法能够通过专门处理特定工作量而优于现有算法。 我们根据学习框架建立多功能, 并根据一些现有的算法对它进行评估。 在TPC 和 TPC- E 的不同配置下, 多juice 能够实现比现有算法最佳的通过量高出15%到56%。