Skip to content

support cgroup-conf in compose yaml file#1382

Open
JimmyMa wants to merge 3 commits into
containers:mainfrom
JimmyMa:cgroup-conf
Open

support cgroup-conf in compose yaml file#1382
JimmyMa wants to merge 3 commits into
containers:mainfrom
JimmyMa:cgroup-conf

Conversation

@JimmyMa

@JimmyMa JimmyMa commented Jan 25, 2026

Copy link
Copy Markdown

Contributor Checklist:

Support extention x-podman.cgroup_conf in services, for configuring cgroup v2 parameters of container.

Currently the cgroup-conf can be configured on podman-compose command line, like podman-compose --podman-run-args="--cgroup-conf=memory.high=512M", but it's not declarative. One requirement to configure cgroup is the memory.high, the value of it is max by default, Linux PSI (Pressure Stall Information) needs it to work properly.

@JimmyMa JimmyMa force-pushed the cgroup-conf branch 2 times, most recently from 4bc4034 to e11145d Compare January 25, 2026 15:01
services:
cgroupconf:
image: nopush/podman-compose-test
command: ["dumb-init", "/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8000"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe read the current cgroup memory.high setting and then check that in the test?

On my machine I can do this via cat /sys/fs/cgroup/$(cat /proc/self/cgroup | sed 's/0:://g')/memory.max.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, I added the checks in the test.

@p12tic p12tic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking as "requested changes" for myself.

@JimmyMa

JimmyMa commented Jun 16, 2026

Copy link
Copy Markdown
Author

@p12tic could you help to review the change? I think I address your comment. Thank you!!!

Yun Feng Ma added 3 commits June 20, 2026 15:07
Signed-off-by: Yun Feng Ma <yma@ddn.com>
Signed-off-by: Yun Feng Ma <yma@ddn.com>
@p12tic

p12tic commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

@JimmyMa Could you squash your commits into one? The two subsequent commits currently just fix the first commit - no need to put mistakes into history.

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.

2 participants