CedarDB: How B-Trees Still Shine in Modern Hardware with Optimistic Lock Coupling
2025-03-07

B-trees, a data structure over 50 years old, are surprisingly efficient in modern hardware. CedarDB leverages B-trees for its data storage, showcasing their excellent cache efficiency and scalability in highly parallel environments. With a high fan-out, even a massive dataset like ClickBench (100M rows) requires only three levels of access, perfectly utilizing CPU cache hierarchies. Optimistic lock coupling minimizes contention, resulting in near lock-free read and write operations, performing almost as well as unsynchronized lookups. This article demonstrates how B-trees, through adaptation and optimization, remain a powerful and relevant data structure in modern databases.