Skip to content

Commit 3f73bb0

Browse files
committed
we need (opencontainers#4020) because of (opencontainers#3931), at that time, we removed the bindfd logic, and the memfd logic will use more memory than before, but we have not yet moved binary clone from runc init to runc parent process, so we need to increase memory limit in CI. As we have moved the runc binary clone logic from runc init to runc parent process in (opencontainers#3987), so the memory usage of binary clone will not be included in container's memory cgroup accounting. Now we can support run a simple container with lower memory usage the same as before. Signed-off-by: lifubang <[email protected]>
1 parent d82235c commit 3f73bb0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/integration/cgroups.bats

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ convert_hugetlb_size() {
303303
"memory.min": "131072",
304304
"memory.low": "524288",
305305
"memory.high": "5242880",
306-
"memory.max": "20484096",
306+
"memory.max": "10485760",
307+
"memory.swap.max": "20971520",
307308
"pids.max": "99",
308309
"cpu.max": "10000 100000",
309310
"cpu.weight": "42"
@@ -319,14 +320,16 @@ convert_hugetlb_size() {
319320
echo "$output" | grep -q '^memory.min:131072$'
320321
echo "$output" | grep -q '^memory.low:524288$'
321322
echo "$output" | grep -q '^memory.high:5242880$'
322-
echo "$output" | grep -q '^memory.max:20484096$'
323+
echo "$output" | grep -q '^memory.max:10485760$'
324+
echo "$output" | grep -q '^memory.swap.max:20971520$'
323325
echo "$output" | grep -q '^pids.max:99$'
324326
echo "$output" | grep -q '^cpu.max:10000 100000$'
325327

326328
check_systemd_value "MemoryMin" 131072
327329
check_systemd_value "MemoryLow" 524288
328330
check_systemd_value "MemoryHigh" 5242880
329-
check_systemd_value "MemoryMax" 20484096
331+
check_systemd_value "MemoryMax" 10485760
332+
check_systemd_value "MemorySwapMax" 20971520
330333
check_systemd_value "TasksMax" 99
331334
check_cpu_quota 10000 100000 "100ms"
332335
check_cpu_weight 42
@@ -368,7 +371,7 @@ convert_hugetlb_size() {
368371
}
369372
| .linux.resources.unified |= {
370373
"memory.min": "131072",
371-
"memory.max": "40484864",
374+
"memory.max": "10485760",
372375
"pids.max": "42",
373376
"cpu.max": "5000 50000",
374377
"cpu.weight": "42"
@@ -383,7 +386,7 @@ convert_hugetlb_size() {
383386

384387
runc exec test_cgroups_unified cat /sys/fs/cgroup/memory.max
385388
[ "$status" -eq 0 ]
386-
[ "$output" = '40484864' ]
389+
[ "$output" = '10485760' ]
387390

388391
runc exec test_cgroups_unified cat /sys/fs/cgroup/pids.max
389392
[ "$status" -eq 0 ]

0 commit comments

Comments
 (0)