Skip to content

Commit c0bfc0f

Browse files
authored
Set a default value of RESTATE_ROCKSDB_TOTAL_MEMORY_SIZE in helm chart (#3927)
1 parent 99f6aac commit c0bfc0f

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

charts/restate-helm/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,26 @@ Helm chart for Restate as a single-node StatefulSet.
88
helm install restate oci://ghcr.io/restatedev/restate-helm --namespace restate --create-namespace
99
```
1010

11+
# Resources
12+
Restate's performance is strongly influenced by the CPU and memory available. You can vary the resources in your values file.
13+
The defaults are:
14+
15+
```yaml
16+
resources:
17+
limits:
18+
cpu: 6
19+
memory: 8Gi
20+
requests:
21+
cpu: 4
22+
memory: 8Gi
23+
```
24+
25+
The environment variable `RESTATE_ROCKSDB_TOTAL_MEMORY_SIZE` should be set such that it is roughly 75% of the memory available.
26+
In the default helm values, this variable is set to `6Gi`.
27+
Under load, Restate will eventually use the entire RocksDB memory size offered to it.
28+
1129
# Running a replicated cluster
12-
You can find example values for a 3-node replicated cluster in [replicated-values.yaml](./replicated-values.yaml).
30+
You can find example values for a 3-node replicated cluster in [replicated-values.yaml](./replicated-values.yaml).
1331
Please ensure you use a version of that file (based on the git tag of the repo) which matches the version of the helm chart you are deploying.
1432

1533
```bash

charts/restate-helm/values.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,23 @@ env:
3939
value: json
4040
- name: RESTATE_CLUSTER_NAME
4141
value: helm-single-node
42+
- name: RESTATE_ROCKSDB_TOTAL_MEMORY_SIZE
43+
# This value should be around 75% of the container memory limit, which defaults to 8Gi below.
44+
# If provisioning restate with a different memory limit, make sure to update this value
45+
value: 6Gi
4246

4347
service:
4448
type: ClusterIP
4549
annotations: {}
4650

4751
resources:
4852
limits:
49-
cpu: 1
50-
memory: 3Gi
53+
cpu: 6
54+
# note the comment above re 'RESTATE_ROCKSDB_TOTAL_MEMORY_SIZE'
55+
memory: 8Gi
5156
requests:
52-
cpu: 500m
53-
memory: 1Gi
57+
cpu: 4
58+
memory: 8Gi
5459

5560
storage:
5661
# If provided the volume will be mounted with the specified claim
@@ -87,4 +92,4 @@ topologySpreadConstraints:
8792
# podDisruptionBudget:
8893
# maxUnavailable: 1
8994

90-
nodeSelector: {}
95+
nodeSelector: {}

0 commit comments

Comments
 (0)