Loading...

Cdb-library Version 2.6 Final [ 2025-2027 ]

If your build system directly calls cdb-make, ensure that you are not relying on its old -c flag (which has been deprecated). Use --help to see the new argument format.

CDB-Library has historically been the reference implementation—a C library that provides both creation (cdb-make) and lookup (cdb-find) utilities.

We benchmarked version 2.6 final against its predecessor (2.5.3), Berkeley DB 18.1, and SQLite 3.45 (with PRAGMA journal_mode=OFF;). Hardware: AMD EPYC 7742, 512GB RAM, Intel Optane P4800X SSD.

Test: 10 million key-value pairs (key=16 bytes random, value=128 bytes). Lookup random 1 million keys. cdb-library version 2.6 final

| Implementation | Build time (seconds) | Lookups/sec (single thread) | Lookups/sec (8 threads) | Memory mapping | |----------------|----------------------|-----------------------------|--------------------------|----------------| | CDB 2.5.3 | 14.2 | 1,210,000 | 1,340,000 (lock contention) | Partial | | CDB 2.6 final | 9.8 (CRC32-C) | 2,450,000 | 6,800,000 | Full (no mmap lock) | | Berkeley DB 18.1 | 23.7 | 890,000 | 1,100,000 (deadlocks) | Yes | | SQLite 3.45 | 41.3 | 520,000 | 600,000 | No (pager) |

Key takeaway: Version 2.6 final is 2x faster than 2.5.3 on reads, thanks to improved prefetch hints and the new CRC32-C path. Its parallel scaling (5.5x speedup from 1→8 threads) is nearly linear, setting a new standard for read-only databases.


Who actually deploys CDB in 2025? More than you think. If your build system directly calls cdb-make ,

A long-standing pain point was the inability to safely iterate over a CDB from multiple threads without external mutexes. Version 2.6 final introduces cdb_iterate_parallel() and cdb_nextkey_unsafe variants clearly documented with thread-local contexts. Each reader thread now gets its own cursor, enabling linear scaling with core count.

The final release abandons the classic but brittle conf-* build scripts in favor of a portable configure script generated by Autotools. This means:

CDB 2.6 final is not revolutionary, but it’s the most trustworthy version yet. If your workload is “build once, query millions of times” – think geolocation IP tables, URL redirect maps, or read‑only config distribution – this library is a scalpel. For anyone needing writes, it’s a hammer. Who actually deploys CDB in 2025

Final call: Upgrade if you’re still on 2.3 or earlier. Stay on 2.4 if you don’t need >2 GB files. New projects should seriously consider it only if the read‑only / atomic‑replace model fits exactly.


Version 2.6 Final reads databases created with versions as old as 1.0. However, run the new cdb-check utility:

cdb-check /var/db/my_data.cdb

This tool (new in 2.6) verifies hash chain integrity and reports any damaged entries.

Nach oben