node v24.18.0, host RAM 58987 MiB --- no cgroup limit (plain shell): totalmem MiB = 58987 heap_size_limit MiB = 4288 --- MemoryMax=512M: memory.max=536870912 totalmem MiB = 58987 heap_size_limit MiB = 259 --- MemoryMax=1G: memory.max=1073741824 totalmem MiB = 58987 heap_size_limit MiB = 560 --- MemoryMax=2G: memory.max=2147483648 totalmem MiB = 58987 heap_size_limit MiB = 1120 --- MemoryMax=3G: memory.max=3221225472 totalmem MiB = 58987 heap_size_limit MiB = 1728 --- MemoryMax=3800M: memory.max=3984588800 totalmem MiB = 58987 heap_size_limit MiB = 2092 --- MemoryMax=4G: memory.max=4294967296 totalmem MiB = 58987 heap_size_limit MiB = 2240 --- MemoryMax=5017M: memory.max=5260705792 totalmem MiB = 58987 heap_size_limit MiB = 2240 --- MemoryMax=8G: memory.max=8589934592 totalmem MiB = 58987 heap_size_limit MiB = 2240 --- MemoryMax=16G: memory.max=17179869184 totalmem MiB = 58987 heap_size_limit MiB = 4288 --- MemoryMax=32G: memory.max=34359738368 totalmem MiB = 58987 heap_size_limit MiB = 4288 --- MemoryHigh=3G only (no MemoryMax), like the reporter's MemoryHigh: memory.max=max memory.high=3221225472 totalmem MiB = 58987 heap_size_limit MiB = 1728 --- reporter's exact unit properties MemoryHigh=3G MemoryMax=3800M: memory.max=3984588800 memory.high=3221225472 totalmem MiB = 58987 heap_size_limit MiB = 1728 --- MemoryMax on the PARENT cgroup only (child cgroup nested inside a limited scope): does node see it? /usr/bin/bash: -c: line 1: syntax error near unexpected token `(' /usr/bin/bash: -c: line 1: `me=/sys/fs/cgroup$(cut -d: -f3 /proc/self/cgroup); mkdir -p $me/child 2>/dev/null && echo $ > $me/child/cgroup.procs 2>/dev/null; echo " own cgroup memory.max=$(cat /sys/fs/cgroup$(cut -d: -f3 /proc/self/cgroup)/memory.max) parent memory.max=$(cat $me/memory.max)"; node -e const v8=require("v8");const os=require("os");console.log(" totalmem MiB =",Math.round(os.totalmem()/1048576),"heap_size_limit MiB =",Math.round(v8.getHeapStatistics().heap_size_limit/1048576))'