Compaction Required to Prevent Database Bloat
infoResource ContentionUpdated Feb 21, 2026
etcd maintains a full history of all changes through MVCC revisions. Without regular compaction, the database grows indefinitely, consuming disk space and degrading performance.
Sources
How to detect:
Monitor etcd_mvcc_db_total_size_in_bytes growth rate over time. Check the gap between current revision and compacted revision. Alert when database size grows beyond expected bounds for workload.
Recommended action:
Enable auto-compaction with --auto-compaction-mode=periodic and --auto-compaction-retention=1h. Manually compact using etcdctl compact if needed. After compaction, run defragmentation on each member (one at a time) to reclaim space. Monitor database size reduction post-defrag.