Abstract
Quadboost is a high-performance, non-blocking quadtree designed to handle spatial data on modern multi-core systems. By decoupling logical removals from physical tree adjustments and introducing a "continuous find" mechanism, it achieves up to 109% higher throughput than existing concurrent tree structures. This paper details the architecture, core mechanisms, and performance evaluation of Quadboost.
Introduction
Spatial data structures like quadtrees are essential for diverse applications, from game engine collision detection to spatial databases like PostGIS. However, making them work efficiently on multi-core processors is notoriously difficult. Most concurrent trees face two major hurdles: structural integrity and the "move" problem. When multiple threads attempt simultaneous insertions or removals, the tree can become "polluted" with empty nodes, leading to inefficient search paths. Furthermore, moving a point atomically usually requires heavy-handed locking that severely degrades performance.
System Design and Implementation
Quadboost is implemented as a non-blocking region quadtree. The authors chose a region quadtree because its shape is independent of the order of insertions, avoiding the need for complex concurrent rebalancing rules like those found in AVL or Red-Black trees.
Core Mechanisms
- Non-blocking Design: Instead of locks, Quadboost utilizes Compare-And-Swap (CAS) operations. It attaches "Operation" objects to internal nodes to track states (Clean, Substitute, Compress, or Move), allowing threads to "help" each other complete operations rather than blocking.
- Decoupled Removal: The
removeoperation is split into two phases. First, a node is logically removed by being replaced with anEmptynode. Later, a separate "compression" phase physically adjusts the tree structure, preventing threads from interfering with structural updates. - Continuous Find: Standard concurrent trees often restart searches from the root if a CAS fails. Quadboost uses a stack to record the traversal path, allowing it to restart from the nearest valid parent, significantly reducing overhead.
- LCA-based Move: To move a key atomically, the algorithm identifies the Lowest Common Ancestor (LCA) of the old and new positions. It then modifies both positions within a single linearized window, ensuring consistency without global locks.
Performance Evaluation
The authors evaluated Quadboost using synthetic 2D point datasets under varying contention levels on a 32-core system. Quadboost was compared against state-of-the-art concurrent trees, including kary (k-way search tree), ctrie (hash trie), and patricia (binary search tree).
Key Results
- Throughput: Quadboost outperformed the
karytree by up to 109% when retrieving 2D keys. - Move Efficiency: The specialized LCA-based move operation was up to 47% faster than the best-known alternative (
patriciatree). - Scalability: Quadboost showed near-linear scaling as thread counts increased, particularly in low-contention scenarios.
- Memory Efficiency: Thanks to the compression mechanism, Quadboost maintained a memory footprint roughly 1/3 the size of a basic CAS quadtree that lacks structural cleanup.
Conclusion and Future Work
Quadboost demonstrates that a non-blocking region quadtree can provide superior scalability and performance for concurrent spatial data management. While highly effective on uniform distributions, future work will explore performance on highly skewed real-world data and the extension of these techniques to 3D octrees for graphics and physics simulations.
Summary updated