I am trying to setup a kubernetes cluster on a raspberry pi cluster using Ubuntu 20.04.3. In many online guides available, one of the steps is mentioned as follows:
Edit the /boot/firmware/cmdline.txt and add cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 swapaccount=1 at the end.
The above step is mentioned without any explanation. So, to check my current configuration (without applying the above boot config) I run /proc/cgroups which gives me the following output:
#subsys_name hierarchy num_cgroups enabled
cpuset 8 1 1
cpu 4 43 1
cpuacct 4 43 1
blkio 7 43 1
memory 0 51 0
devices 10 43 1
freezer 3 2 1
net_cls 2 1 1
perf_event 5 1 1
net_prio 2 1 1
pids 6 48 1
rdma 9 1 1
Since swap needs to be disabled, I have checked it is already disabled. As such I have the following questions:
- I believe in the output that
cpusetis enabled since it has the value of 1 for the enabled column. Am I correct? If so, is explicitly settingcgroup_enable=cpusetnecessary? - Since the value under enabled is 0 for
memoryI believe it is not enabled. Am I correct? If so, what doescgroup_enable=memoryandcgroup_memory=1do? Why do I have to set both of them? - What is the purpose of setting
swapaccount=1? Does it make sense to set it if swap is disabled anyway?
cgroups is a new topic to me and as such I would like to know better what each of the commands do instead of blindly copying them.
EDIT: I went through the kernel source code and noticed that nothing called cgroup_memory exists. Yes a function exists by that name but it binds to a command cgroup.memory. So, are all the online blogs talking about cgroup_memory just copied a typo as is?