We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When CPU quota is updated with fractions, cpu.max is updated as specified:
cpu.max
$ runc update container1 --cpu-quota=123456 $ cat /sys/fs/cgroup/system.slice/runc-container1.scope/cpu.max 123456 100000
However, after another parameter is updated, cpu.max is rounded up:
$ runc update container1 --memory 100000000 $ cat /sys/fs/cgroup/system.slice/runc-container1.scope/cpu.max 124000 100000
It looks the rounded value is passed to systemd:
runc/libcontainer/cgroups/systemd/common.go
Lines 303 to 310 in 74b35d8
runc/libcontainer/cgroups/systemd/v2.go
Line 492 in 74b35d8
$ runc --systemd-cgroup run container1
$ runc update container1 --cpu-quota=123456
$ cat /sys/fs/cgroup/system.slice/runc-container1.scope/cpu.max 123456 100000
$ runc update container1 --memory 100000000
$ cat /sys/fs/cgroup/system.slice/runc-container1.scope/cpu.max 124000 100000
We can see how the file is updated in the steps with tail -f:
tail -f
$ tail -f /sys/fs/cgroup/system.slice/runc-container1.scope/cpu.max max 100000 tail: /sys/fs/cgroup/system.slice/runc-container1.scope/cpu.max: file truncated max 100000 tail: /sys/fs/cgroup/system.slice/runc-container1.scope/cpu.max: file truncated 124000 100000 tail: /sys/fs/cgroup/system.slice/runc-container1.scope/cpu.max: file truncated 123456 100000 tail: /sys/fs/cgroup/system.slice/runc-container1.scope/cpu.max: file truncated 124000 100000
The CPU quota should be configured consistently whether it is rounded up or not.
$ runc -v runc version 1.2.4 commit: v1.2.4-0-g6c52b3f spec: 1.2.0 go: go1.22.10 libseccomp: 2.5.5
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
When CPU quota is updated with fractions,
cpu.max
is updated as specified:However, after another parameter is updated,
cpu.max
is rounded up:It looks the rounded value is passed to systemd:
runc/libcontainer/cgroups/systemd/common.go
Lines 303 to 310 in 74b35d8
However, the original value seems to be written to the file:
runc/libcontainer/cgroups/systemd/v2.go
Line 492 in 74b35d8
Steps to reproduce the issue
cpu.max
:cpu.max
again:We can see how the file is updated in the steps with
tail -f
:Describe the results you received and expected
The CPU quota should be configured consistently whether it is rounded up or not.
What version of runc are you using?
$ runc -v
runc version 1.2.4
commit: v1.2.4-0-g6c52b3f
spec: 1.2.0
go: go1.22.10
libseccomp: 2.5.5
Host OS information
No response
Host kernel information
No response
The text was updated successfully, but these errors were encountered: