尽可能早地释放锁:通过违反两阶段锁定来减少热点的竞争(扩展版)
Releasing Locks As Early As You Can: Reducing Contention of Hotspots by Violating Two-Phase Locking (Extended Version)
摘要:
热点是由大量事务频繁读取/写入的一小组元组,它会在并发控制协议中引起争用。虽然热点可能只占事务执行时间的一小部分,但传统的严格两阶段锁定允许事务仅在事务完成后才释放锁,这使得大量并行性未被利用。理想情况下,并发控制协议仅在热点期间而不是在事务期间串行化事务。我们观察到,利用这种并行性需要违反两阶段锁定。在本文中,我们提出了竹,一个新的并发控制协议,可以通过修改传统的两阶段锁定,使这种并行性,同时保持相同的保证的正确性。我们彻底分析了读取未提交数据时级联中止的影响,并讨论了可以应用于进一步提高性能的优化。我们对TPC-C的评估显示,与最好的悲观和乐观基线协议相比,性能提高了4倍。在包含单个热点的合成工作负载上,Bamboo的速度比基线提高了19倍。
英文摘要:
Hotspots, a small set of tuples frequently read/written by a large number of transactions, cause contention in a concurrency control protocol. While a hotspot may comprise only a small fraction of a transaction's execution time, conventional strict two-phase locking allows a transaction to release lock only after the transaction completes, which leaves significant parallelism unexploited. Ideally, a concurrency control protocol serializes transactions only for the duration of the hotspots, rather than the duration of transactions. We observe that exploiting such parallelism requires violating two-phase locking. In this paper, we propose Bamboo, a new concurrency control protocol that can enable such parallelism by modifying the conventional two-phase locking, while maintaining the same guarantees in correctness. We thoroughly analyzed the effect of cascading aborts involved in reading uncommitted data and discussed optimizations that can be applied to further improve the performance. Our evaluation on TPC-C shows a performance improvement up to 4x compared to the best of pessimistic and optimistic baseline protocols. On synthetic workloads that contain a single hotspot, Bamboo achieves a speedup up to 19x over baselines.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。