Questions tagged [cgroup]

A cgroup associates a set of tasks with a set of parameters for one or more subsystems.

Control Groups provide a mechanism for aggregating/partitioning sets of tasks, and all their future children, into hierarchical groups with specialized behavior.

Source:Kernel.org

71 questions
11
votes
1 answer

Cgroups error: cgroup change of group failed

I'm trying to test cgroup and, after I set it, I stumbled upon that error. That's what I did: creation of the group grp creation of the user test within the grp group I ran the command: sudo cgcreate -t test:grp -a sleax -g memory,cpu:grp echo…
sl34x
  • 111
7
votes
1 answer

Looking for a consistent way to configure cgroups on Ubuntu 14.04 Desktop

I am looking for a consistent way to configure cgroups on a Ubuntu 14.04 Desktop system with limited resources. What I would like to do: create a few groups with limited memory and cpu assigned for specific tasks auto-enable these groups on reboot…
Sam Van den Eynde
  • 296
  • 1
  • 3
  • 13
6
votes
1 answer

is `cgroup-tools` using cgroup v1 or v2

I have ubuntu 21.10 installed. I confirmed that I am using cgroup v2 by running mount, which shows cgrup2 on /sys/fs/cgroup type cgroup2. When I want to use cgcreate from cgroup-tools to create a new group for cpu: sudo cgcreate -g cpu:newgroup #…
doraemon
  • 163
4
votes
0 answers

I always get an error when running cgconfigparser

Here's my /etc/cgconfig.conf: group VM { memory { memory.limit_in_bytes = "5G"; memory.soft_limit_in_bytes = "4G"; } } Here's my /etc/cgrules.conf #
R313 J283
  • 41
  • 1
2
votes
0 answers

how to set memory limit by percent in cgroups

In my Ubuntu 20.04.2 LTS I need to set memory usage limit to 50%, but inside /sys/fs/cgroup/memory I see only "*limit_in_bytes" files. Is it possible to limit memory usage by percent in cgroups?
Tookuk
  • 103
0
votes
0 answers

Trouble with cgconfig.conf and cgconfigparser

I get the following error message when I try to run cgconfigparser. :syntax error number 1 at Error: failed to parse file /etc/cgconfig.conf cgconfigparser; error loading /etc/cgconfig.conf: Have multiple paths for the same namespace This is my…
0
votes
0 answers

How to persistently change the owner of /sys/fs/cgroup/user.slice/user-1000.slice

On my Ubuntu 22.04 system, the cgroup /sys/fs/cgroup/user.slice/user-1000.slice is owned by root. How would I persistently change this so that this cgroup (and all its descendants) are instead owned by user 1000? By "persistently", I mean across…
mpb
  • 1,355
0
votes
1 answer

Cgroups Memory Limits - Script gets killed well before limit is reached

I am trying out a simple example to understand how to limit the memory consumption of processes. I have created a test memory group, set the limits for both memory.limit_in_bytes and memory.memsw.limit_in_bytes to 5 MB. I have a really simple…
-1
votes
1 answer

cgroups error 50016

creating a question from the forums so i can answer it here and leave for others as it took me ages to debug this one hi, i would like to test the following: the process bzip2 for user testuser goes into the group cpuhungry the group is only allowed…
balder
  • 101
  • 2