0
I have defined the memory limit parameter in self-created cgroup test-group
:
$ cat /sys/fs/cgroup/memory/test-group/memory.limit_in_bytes
15998976
After it, I'm executing the Python builtin HTTP server through the cgexec
:
cgexec -g cpu,memory:test-group python -m http.server 8000
If to view the RES
column (Resident size
) in htop
, there is such a dump:
PRI NI VIRT RES SHR
20 0 126M 18412 9848 S
18412Kb = 18.412Mb, but I've defined:
15998976 bytes in memory limit parameter, and it's about 15.998976 Mb
So... Why does htop show 18 Mb, if the limit is 16 Mb?
PS: if you ask me about swap, so there is a dump:
$ cat /sys/fs/cgroup/memory/test-group/memory.swappiness
0
$ free -g
total used free shared buff/cache available
Mem: 15 4 3 1 6 9
Swap: 0 0 0