Skip to content

Commit

Permalink
Customize shm size in postgres pod
Browse files Browse the repository at this point in the history
By default shm size is 64MB, dashboard usage page uses around 100MB
  • Loading branch information
majamassarini committed Apr 18, 2024
1 parent 98c748f commit bedef20
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions openshift/postgres.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ spec:
ports:
- containerPort: 5432
protocol: TCP
# increase shm size, default is 64M
# dashboard usage page requires around 100MB
volumeMounts:
- mountPath: /dev/shm
name: cache-volume
livenessProbe:
exec:
command:
Expand All @@ -53,12 +58,12 @@ spec:
# - /usr/libexec/check-container
resources:
requests:
memory: "{{ '2Gi' if project == 'packit--prod' else '128Mi' }}"
memory: "{{ '2Gi' if project == 'packit--prod' else '256Mi' }}"
cpu: "30m"
limits:
# The shared_buffers & effective_cache_size values are set by the container
# based on this limit, so keep the limit reasonably high.
memory: "{{ '4Gi' if project == 'packit--prod' else '256Mi' }}"
memory: "{{ '4Gi' if project == 'packit--prod' else '512Mi' }}"
# Not utilized most of the time, but useful during migrations and for some queries
cpu: "1"
volumeMounts:
Expand All @@ -75,6 +80,11 @@ spec:
- name: postgres-config
configMap:
name: postgres-config
- name: cache-volume
emptyDir:
medium: Memory
sizeLimit: 128Mi

replicas: 1
strategy:
type: Recreate
Expand Down

0 comments on commit bedef20

Please sign in to comment.