Stops limiting size of /dev/shm and /dev #159
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.