Kiban
A durable LSM-tree storage engine exploring WALs, memtables, SSTables, compaction, and crash recovery from first principles.
About
An embedded LSM-tree storage engine in Rust. Single node. Zero dependencies. Byte keys, byte values, sorted.
Writes go to a write-ahead log, then to an in-memory memtable. Flushes produce sorted SSTables. Compaction merges SSTables and drops versions that no active snapshot can observe. Reads check sources from newest to oldest; sequence numbers order everything.
Benchmarks
- 90R/10W · after · gets/s
- 468K gets/s → 4.22M gets/s +801.7%
- 90R/10W · after · us
- 368us → 7.48us -98%
- 95R/5W · after · gets/s
- 280K gets/s → 4.91M gets/s +1653.6%
- 95R/5W · after · us
- 647us → 24.8us -96.2%
- 99R/1W · after · gets/s
- 1.91M gets/s → 4.59M gets/s +140.3%
- 99R/1W · after · us
- 37us → 18.5us -50%
- 100R/0W · after · gets/s
- 5.10M gets/s → 8.58M gets/s +68.2%
- 100R/0W · after · us
- 13us → 4.42us -66%
- wall clock, 40K writes
- 948ms → ~470ms -50.4%
- compaction throughput
- ~8.85 MB/s → ~18 MB/s +103.4%
- recovery-phase PUT p99
- ~1990us → ~115us -94.2%
Activity
- chore(deps): bump taiki-e/install-action from 2.87.28 to 2.87.29#27
- chore(deps): bump Swatinem/rust-cache from 2.9.2 to 2.9.3#26
- Group commit: QA tests, stronger crash oracle, deterministic slot test#25
- Enable the perfect-hash point index by default#24
- Group commit: acknowledge committed writes, panic-safe hand-off, close test gaps#23
- Add KibanOptions::agent_memory: one-call profile for the benchmarked configuration#22
- Group commit for durable shared writes: 7.5× throughput at 16 writers#21
- Opt-in binary fuse filters for SSTs (XXH3), with filter-first misses#20
- Small-cache point reads beat LMDB: per-value CRC, resident locators, opt-in mmap#19
- Opt-in PH3 scan extension: latest-K reads faster than LMDB#18