Skip to content

Commit

Permalink
Adjust citus memory configuration (#9384)
Browse files Browse the repository at this point in the history
- Increase citus worker patroni container memory limit to 40GB
- Reduce work_mem to 12MB
- Reduce coordinator shared_buffers to 7GB
- Set priority class to critical

Signed-off-by: Xin Li <[email protected]>
  • Loading branch information
xin-hedera authored Sep 17, 2024
1 parent b2349db commit b4522b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions charts/hedera-mirror/templates/stackgres/stackgres-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ spec:
persistentVolume: {{ .Values.stackgres.coordinator.persistentVolume | toYaml | nindent 8 }}
resources:
disableResourcesRequestsSplitFromTotal: {{ .Values.stackgres.dedicatedResourcesRequests }}
{{- if eq ((.Values.stackgres.coordinator.persistentVolume).storageClass) "zfs" }}
scheduling:
priorityClassName: {{ .Values.stackgres.priorityClassName }}
{{- if eq ((.Values.stackgres.coordinator.persistentVolume).storageClass) "zfs" }}
nodeSelector:
citus-role: coordinator
csi-type: zfs
Expand All @@ -30,7 +31,7 @@ spec:
operator: Equal
value: "true"
effect: NoSchedule
{{- end }}
{{- end }}
sgInstanceProfile: {{ include "hedera-mirror.stackgres" . }}-coordinator
database: {{ .Values.db.name }}
nonProductionOptions:
Expand Down Expand Up @@ -59,8 +60,9 @@ spec:
persistentVolume: {{ .Values.stackgres.worker.persistentVolume | toYaml | nindent 8 }}
resources:
disableResourcesRequestsSplitFromTotal: {{ .Values.stackgres.dedicatedResourcesRequests }}
{{- if eq ((.Values.stackgres.worker.persistentVolume).storageClass) "zfs" }}
scheduling:
priorityClassName: {{ .Values.stackgres.priorityClassName }}
{{- if eq ((.Values.stackgres.worker.persistentVolume).storageClass) "zfs" }}
nodeSelector:
citus-role: worker
csi-type: zfs
Expand All @@ -69,7 +71,7 @@ spec:
operator: Equal
value: "true"
effect: NoSchedule
{{- end }}
{{- end }}
sgInstanceProfile: {{ include "hedera-mirror.stackgres" . }}-worker
type: citus
{{- end -}}
3 changes: 2 additions & 1 deletion charts/hedera-mirror/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ stackgres:
persistentVolume:
size: 256Gi
storageClass: zfs
priorityClassName: critical
worker:
instances: 3
replicasPerInstance: 1
resources:
cpu: 9500m
memory: 34Gi
memory: 40Gi
requests:
containers:
cluster-controller:
Expand Down
7 changes: 4 additions & 3 deletions charts/hedera-mirror/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ stackgres:
max_wal_size: "24GB"
password_encryption: "scram-sha-256"
random_page_cost: "1.1"
shared_buffers: "9GB"
shared_buffers: "7GB"
wal_init_zero: "off" # Not needed with ZFS
wal_recycle: "off" # Not needed with ZFS
work_mem: "16MB"
work_mem: "12MB"
enableMetricsExporter: false
enablePostgresUtil: true
instances: 1
Expand Down Expand Up @@ -328,6 +328,7 @@ stackgres:
nameOverride: citus
podAntiAffinity: true
postgresVersion: "16.2"
priorityClassName: ""
worker:
config:
autovacuum_max_workers: "2"
Expand All @@ -344,7 +345,7 @@ stackgres:
shared_buffers: "12GB"
wal_init_zero: "off" # Not needed with ZFS
wal_recycle: "off" # Not needed with ZFS
work_mem: "16MB"
work_mem: "12MB"
enableMetricsExporter: false
enablePostgresUtil: true
instances: 1
Expand Down

0 comments on commit b4522b8

Please sign in to comment.