[论文解读] DeltaTree: A Practical Locality-aware Concurrent Search Tree
DeltaTree 是一种新颖的、具有局部性感知能力的并发搜索树,结合了缓存高效的 van Emde Boas(vEB)布局与无锁并发技术,在搜索和更新操作中均实现了高性能。在低至中等竞争环境下,其搜索性能最高可比 AVL、红黑树和乐观友好树快 5 倍,更新性能最高快 1.6 倍,且预期内存传输成本为 $ O(\log_B N) $,使其在面向能效的多核系统中达到最优性能。
As other fundamental programming abstractions in energy-efficient computing, search trees are expected to support both high parallelism and data locality. However, existing highly-concurrent search trees such as red-black trees and AVL trees do not consider data locality while existing locality-aware search trees such as those based on the van Emde Boas layout (vEB-based trees), poorly support concurrent (update) operations. This paper presents DeltaTree, a practical locality-aware concurrent search tree that combines both locality-optimisation techniques from vEB-based trees and concurrency-optimisation techniques from non-blocking highly-concurrent search trees. DeltaTree is a $k$-ary leaf-oriented tree of DeltaNodes in which each DeltaNode is a size-fixed tree-container with the van Emde Boas layout. The expected memory transfer costs of DeltaTree's Search, Insert, and Delete operations are $O(\log_B N)$, where $N, B$ are the tree size and the unknown memory block size in the ideal cache model, respectively. DeltaTree's Search operation is wait-free, providing prioritised lanes for Search operations, the dominant operation in search trees. Its Insert and {\em Delete} operations are non-blocking to other Search, Insert, and Delete operations, but they may be occasionally blocked by maintenance operations that are sometimes triggered to keep DeltaTree in good shape. Our experimental evaluation using the latest implementation of AVL, red-black, and speculation friendly trees from the Synchrobench benchmark has shown that DeltaTree is up to 5 times faster than all of the three concurrent search trees for searching operations and up to 1.6 times faster for update operations when the update contention is not too high.
研究动机与目标
- 解决并发搜索树中高并发性与细粒度数据局部性之间的差距问题。
- 设计能效高效的搜索树,同时优化多级缓存中的并行性与内存访问模式。
- 设计一种动态的、松弛的缓存无关布局,支持高效并发更新,同时不牺牲局部性。
- 在保持最优缓存复杂度的前提下,实现无等待搜索与无锁插入/删除操作。
- 在真实工作负载下,评估 DeltaTree 与当前最先进的并发搜索树的性能表现。
提出的方法
- 设计一种动态的 van Emde Boas(vEB)布局,通过指针支持动态节点分配,同时保持 $ O(\log_B N) $ 的内存传输复杂度。
- 构建一种 $ k $-叉、以叶节点为导向的树结构,每个固定大小的 DeltaNode 使用 vEB 布局,将相关键在内存中连续存储。
- 提出一种松弛的缓存无关模型,假设未知内存块大小 $ B $ 存在上界,从而实现在多级内存中的局部性优化。
- 通过优先级车道实现无等待搜索,确保搜索操作的进展性。
- 采用无锁算法实现插入与删除操作,辅以偶尔的维护操作,可能造成临时阻塞以维持结构平衡。
- 应用等待并检查技术协调更新操作,确保线性化正确性,同时最小化竞争。
实验结果
研究问题
- RQ1在现代多核系统中,搜索树能否同时实现高并发性与细粒度数据局部性?
- RQ2vEB 布局如何适配以支持动态、并发更新,同时不牺牲缓存效率?
- RQ3将局部性感知布局与无锁并发原语结合,其性能影响如何?
- RQ4在搜索与更新吞吐量方面,DeltaTree 与现有并发搜索树(如 AVL、红黑树、乐观友好树)相比表现如何?
- RQ5维护操作在多大程度上影响性能?在真实工作负载下,能否将其保持在最低限度?
主要发现
- 在 100% 搜索工作负载下,DeltaTree 的搜索性能最高比 AVL、红黑树和乐观友好树快 5 倍。
- 在低至中等更新竞争下,DeltaTree 的更新性能最高比三种并发树快 1.6 倍。
- DeltaTree 的缓存未命中率显著低于其他树结构:$ \Delta $ Tree 的缓存未命中率为 8.9% 至 10.6%,而 SFtree 为 11.1%,VTMtree 为 5.5%,且吞吐量远高于后者。
- 动态 vEB 布局将内存传输次数减少至 $ O(\log_B N) $,与缓存无关结构的理论下限一致。
- 无等待搜索操作可确保所有搜索请求在高竞争环境下仍能取得进展。
- 维护操作频率较低,且不主导性能表现,表现为缓存未命中开销低、操作吞吐量高。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。