I am trying to set up resource limit delegation for a specific user myuser on Ubuntu 20.04.5. The point is that I need to be able to control resource limits when running my rootless Podman container.
However, despite the numerous online tutorials on cgroups, I am at a loss as to how I'm supposed to achieve this.
On the official Podman website, it says that I can verify whether resource limit delegation is enabled by running the following command:
cat "/sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers"
But the user.slice folder doesn't exist. Then it says that in any case I can enable resource limit delegation for all users by modifying the file:
/etc/systemd/system/user@.service.d/delegate.conf
But the user@.service.d folder doesn't exist. Then I'm being told that I maybe need to install the libcgroup package, but when I run
apt-get install libcgroup
I get
Unable to locate package libcgroup
So what am I supposed to do to enable cgroups on Ubuntu 20.04.5 and set up resource limit delegation for myuser?
Please help...