Overview

Usage

Limiting the DB Size

  1. Before starting a compaction, RocksDB will check if there is enough room to create the output SST files. This is done by calling . This function conservatively estimates the output size as the sum of the sizes fo all the input SST files to the compaction. If the output size, plus the compaction buffer size if its set, will cause the total size to exceed the limit set by SstFileManager::SetMaxAllowedSpaceUsage(), the compaction is not allowed to proceed. The compaction thread will sleep for 1 second before adding the column family back to the compaction queue. So this effectively throttles the compaction rate.