Compaction
A storage-engine maintenance process that rewrites and merges data files or segments to reclaim obsolete versions, restore ordering, and reduce lookup cost.
Storage Context
Compaction rewrites and merges storage segments to restore ordering, remove obsolete versions, and reduce future lookup cost. In LSM-tree engines, levelled or tiered policies can consume substantial disk bandwidth and CPU in the background and can affect tail latency.
Terminology Boundary
Compaction is not the same operation as data compression. Compression reduces representation size; compaction reorganizes records and discards data that is no longer logically needed.