Skip to main content

Module compaction

Module compaction 

Source
Expand description

Background compaction for dead space reclamation.

Compaction scheduling policy (from spec 10, section 7):

  • IO budget: max 30% of IOPS (60% in emergency)
  • Priority: queries > ingest > compaction
  • Triggers: dead_space > 20%, segment_count > 32, time > 60s
  • Emergency: dead_space > 70% -> preempt ingest

Segment selection order:

  1. Tombstoned segments (reclaim dead space)
  2. Small VEC_SEGs (< 1MB, merge into larger)
  3. High-overlap INDEX_SEGs
  4. Cold OVERLAY_SEGs