[Question] [Defrag and Compaction] - Fundamental Understanding Question #17310
-
Say I had a cluster that's been in production for a while, compaction occurs every 72h, but I've never defragged the cluster. Does that mean the tombstoned keys will continue to occupy space until defragged? Background: Database has only 350ish keys Just wanted to confirm my theory, thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Short answer yes. Compacting old revisions internally fragments etcd by leaving gaps in backend database. Fragmented space is available for use by etcd but unavailable to the host filesystem. In other words, deleting application data does not reclaim the space on disk. If you use etcd with a space quota (which you should) then over time fragmentation will mean etcd will run out of storage space. |
Beta Was this translation helpful? Give feedback.
-
Thank you. |
Beta Was this translation helpful? Give feedback.
Short answer yes.
Compacting old revisions internally fragments etcd by leaving gaps in backend database. Fragmented space is available for use by etcd but unavailable to the host filesystem. In other words, deleting application data does not reclaim the space on disk.
If you use etcd with a space quota (which you should) then over time fragmentation will mean etcd will run out of storage space.