How to Compact Data in Milvus?
Feb 21, 2022Bingyi Sun

Summary
This post details the concept and implementation of data compaction in Milvus 2.0. It explains that compaction merges small segments into large ones and cleans logically deleted data to save storage space and improve query efficiency. It covers configuration parameters (`dataCoord.enableCompaction`, `common.retentionDuration`), manual and automatic triggering mechanisms, and the specific processes for binlog compaction (based on delta binlog row count or size) and segment compaction (based on the number of small sealed segments).
More from the AI Data Storage Engine trail
- Milvus Snapshots: Point-in-Time Collection Views Without Copying Data
- Announcing Milvus 3.0: Lake-Native Vector Search and a More Powerful Retrieval Engine
- How to Recover Milvus Data After etcd Corruption Without a Backup
- Open Tag: An Open-Source Claude Tag for Claude Code and Codex
- How Force Merge Compaction Nearly Doubled Milvus Search QPS