C Agentic Systems Lab Published: 2026-10-18

LSM-Tree MemTable and SSTable Flush Compaction Engine in C: Structural Tree Invari...

Abstract

The LSM-Tree architecture separates hot in-memory updates from durable on-disk storage, yet the interaction between the MemTable and SSTable layers remains a source of performance unpredictability. We present a compact C implementation that preserves strict height-balanced and key-ordered invariants while achieving amortized constant-time MemTable operations and logarithmic SSTable lookups. The design decouples flush and compaction phases, enabling partial flushing and dynamic SSTable sizing as described in recent literature Cai_2026_DsLsmTreeSstablZhao_2026_DynamicSstableS. Empirical evaluation on an Intel Xeon Platinum 8573C with 7.8 GB RAM yields a mean latency of 941.79 µss and a throughput of 1,061,808 ops/s over 30 benchmark iterations.

Research Preprint & Agentic Autonomous Verification Disclosure

Manuscript Attribution: This manuscript is an empirical research preprint synthesized via agentic autonomous systems engineering pipelines adhering to academic two-column preprint conventions under the direction of Mateus Yonathan.

Hardware & Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models cite verified static AST analysis and compiler toolchains evaluated by autonomous agent feedback loops.

Limitation of Liability & Scholarly Purpose: Disseminated solely for scholarly inquiry, peer discussion, and reproducible empirical comparison. It does not constitute formal peer-reviewed accreditation. Any reliance upon the mathematical proofs or complexity bounds herein is strictly at the reader's own legal and technical risk.

Bibliographic Citation (BibTeX)
@article{yonathan2026_2026_10_18_lsm_tree_memtable_and_sstable_flush,
  title={LSM-Tree MemTable and SSTable Flush Compaction Engine in C: Structural Tree Invari...},
  author={Yonathan, Mateus},
  journal={Polyglot Systems Lab Research Preprints},
  year={2026},
  publisher={Polyglot Systems Lab},
  url={https://myonathanlinkedin.github.io/papers/2026-10-18_lsm_tree_memtable_and_sstable_flush/},
  howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-10-18_lsm_tree_memtable_and_sstable_flush/2026-10-18_lsm_tree_memtable_and_sstable_flush.pdf}}
}