Source linked

Concurrent Splay Trees That Actually Scale on Skewed Workloads

A new rotation design uses depth thresholds to keep splay trees from destroying concurrency, improving throughput on Zipfian workloads by reducing root contention.

splay treesconcurrent data structureszipfian distributionarxivbronsonrotation design

Splay trees have always been the sequential answer to skewed access patterns, but try to make one concurrent and you end up with a pile of contention near the root—the exact place where every access wants to write. A new arXiv preprint from the concurrent systems community finally addresses this head-on by bounding how far each access can splay.

Static Optimality Without the Bottleneck

The core trick: instead of moving every accessed node all the way to the root, the paper defines two depth thresholds derived from static-optimality complexity, computed from the node's access count. A node rotates only when it is substantially deeper than the upper threshold, and stops rotating before it hits the lower threshold. This leaves frequently-accessed nodes shallow enough to be fast, but prevents them from monopolizing the root region where concurrent writes collide. No balancing information stored—just access counters.

64-Bit Counter vs. 6-Bit Approximation

Two variants are presented: one with an exact 64-bit access counter per node and one with a 6-bit approximate counter. The 6-bit version trades off precision for memory and cache footprint, which matters when you're counting billions of operations. The authors prove static optimality for the sequential read-only version of the tree, giving a formal guarantee that the threshold scheme doesn't sacrifice the core splay property.

Experimental Results on Skewed Workloads

Both rotation designs were implemented on top of the concurrent AVL tree of Bronson et al., a well-known low-contention baseline. The benchmark results on skewed workloads (Zipfian distributions and others) show clear throughput improvement. The paper doesn't claim a miracle—this is an incremental fix that preserves the practical benefit of splaying while taming the worst contention patterns.

If you've ever watched a concurrent data structure choke on a Zipfian distribution, this is the kind of practical fix that might make you take another look at splay-based indices.


Source: Concurrent Splay-Based Tree
Domain: arxiv.org

Read original source ->

External source stays available while the OJO article and comment thread stay local.

Comments load interactively on the live page.