Skip to main content
QUICK REVIEW

[论文解读] NWR: Rethinking Thomas Write Rule for Omittable Write Operations

Sho Nakazono, Hiroyuki Uchiyama|arXiv (Cornell University)|Apr 17, 2019
Distributed systems and fault tolerance参考文献 39被引用 4
一句话总结

本文提出了非可见写规则(NWR),一种形式化框架,使任何并发控制协议都能在不使用锁的情况下安全地省略写操作,方法是通过验证额外的版本顺序。NWR 将可省略性与时间戳排序解耦,使 Sill、TicToc 和 MVTO 等协议在高度写入争用的工作负载上实现高达 11 倍的性能提升,同时保持严格可串行化和可恢复性。

ABSTRACT

Concurrency control protocols are the key to scaling current DBMS performances. They efficiently interleave read and write operations in transactions, but occasionally they restrict concurrency by using coordination such as exclusive lockings. Although exclusive lockings ensure the correctness of DBMS, it incurs serious performance penalties on multi-core environments. In particular, existing protocols generally suffer from emerging highly write contended workloads, since they use innumerable lockings for write operations. In this paper, we rethink the Thomas write rule (TWR), which allows the timestamp ordering (T/O) protocol to omit write operations without any lockings. We formalize the notion of omitting and decouple it from the T/O protocol implementation, in order to define a new rule named non-visible write rule (NWR). When the rules of NWR are satisfied, any protocol can in theory generate omittable write operations with preserving the correctness without any lockings. In the experiments, we implement three NWR-extended protocols: Silo+NWR, TicToc+NWR, and MVTO+NWR. Experimental results demonstrate the efficiency and the low-overhead property of the extended protocols. We confirm that NWR-extended protocols achieve more than 11x faster than the originals in the best case of highly write contended YCSB-A and comparable performance with the originals in the other workloads.

研究动机与目标

  • 解决多核系统中因写入争用导致的过度锁定所引发的性能瓶颈。
  • 独立于时间戳排序,形式化‘可省略写操作’的概念,突破经典 Thomas 写规则(TWR)的局限。
  • 通过验证额外的版本顺序,使任何并发控制协议都能安全地省略写操作,同时保持严格可串行化和可恢复性。
  • 设计并实现扩展了 NWR 的协议,在现代基准测试中实现高性能且开销极小。

提出的方法

  • 利用多版本可串行化理论中的版本顺序形式化‘可省略性’,定义若存在反向版本顺序,则写操作可被省略。
  • 通过引入非可见写规则(NWR)将可省略性与基于时间戳的协议解耦,该规则依赖于验证反向版本顺序。
  • 通过添加对额外版本顺序的验证,将 NWR 扩展至现有协议(Silo、TicToc、MVTO),以检测并省略过时的写操作。
  • 使用 MVSG(多版本可串行化图)验证的变体来检查一致性,并通过优化减少缓存开销,复用图结构。
  • 实现一种机制以检测盲更新,并仅在写操作不可见且可安全省略时应用 NWR。
  • 通过复用现有数据结构并最小化冗余操作,优化版本列表中的遍历过程,尤其在 MVTO+NWR 中表现显著。

实验结果

研究问题

  • RQ1可省略写操作的概念能否超越时间戳排序协议(如 T/O)进行泛化?
  • RQ2在不牺牲严格可串行化或可恢复性的情况下,必须满足哪些形式化条件才能安全地省略写操作?
  • RQ3协议能否高效地验证多个版本顺序,特别是在高争用工作负载中?
  • RQ4NWR 扩展协议在不同工作负载下的性能与原始协议相比如何?

主要发现

  • 在高度写入争用的 YCSB-A 基准测试中,NWR 扩展协议在性能上超过原始 Silo 协议 11 倍以上。
  • 在 TPC-C 基准测试中,该测试具有高读写争用,NWR 扩展协议保持了与原始协议相当的性能。
  • MVTO+NWR 变体由于版本列表的双重遍历而产生额外开销,但实际中通过反向版本顺序验证的高效性得以缓解。
  • 通过验证单一额外版本顺序,实现了高效且正确的写操作省略,无需集中式事务管理或复杂协调机制。
  • NWR 的 PV-Rule 确保仅需验证连通子图即可完成回滚,显著降低了维护多个版本顺序的计算成本。
  • NWR 框架具有普适性:任何协议均可通过添加单一反向版本顺序检查来扩展 NWR,从而在各种并发控制模型中实现安全的写操作省略。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。