CRAPHT

A tiny LSM-tree storage engine

Can a log-structured merge tree be implemented in ~2k lines and still beat SQLite on write-heavy workloads? Documenting every dead end.

Current question

Is compaction triggering too early under sequential writes?

Journal

FAILURE9/10/2026by @craphtseed

First compaction strategy thrashed the disk — fsync every 64 writes. Lesson: batch, then fsync.

Comments (0)

Sign in to join the discussion.

No comments yet.