-
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
add "podman container update" command to update the cgroup configuration of running containers #15067
Comments
Using the OCI runtime's This is the use-case that |
Should |
but it would still bring down the process running in the container. I think we could have a |
I would not be opposed to that. |
that would simply be a wrapper around In the meanwhile,as @vrothberg suggested, you can try to use directly the
From another terminal:
and back to the running container:
|
@rhatdan I think one of the stretch goals for |
Hi sir |
it can be used only for running or paused containers |
So Podman update would only support cgroups configuration flags on a running container. And would only last for the length of time the container is running. I think that makes some sense. |
I'd go with the |
I agree. this would at least allow users to setup scripts to modify the containers on each start. |
podman update allows users to change the cgroup configuration of an existing container using the already defined resource limits flags from podman create/run. The supported flags in crun are: this command is also now supported in the libpod api via the /libpod/containers/<CID>/update endpoint where the resource limits are passed inthe request body and follow the OCI resource spec format –memory –cpus –cpuset-cpus –cpuset-mems –memory-swap –memory-reservation –cpu-shares –cpu-quota –cpu-period –blkio-weight –cpu-rt-period –cpu-rt-runtime -device-read-bps -device-write-bps -device-read-iops -device-write-iops -memory-swappiness -blkio-weight-device resolves containers#15067 Signed-off-by: Charlie Doern <[email protected]>
I found that the memory limit of the container does not take effect in my Ceph cluster environment.
[root@zl-k8s-ceph72 zzcloud]# podman version
Client: Podman Engine
Version: 4.0.2
API Version: 4.0.2
Go Version: go1.17.7
Built: Wed Mar 16 03:15:06 2022
OS/Arch: linux/amd64
Memory usage shown by podman stats
memory limit displayed by ceph orch ps
What parameters should I use, or modify those config files to adjust the memory limit of containers in podman?
Looking forward to your reply, thanks
The text was updated successfully, but these errors were encountered: