Unfortunately, I got the message "lxc-cgroup: missing cgroup subsystem", that I've firstly intended as "I couldn't mount this cgroup at this session"
Briefly, asking about memory cgroup to LXC, everything was ok
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lurch:~# lxc-checkconfig | |
--- Control groups --- | |
Cgroup: enabled | |
Cgroup clone_children flag: enabled | |
Cgroup device: enabled | |
Cgroup sched: enabled | |
Cgroup cpu account: enabled | |
Cgroup memory controller: enabled | |
Cgroup cpuset: enabled | |
... |
while asking to linux not
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lurch:~# cat /proc/cgroups | |
#subsys_name hierarchy num_cgroups enabled | |
cpuset 1 9 1 | |
cpuacct 1 9 1 | |
memory 0 9 0 |
Another confusing point to me, was the check of the dmesg output, that showed memory cgroup between the others
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lurch:~# dmesg | grep cgroup | |
... | |
[ 0.008000] Initializing cgroup subsys cpuacct | |
[ 0.008000] Initializing cgroup subsys memory | |
[ 0.008000] Initializing cgroup subsys devices | |
[ 0.008000] Initializing cgroup subsys freezer | |
[ 0.008000] Initializing cgroup subsys net_cls | |
[ 0.008000] Initializing cgroup subsys blkio | |
[ 0.008000] Initializing cgroup subsys perf_event |
So, after a little of googling, I have understood like, the memory cgroup is just not enabled on Debian by default. That because having the cgroup.memory enabled, costs around 15Mb of ram, that is obviously a waste if you don't use that cgroup
In order to have the availability of said cgroup, you need to instruct the Grub by /etc/default/grub with the boot parameter cgroup_enable=memory
The amount of memory reserved to the cgroup nos is printed out during the boot time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GRUB_DEFAULT=0 | |
GRUB_TIMEOUT=5 | |
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` | |
GRUB_CMDLINE_LINUX_DEFAULT="quiet cgroup_enable=memory" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lurch:~# dmesg | grep cgroup | |
[ 0.000000] Initializing cgroup subsys cpuset | |
[ 0.000000] Initializing cgroup subsys cpu | |
... | |
[ 0.000000] allocated 16777216 bytes of page_cgroup | |
[ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lurch:~# lxc-cgroup -n container memory.limit_in_bytes "1G" | |
lurch:~# |
cgroup memory controller didn't worked for me even after enabling "cgroup_enable=memory" in grub. Finally reason was, Intel-VT support was enabled with memory protection on. Disabling memory protection helped resolve the issue for me. And the weird thing is, this issue was only with cgroup memory controller and rest of the controllers were working fine.
RispondiEliminaHope this info will help someone who visits this website.
Many thanks for your reply!
RispondiElimina