RocksDB - A High Performance Embedded Key-Value Store for Flash Storage

  • Embedded DB for workloads where the latency to a networked DB server isn’t tolerable
  • Open source alternatives at the time: BDB, LevelDB, Kyoto TreeDB, SQLite
  • Home-grown properietary KV stores: fast, but inconsistent/incomplete: no WAL, fixed size keys
  • LevelDB was the fastest for random reads and writes because of the LSM structure, so they started there
  • First LevelDB benchmark: write rate was only 2MB/s and only a single CPU was being used
    • Known issue at the time, LevelDB could only keep one core busy
    • FB fixed this by implementing multithreaded compaction: 100% cpu usage, 10x write throughput