Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stops limiting size of /dev/shm and /dev #159

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

klakin-pivotal
Copy link
Contributor

This commit removes the 64MB size restriction on '/dev/shm'. (It also removes the same restriction on '/dev/', but that change is less important.)

Why are we doing this?

A customer of ours is attempting to use Postgres 15 in a bpm-created container, and running into frequent, show-stopping Postgres worker crashes when Postgres needs to use more than 64MB of POSIX shared memory. We asked the customer to resize '/dev/shm' to something much, much larger than 64MB and re-run their jobs. This resolved their problem, and they were able to continue on with their work.

We dug through the history of this configuration choice, and found no company-internal discussion on why this value was chosen.

We did discover that the runc v1 Container Specification document specifies that '/dev/shm' is 64MB in size (see:
https://github.com/opencontainers/runc/blob/eddf35e5462e2a9f24d8279874a84cfc8b8453c2/libcontainer/SPEC.md#filesystem). However, it offers no justification for this choice, and a search of the Runc 'dev' Google Groups mailing list didn't turn up any relevant conversation. So, the reasoning for this design decision remains unknown.

Because we don't know why this setting is the way it is, and because it's causing production problems for a customer of ours, we've decided to remove the /dev/shm size restriction and let the OS automatically size the device.

This commit removes the 64MB size restriction on '/dev/shm'. (It also
removes the same restriction on '/dev/', but that change is less
important.)

Why are we doing this?

A customer of ours is attempting to use Postgres 15 in a bpm-created
container, and running into frequent, show-stopping Postgres worker
crashes when Postgres needs to use more than 64MB of POSIX shared
memory. We asked the customer to resize '/dev/shm' to something much,
much larger than 64MB and re-run their jobs. This resolved their
problem, and they were able to continue on with their work.

We dug through the history of this configuration choice, and found no
company-internal discussion on why this value was chosen.

We did discover that the runc v1 Container Specification document
specifies that '/dev/shm' is 64MB in size (see:
<https://github.com/opencontainers/runc/blob/eddf35e5462e2a9f24d8279874a84cfc8b8453c2/libcontainer/SPEC.md#filesystem>).
However, it offers no justification for this choice, and a search of the
Runc 'dev' Google Groups mailing list didn't turn up any relevant
conversation. So, the reasoning for this design decision remains
unknown.

Because we don't know why this setting is the way it is, and because
it's causing production problems for a customer of ours, we've decided
to remove the /dev/shm size restriction and let the OS automatically
size the device.

Signed-off-by: Long Nguyen <nguyenlo@vmware.com>
@klakin-pivotal klakin-pivotal merged commit da3defb into master Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant