I am going through https://gist.github.com/juanje/9861623. I am trying to limit my Chromes
memory usage on my Ubuntu 18.04. It appears my system don't have any of the mentioned commands/files here. What would be a proper way to configure cgroup
on my Ubuntu 18.04?
-
The following link proposes a solution for 16.04 : Loading cgroup config files– NPsoftDec 25, 2018 at 20:20
1 Answer
First, you should ensure that you have kernel 4.5 or higher. Actually, most things will work with 4.11 or higher. $ uname -a
This is because you most likely have cgroup v2 , not v1, which has different configuration. Most of the links for ubuntu 16.04 and others, refer to v1. Don't get confused.
If your run "mount -t cgroup" , you should see a list of cgroups, all under /sys/fs/cgroup .
Now, the configurations starts with : $ cp /usr/share/doc/cgroup-tools/examples/cgred.conf /etc/
Then, the rest are very similar to : Install cgconfig in Ubuntu 16.04
All info about the new case (18.04) be found in : https://www.paranoids.at/cgroup-ubuntu-18-04-howto/
The test in my case, showed my new /sys/fs/cgroup/memory/browsers/ and tasks.
Good luck.