Setting up cgroups with /etc/cgconfig.conf failed with Cgroup, requested group parameter does not exist
3
votes
1
answer
2380
views
I'm looking at getting
cgroups
working on my linux machine and well it's been a pain.
I feel like this should be a lot easier as resource management is pretty key to a healthy desktop environment which is why I'm trying to use it but I've just run into so many problems.
I have a /etc/cgconfig.conf
file that looks like this:
group "chromium_slack" {
perm {
admin {
uid = "nate";
gid = "nate";
}
task {
uid = "nate";
gid = "nate";
}
}
cpu {
shares="50";
}
memory {
swappiness="60";
limit_in_bytes="256000000";
}
}
And when I start the cgconfig
service with this:
sudo systemctl start cgconfig.service
I get a service status Cgroup, requested group parameter does not exist
that looks like this:
× cgconfig.service - Control Group configuration service
Loaded: loaded (/usr/lib/systemd/system/cgconfig.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Thu 2022-12-15 15:17:16 EST; 11min ago
Process: 9559 ExecStart=/usr/bin/cgconfigparser -l /etc/cgconfig.conf -s 1664 (code=exited, status=95)
Main PID: 9559 (code=exited, status=95)
CPU: 8ms
Dec 15 15:17:16 nx systemd: Starting Control Group configuration service...
Dec 15 15:17:16 nx cgconfigparser: /usr/bin/cgconfigparser; error loading /etc/cgconfig.conf: Cgroup, requested group parameter does not exist
Dec 15 15:17:16 nx systemd: cgconfig.service: Main process exited, code=exited, status=95/n/a
Dec 15 15:17:16 nx systemd: cgconfig.service: Failed with result 'exit-code'.
Dec 15 15:17:16 nx systemd: Failed to start Control Group configuration service.
But when I try to do this all manually with cgcreate
like so:
sudo cgcreate -a $USER -g memory,cpu:chromium_slack
sudo echo 256M > /sys/fs/cgroup/chromium_slack/memory.limit_in_bytes
I get a permission denied: /sys/fs/cgroup/chromium_slack/memory.limit_in_bytes
error.
So I guess my question is... How the heck do I get this working?
Asked by Nate-Wilkins
(133 rep)
Dec 20, 2022, 02:35 AM
Last activity: Jun 29, 2025, 10:00 PM
Last activity: Jun 29, 2025, 10:00 PM