Master the fundamental concepts of build a simple key-value store through this focused micro-challenge.
LSM tuning knobs include memtable size, bloom bits per key, compaction style, and block cache. RocksDB benchmarks report write amplification, read amplification, and p99 latency together because optimizing one metric often hurts another.
Sequential write, random read, mixed read/write, and range scan. Track bytes written per user byte inserted.
cLoading…
Keep the relevant documentation open while you implement. When your output disagrees with the reference, trace one failing case by hand before changing random lines.
You will run a modeled or implemented KV workload and print throughput plus amplification metrics. This exercise requires interpreting one tradeoff between write amplification and read latency.
Document one invariant you will assert in tests and how you would detect its violation from observable symptoms.
Write a C program that models and benchmarks an LSM tree configuration.
Requirements:
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
All starter code and reference implementations are available for your local setup.
View on Github