-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Feature]: Set size limit for auto tmpfs mounts in systemd mode #17037
Comments
Easy enough to do, would just need to figure out good sizes for the extra mounts. |
is it possible to set it now? for now even if it is shared a guest can fill half of the host memory. |
No, but the changes in the code are very easy (just have to add a mount option to https://github.com/containers/podman/blob/main/libpod/container_internal_linux.go#L217 and the option mount structs in that function). Making it configurable would be a bit more complex as it'd need a containers.conf field, but also not particularly difficult. |
First, they are only able to access 1/2 of the available memory for all TMPFS. not half or system memory, when run with a Memory CGROUP. Each one does not get half. All tmpfs within the MEmory CGroup can not go over 50%. |
@rhatdan yes i know, but any container can fill that space which is not good. I created a 30gb file in one those directories in a container with 1gb memory and 1gb disk limit and half the memory of the system got filled. |
So you want --systemd-shm-size? Which would be applied to all tmpfs mounted via systemd flag ignored otherwize? |
Here is the read/write tmpfs available in --systemd=always mode. |
@rhatdan yes, that would be great. |
@rhatdan mind If I take a look at this? |
I love volunteers. |
Feature request description
When starting a container in systemd mode podman mounts tmpfs file systems on some directories like /run, /run/lock with half the host system memory.
is there any way to limit this size like /dev/shm
this actually makes --memory= and --storage-opt size= somehow meaningless because apps inside container can access more memory and disk space while it's running.
The text was updated successfully, but these errors were encountered: