Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

tinykv

tinykv is a small key–value store written in C++.

It supports basic operations (put, get, del) with persistence using a write-ahead log (WAL) and periodic snapshots. The system is thread-safe and uses sharded locking for concurrent access. A background thread handles WAL writes.

Features

  • put, get, del
  • Write-ahead logging (WAL) for durability
  • Snapshots (checkpoints)
  • Concurrent access with sharded mutexes
  • Background WAL writer thread
  • Simple benchmarking tool

Build

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release  
cmake --build build -j

Run (interactive)

./build/tinykv ./data

Commands:

  • put <key> <value>
  • get <key>
  • del <key>
  • checkpoint
  • stats
  • quit

Benchmark

./build/tinykv_bench <db_dir> <ops> <read_frac> <threads>

Example:

./build/tinykv_bench ./benchdb 500000 0.8 8

This runs a multi-threaded workload and reports throughput and latency statistics.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages