You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In extreme write scenarios when append-only files (AOF) are enabled, the AOF rewrite process can require considerably more disk space for [database persistence]({{<relref "/operate/rs/databases/configure/database-persistence/">}}).
14
+
15
+
For disk size requirements for standard usage, see [Hardware requirements]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements" >}}).
16
+
17
+
## Estimate required disk space
18
+
19
+
To estimate the required persistent disk space for AOF rewrite purposes in extreme write scenarios, use the following formula:
20
+
21
+
**X (1 + 3Y + Y²)**
22
+
23
+
Where:
24
+
-**X** = size of each shard in GB
25
+
-**Y** = number of shards
26
+
27
+
28
+
## Examples
29
+
30
+
The following examples show how to calculate the persistent disk space required for heavy write scenarios for different database configurations, where:
31
+
32
+
-**Database size** is the memory limit configured for the database.
33
+
34
+
-**Number of shards** is the total number of shards (primary shards + replica shards).
35
+
36
+
### Example 1
37
+
38
+
- Database size = 10 GB
39
+
- Number of shards = 4
40
+
41
+
1. Calculate the shard size:
42
+
43
+
```sh
44
+
Shard size = database size / number of shards
45
+
= 10 GB / 4 shards
46
+
= 2.5 GB per shard
47
+
```
48
+
49
+
1. Use the formula to calculate the required persistent disk space:
50
+
51
+
```sh
52
+
Disk space = X (1 + 3Y + Y²)
53
+
= 2.5 (1 + 3 × 4 + 4²)
54
+
= 2.5 (1 + 12 + 16)
55
+
= 2.5 × 29
56
+
= 72.5 GB
57
+
```
58
+
59
+
1. Round up to 73 GB of required disk space.
60
+
61
+
### Example 2
62
+
63
+
- Database size = 10 GB
64
+
- Number of shards = 16
65
+
66
+
1. Calculate the shard size:
67
+
68
+
```sh
69
+
Shard size = database size / number of shards
70
+
= 10 GB / 16 shards
71
+
= 0.625 GB per shard
72
+
```
73
+
74
+
1. Use the formula to calculate the required persistent disk space:
75
+
76
+
```sh
77
+
Disk space = X (1 + 3Y + Y²)
78
+
= 0.625 (1 + 3 × 16 + 16²)
79
+
= 0.625 (1 + 48 + 256)
80
+
= 0.625 × 305
81
+
= 190.625 GB
82
+
```
83
+
84
+
1. Round up to 191 GB of required disk space.
85
+
86
+
### Example 3
87
+
88
+
- Database size = 40 GB
89
+
- Number of shards = 5
90
+
91
+
1. Calculate the shard size:
92
+
93
+
```sh
94
+
Shard size = database size / number of shards
95
+
= 40 GB / 5 shards
96
+
= 8 GB per shard
97
+
```
98
+
99
+
1. Use the formula to calculate the required persistent disk space:
100
+
101
+
```sh
102
+
Disk space = X (1 + 3Y + Y²)
103
+
= 8 (1 + 3 × 5 + 5²)
104
+
= 8 (1 + 15 + 25)
105
+
= 8 × 41
106
+
= 328 GB
107
+
```
108
+
109
+
1. Required disk space: 328 GB.
110
+
111
+
### Example 4
112
+
113
+
- Database size = 40 GB
114
+
- Number of shards = 15
115
+
116
+
1. Calculate the shard size:
117
+
118
+
```sh
119
+
Shard size = database size / number of shards
120
+
= 40 GB / 15 shards
121
+
= 2.67 GB per shard
122
+
```
123
+
124
+
1. Use the formula to calculate the required persistent disk space:
0 commit comments