-
Notifications
You must be signed in to change notification settings - Fork 16.8k
[stable/postgresql] Add dedicated tmpfs for /dev/shm. #19025
Conversation
stable/postgresql/README.md
Outdated
@@ -116,6 +116,7 @@ The following tables lists the configurable parameters of the PostgreSQL chart a | |||
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` | | |||
| `service.loadBalancerSourceRanges` | Address that are allowed when svc is LoadBalancer | [] | | |||
| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | | |||
| `enableShmVolume` | Enable emptyDir volume for /dev/shm | `true` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay for you to have, like persistence, one global value to enable for both master and slaves?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but please add that information to the Description:
Enable emptyDir volume for /dev/shm both on master and slaves replicas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this contribution! I quick question:
- Are containers affected by this limitation when using containerd as runtime too?
stable/postgresql/README.md
Outdated
@@ -116,6 +116,7 @@ The following tables lists the configurable parameters of the PostgreSQL chart a | |||
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` | | |||
| `service.loadBalancerSourceRanges` | Address that are allowed when svc is LoadBalancer | [] | | |||
| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | | |||
| `enableShmVolume` | Enable emptyDir volume for /dev/shm | `true` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but please add that information to the Description:
Enable emptyDir volume for /dev/shm both on master and slaves replicas
Hm, this is not clear: containerd/containerd#3654 states that the default is 64MB (with source as reference) and containerd/containerd@20d3fae solves it but I can't see this function called anywhere in containerd repo. |
Actually, I realized that if persistence is not enabled, chmod won't run. Fixing. |
Start a database pod without limitations on shm memory. By default docker limit to (see e.g. the [docker issue](docker-library/postgres#416), which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is , to the target database pod will be mounted a new tmpfs volume to remove this limitation. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @desaintmartin !
Let's merge this and wait for docker/containerd to provide a better solution
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: desaintmartin, juan131 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* [stable/postgresql] Add dedicated tmpsfs for /dev/shm. Start a database pod without limitations on shm memory. By default docker limit to (see e.g. the [docker issue](docker-library/postgres#416), which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is , to the target database pod will be mounted a new tmpfs volume to remove this limitation. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr> * [stable/postgresql] SHM: Second version after review + improvements. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
* [stable/postgresql] Add dedicated tmpsfs for /dev/shm. Start a database pod without limitations on shm memory. By default docker limit to (see e.g. the [docker issue](docker-library/postgres#416), which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is , to the target database pod will be mounted a new tmpfs volume to remove this limitation. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr> * [stable/postgresql] SHM: Second version after review + improvements. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr> Signed-off-by: Carlos Roberto Marques Junior <carlos.marques@bndes.gov.br>
* [stable/postgresql] Add dedicated tmpsfs for /dev/shm. Start a database pod without limitations on shm memory. By default docker limit to (see e.g. the [docker issue](docker-library/postgres#416), which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is , to the target database pod will be mounted a new tmpfs volume to remove this limitation. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr> * [stable/postgresql] SHM: Second version after review + improvements. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
* [stable/postgresql] Add dedicated tmpsfs for /dev/shm. Start a database pod without limitations on shm memory. By default docker limit to (see e.g. the [docker issue](docker-library/postgres#416), which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is , to the target database pod will be mounted a new tmpfs volume to remove this limitation. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr> * [stable/postgresql] SHM: Second version after review + improvements. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
What this PR does / why we need it:
Start a database pod without limitations on shm memory. By default docker
limit to 64MB (see e.g. the docker
issue, which could be
not enough if PostgreSQL uses parallel workers heavily. If this option is
present and value is , to the target database pod will be mounted a new
tmpfs volume to remove this limitation.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
[stable/mychartname]
)