[论文解读] Improving High Contention OLTP Performance via Transaction Scheduling
Strife 通过批量处理事务并将其划分为无冲突的簇和残余事务,提升了高争用 OLTP 的性能;簇并行执行且无需并发控制,而残余事务则串行处理或使用并发控制,与 2PL 和乐观并发控制协议相比,吞吐量最高可提升 2 倍。
Research in transaction processing has made significant progress in improving the performance of multi-core in-memory transactional systems. However, the focus has mainly been on low-contention workloads. Modern transactional systems perform poorly on workloads with transactions accessing a few highly contended data items. We observe that most transactional workloads, including those with high contention, can be divided into clusters of data conflict-free transactions and a small set of residuals. In this paper, we introduce a new concurrency control protocol called Strife that leverages the above observation. Strife executes transactions in batches, where each batch is partitioned into clusters of conflict-free transactions and a small set of residual transactions. The conflict-free clusters are executed in parallel without any concurrency control, followed by executing the residual cluster either serially or with concurrency control. We present a low-overhead algorithm that partitions a batch of transactions into clusters that do not have cross-cluster conflicts and a small residual cluster. We evaluate Strife against the optimistic concurrency control protocol and several variants of two-phase locking, where the latter is known to perform better than other concurrency protocols under high contention, and show that Strife can improve transactional throughput by up to 2x. We also perform an in-depth micro-benchmark analysis to empirically characterize the performance and quality of our clustering algorithm
研究动机与目标
- 为解决传统 OLTP 系统在高数据争用环境下性能下降的问题,尤其是由锁争用和事务回滚导致的性能问题。
- 通过利用事务访问模式的内在特性,降低多核内存 OLTP 系统中的并发控制开销。
- 动态地将事务批处理为无冲突簇和残余事务,以最小化对锁机制或验证机制的依赖。
- 通过并行执行簇和受控并发处理残余事务,在不牺牲可串行化性的情况下实现高吞吐量。
- 在 TPC-C 和 YCSB 等写入密集型、高度争用的工作负载中,超越标准的 2PL 和 OCC 协议。
提出的方法
- Strife 以微批次方式处理事务,独立分析每个批次,识别出无冲突簇和残余事务。
- 一种轻量级的分区算法将事务分组为无跨簇数据冲突的簇,确保并行执行时保持可串行化。
- 无冲突簇在多个核心上并行执行,无需任何并发控制,只要未被显式中止,就保证提交。
- 与多个簇冲突的残余事务则以串行方式或使用并发控制执行,以保证正确性。
- 系统按批次重新分区事务,无需静态数据分区即可适应变化的访问模式。
- 该方法避免了集中式锁管理,并通过最小化锁和验证的使用,减少了事务回滚。
实验结果
研究问题
- RQ1高数据争用的事务工作负载能否被有效划分为无冲突簇,以降低并发控制开销?
- RQ2与静态或全局分区相比,基于批次的动态分区策略如何提升 OLTP 吞吐量?
- RQ3在高争用场景下,完全消除无冲突簇的并发控制能在多大程度上提升性能?
- RQ4在写入密集型工作负载下,Strife 与 2PL 和 OCC 在吞吐量和回滚率方面有何对比?
- RQ5混合执行模型(并行簇与受控残余事务)能否同时实现高性能与可串行化?
主要发现
- 在 TPC-C 和 YCSB 工作负载的高争用环境下,Strife 的吞吐量最高可达标准两阶段锁(2PL)协议的 2 倍。
- 性能提升主要归因于消除了无冲突事务簇的并发控制开销,这些簇在高争用工作负载中占大多数事务。
- Strife 在高写入争用和频繁回滚的工作负载中,优于乐观并发控制(OCC)和其他 2PL 变体。
- 轻量级的分区算法能高效识别无跨簇冲突的簇,支持可扩展的并行执行。
- 通过有效的聚类,残余事务数量被有效控制,减少了对昂贵并发控制或串行化机制的需求。
- Strife 的按批次重新分区机制可适应动态访问模式,优于静态分区数据库或固定并发控制协议。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。