[Paper Review] Stratified B-trees and versioning dictionaries
This paper introduces the stratified B-tree, a novel versioned dictionary data structure that achieves optimal tradeoffs between space, query, and update performance—surpassing the copy-on-write (CoW) B-tree in all aspects. It enables fully-versioned updates in o(1) I/Os using linear space, with experimental results showing up to 100,000 updates per second on a SATA disk, two orders of magnitude faster than CoW B-trees.
A classic versioned data structure in storage and computer science is the copy-on-write (CoW) B-tree -- it underlies many of today's file systems and databases, including WAFL, ZFS, Btrfs and more. Unfortunately, it doesn't inherit the B-tree's optimality properties; it has poor space utilization, cannot offer fast updates, and relies on random IO to scale. Yet, nothing better has been developed since. We describe the `stratified B-tree', which beats all known semi-external memory versioned B-trees, including the CoW B-tree. In particular, it is the first versioned dictionary to achieve optimal tradeoffs between space, query and update performance.
Motivation & Objective
- To address the limitations of copy-on-write (CoW) B-trees, which suffer from poor space efficiency, slow updates due to random I/O, and reliance on random access for scaling.
- To design a versioned dictionary that achieves optimal tradeoffs between space, query time, and update performance, subsuming existing CoW B-tree designs.
- To enable fast, scalable updates using sequential I/O and linear space, making it suitable for modern storage systems like SSDs and log-structured file systems.
- To provide a consistent, crash-safe, and lock-free concurrent design suitable for multi-core environments and production deployment.
Proposed method
- The stratified B-tree uses a hierarchical structure of doubling arrays (SDA) to represent versioned data, where each level maintains a sorted array of key-value pairs with incremental updates.
- Updates are performed by appending new entries to the appropriate level’s array, with periodic promotions to higher levels to maintain balance and reduce space blowup.
- The structure supports efficient range queries by traversing arrays in top-down order, leveraging sorted order and prefix sums to locate relevant entries quickly.
- A reverse depth-first search (DFS) order ensures that nodes are written only after their children, enabling lock-free, concurrent construction and consistent state management.
- The design avoids random I/O by using sequential writes and supports crash consistency by deferring visibility of new data until a final atomic update.
- The system is inherently cache-oblivious and does not require tuning for block size, making it well-suited for SSDs with asymmetric read/write performance.
Experimental results
Research questions
- RQ1Can a versioned B-tree achieve the same query and update I/O bounds as the CoW B-tree while using only linear space?
- RQ2Can a versioned dictionary support updates in o(1) I/Os with linear space, even if query performance is slightly relaxed?
- RQ3Can a versioned data structure scale efficiently using sequential I/O instead of random I/O, improving performance on HDDs and SSDs?
- RQ4Is it possible to design a consistent, crash-safe, and lock-free concurrent versioned dictionary that supports high-throughput updates?
Key findings
- The stratified B-tree achieves optimal query performance with O(logB N) I/Os, matching the CoW B-tree, but with significantly better space efficiency.
- The structure supports updates in o(1) I/Os using linear space, enabling up to 100,000 updates per second on a standard SATA disk—two orders of magnitude faster than CoW B-trees.
- Experimental results show the SDA-based implementation outperforms the CoW B-tree by a factor of over 10 in range query throughput, limited only by CPU in single-threaded OCaml.
- A highly concurrent in-kernel prototype demonstrates potential for over 500,000 versioned updates per second on 16 cores, indicating strong horizontal scaling.
- The design is naturally consistent and crash-safe, with new data only becoming visible after a single atomic update, ensuring recovery without additional work.
- The structure is inherently cache-oblivious and does not require block-size tuning, making it well-suited for modern storage devices like SSDs with asymmetric I/O characteristics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.