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
memory.swap.max
I think in some old kernel with cgroupv2 enabled, memory.swap.max is not exist. For example:
Linux iZj6cdnzj9sp96xf38htrnZ 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux root@iZj6cdnzj9sp96xf38htrnZ:~# ls /sys/fs/cgroup/user.slice/user-0.slice/session-1.scope/ cgroup.controllers cgroup.stat cpuset.cpus cpu.uclamp.max io.stat memory.low pids.current cgroup.events cgroup.subtree_control cpuset.cpus.effective cpu.uclamp.min io.weight memory.max pids.events cgroup.freeze cgroup.threads cpuset.cpus.partition cpu.weight memory.current memory.min pids.max cgroup.max.depth cgroup.type cpuset.mems cpu.weight.nice memory.events memory.oom.group rdma.current cgroup.max.descendants cpu.max cpuset.mems.effective io.max memory.events.local memory.pressure rdma.max cgroup.procs cpu.pressure cpu.stat io.pressure memory.high memory.stat
Then we will get some errors when setting memory swap limit:
not ok 164 update cgroup v1/v2 common limits # (in test file tests/integration/update.bats, line 103) # `[ "$status" -eq 0 ]' failed # runc spec (status=0): # # runc run -d --console-socket /tmp/bats-run-YCqIW9/runc.6WEppA/tty/sock test_update (status=0): # # current 33554432 !? 33554432 # current 25165824 !? 25165824 # current 20 !? 20 # runc update test_update --cpuset-cpus 1 (status=0): # # current 1 !? 1 # runc update test_update --memory 67108864 (status=0): # # current 67108864 !? 67108864 # runc update test_update --memory 50M (status=0): # # current 52428800 !? 52428800 # runc update test_update --memory-reservation 33554432 (status=0): # # current 33554432 !? 33554432 # runc update test_update --memory-swap -1 (status=1): # time="2024-01-08T11:36:37+08:00" level=warning msg="Setting back cgroup configs failed due to error: open /sys/fs/cgroup/runc-cgroups-integration-test/test-cgroup-12193/memory.swap.max: no such file or directory, your state.json and actual configs might be inconsistent." # time="2024-01-08T11:36:37+08:00" level=error msg="open /sys/fs/cgroup/runc-cgroups-integration-test/test-cgroup-12193/memory.swap.max: no such file or directory"
The text was updated successfully, but these errors were encountered:
Should be fixed by #4188.
I think in some old kernel with cgroupv2 enabled, memory.swap.max is not exist.
I think this can just be that CONFIG_SWAP is not set in the kernel config (i.e. any kernel, not just some old one).
CONFIG_SWAP
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I think in some old kernel with cgroupv2 enabled,
memory.swap.max
is not exist. For example:Then we will get some errors when setting memory swap limit:
The text was updated successfully, but these errors were encountered: