mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Revert "increase memory.max in cgroups.bats"
This reverts commit65a1074c75. We needed [1] because when we removed the bindfd logic in [2] we had not yet moved the binary cloning logic to Go and thus it was necessary to increase the memory limit in CI because the clone was happening after joining the cgroup. However, [3] finally moved that code to Go and thus the cloning is now done outside of the container's cgroup and thus is no longer accounted as part of the container's memory usage at any point. Now we can properly support running a simple container with lower memory usage as we did before. [1]: commit65a1074c75("increase memory.max in cgroups.bats") [2]: commitb999376fb2("nsenter: cloned_binary: remove bindfd logic entirely") [3]: commit0e9a3358f8("nsexec: migrate memfd /proc/self/exe logic to Go code") Signed-off-by: lfbzhm <lifubang@acmcoder.com> [cyphar: fixed commit messages] Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
@@ -303,7 +303,7 @@ convert_hugetlb_size() {
|
||||
"memory.min": "131072",
|
||||
"memory.low": "524288",
|
||||
"memory.high": "5242880",
|
||||
"memory.max": "20484096",
|
||||
"memory.max": "10485760",
|
||||
"pids.max": "99",
|
||||
"cpu.max": "10000 100000",
|
||||
"cpu.weight": "42"
|
||||
@@ -319,14 +319,14 @@ convert_hugetlb_size() {
|
||||
echo "$output" | grep -q '^memory.min:131072$'
|
||||
echo "$output" | grep -q '^memory.low:524288$'
|
||||
echo "$output" | grep -q '^memory.high:5242880$'
|
||||
echo "$output" | grep -q '^memory.max:20484096$'
|
||||
echo "$output" | grep -q '^memory.max:10485760$'
|
||||
echo "$output" | grep -q '^pids.max:99$'
|
||||
echo "$output" | grep -q '^cpu.max:10000 100000$'
|
||||
|
||||
check_systemd_value "MemoryMin" 131072
|
||||
check_systemd_value "MemoryLow" 524288
|
||||
check_systemd_value "MemoryHigh" 5242880
|
||||
check_systemd_value "MemoryMax" 20484096
|
||||
check_systemd_value "MemoryMax" 10485760
|
||||
check_systemd_value "TasksMax" 99
|
||||
check_cpu_quota 10000 100000 "100ms"
|
||||
check_cpu_weight 42
|
||||
@@ -368,7 +368,7 @@ convert_hugetlb_size() {
|
||||
}
|
||||
| .linux.resources.unified |= {
|
||||
"memory.min": "131072",
|
||||
"memory.max": "40484864",
|
||||
"memory.max": "10485760",
|
||||
"pids.max": "42",
|
||||
"cpu.max": "5000 50000",
|
||||
"cpu.weight": "42"
|
||||
@@ -383,7 +383,7 @@ convert_hugetlb_size() {
|
||||
|
||||
runc exec test_cgroups_unified cat /sys/fs/cgroup/memory.max
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = '40484864' ]
|
||||
[ "$output" = '10485760' ]
|
||||
|
||||
runc exec test_cgroups_unified cat /sys/fs/cgroup/pids.max
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
Reference in New Issue
Block a user