Skip to content

Commit 073e15e

Browse files
authored
Merge pull request #36463 from tmalove/auto-defrag-etcd-data-osdocs-2342
[OSDOCS-2342]: Update etcd defragmentation section to include automatic defrag
2 parents d26b254 + 613e3a8 commit 073e15e

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

modules/etcd-defrag.adoc

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,40 @@
66
[id="etcd-defrag_{context}"]
77
= Defragmenting etcd data
88

9-
Manual defragmentation must be performed periodically to reclaim disk space after etcd history compaction and other events cause disk fragmentation.
9+
Defragment etcd data to reclaim disk space after events that cause disk fragmentation, such as etcd history compaction.
1010

1111
History compaction is performed automatically every five minutes and leaves gaps in the back-end database. This fragmented space is available for use by etcd, but is not available to the host file system. You must defragment etcd to make this space available to the host file system.
1212

13-
Because etcd writes data to disk, its performance strongly depends on disk performance. Consider defragmenting etcd every month, twice a month, or as needed for your cluster. You can also monitor the `etcd_db_total_size_in_bytes` metric to determine whether defragmentation is necessary.
13+
Defragmentation occurs automatically, but you can also trigger it manually.
14+
15+
[NOTE]
16+
====
17+
Automatic defragmentation is good for most cases, because the etcd operator uses cluster information to determine the most efficient operation for the user.
18+
====
19+
20+
== Automatic defragmentation
21+
22+
The etcd Operator automatically defragments disks. No manual intervention is needed.
23+
24+
Verify that the defragmentation process is successful by viewing one of these logs:
25+
26+
* etcd logs
27+
* cluster-etcd-operator pod
28+
* operator status error log
29+
30+
.Example log output
31+
[source,terminal]
32+
----
33+
I0907 08:43:12.171919 1
34+
defragcontroller.go:198] etcd member "ip-
35+
10-0-191-150.us-west-2.compute.internal"
36+
backend store fragmented: 39.33 %, dbSize:
37+
349138944
38+
----
39+
40+
== Manual defragmentation
41+
42+
You can monitor the `etcd_db_total_size_in_bytes` metric to determine whether manual defragmentation is necessary.
1443

1544
[WARNING]
1645
====

0 commit comments

Comments
 (0)