# 【etcd】Compaction、Defrag 与容量：quota、alarm 与 SLO

DevFeed: [【etcd】Compaction、Defrag 与容量：quota、alarm 与 SLO](<https://devfeed.tech/articles/etcd-compaction-defrag-quota-alarm-slo-33994.md>)

Original publisher: [Read original article](<https://quant67.com/post/etcd/12-compaction-quota/12-compaction-quota.html>)

Author: Liao Tonglang

Published: 2026-08-26T00:00:00Z

Content type: tutorial

Language: zh

Sources: [土法炼钢 - 系统与基础设施](<https://devfeed.tech/sources/source-4.md>)

Topics: [etcd](<https://devfeed.tech/topics/etcd.md>), [Raft](<https://devfeed.tech/topics/raft.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>)

Tags: [alarm](<https://devfeed.tech/tags/alarm.md>), [bbolt](<https://devfeed.tech/tags/bbolt.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [compaction](<https://devfeed.tech/tags/compaction.md>), [defrag](<https://devfeed.tech/tags/defrag.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [errcompacted](<https://devfeed.tech/tags/errcompacted.md>), [etcd](<https://devfeed.tech/tags/etcd.md>), [follower](<https://devfeed.tech/tags/follower.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [lag](<https://devfeed.tech/tags/lag.md>), [leader](<https://devfeed.tech/tags/leader.md>), [mvcc](<https://devfeed.tech/tags/mvcc.md>), [nospace](<https://devfeed.tech/tags/nospace.md>), [performance](<https://devfeed.tech/tags/performance.md>), [quota](<https://devfeed.tech/tags/quota.md>), [raft](<https://devfeed.tech/tags/raft.md>), [resourceversion](<https://devfeed.tech/tags/resourceversion.md>), [v3](<https://devfeed.tech/tags/v3.md>), [v3-5](<https://devfeed.tech/tags/v3-5.md>), [v3-5-33](<https://devfeed.tech/tags/v3-5-33.md>), [watch](<https://devfeed.tech/tags/watch.md>)

## AI overview

This technical article explains how etcd v3.5.33 compaction, defragmentation, quota handling, and the NOSPACE alarm interact. It distinguishes revision-history removal from bbolt file reclamation, describes periodic and revision-based auto-compaction, and connects retention, quota, defrag pauses, and Watch or Kubernetes control-plane behavior to operational SLOs.

## Source excerpt

钉 etcd v3.5.33 MVCC compaction 与 bbolt defrag 的分工、auto-compaction 保留窗口、quota-backend-bytes 与 NOSPACE alarm 写入门，以及 ErrCompacted 如何写进 Watch SLO。