the.com/compaction
Storage's version of cleaning your room by throwing out the duplicates and merging the rest.
means The process of consolidating and rewriting data into a denser, more efficient form by eliminating redundancy and reclaiming wasted space.
from Rooted in Latin compingere ('to pack together'), from com- ('together') and pangere ('to fasten, fix'). The word moved through 'compact' as an adjective describing dense, tightly-packed things, then spawned 'compaction' as the noun for the act of making something that way — a sense later borrowed wholesale by computing to describe squeezing storage into its tightest, tidiest form.
- origin
- core concept in LSM-tree databases like LevelDB, Cassandra
- tradeoff
- burns CPU and disk IO now, saves space later
- side effect
- deletes tombstones, reclaiming space from deleted rows
- danger
- skip it too long and read performance quietly rots