Questions tagged [cgroups]
Linux cgroups (control groups) allow limiting and accounting for resources on a system, including CPU, memory, and block I/O.
357 questions
5
votes
1
answer
400
views
What does it mean to "write" to a cgroup?
It is often repeated that Cgroups v2 demands that there be only a single "writer", i.e. that only one process "writes" to a group at any given time.
I find it non-obvious what it ...
3
votes
1
answer
183
views
Systemd delegation and a manually controlled cgroup subhierarchy
Cgroups (v2) mandate a single writer. If systemd is in place, it managed a system-wide tree of cgroups, and does not want other processes to "write" (in quotes, because I'm confused about ...
0
votes
1
answer
38
views
Running processes limit in cgroup containers
I was curious to ask if, as far as you aware, cgroups systemd-nspawn containers have
any particular limitations set on the amount of simultaneous processes they can run.
I'm asking because after 5-6 ...
3
votes
1
answer
101
views
Linux server hangs under heavy mem usage or file I/O despite CPU and memory cgroup limits. SSH becomes unresponsive. How to keep it responsive?
I have an Ubuntu 24.04 Linux instance with 4–5 users logged in via SSH. Recently we started encountering an issue where the system becomes extremely slow or effectively hangs.
SSH becomes very ...
1
vote
0
answers
52
views
Setting a burstable CPU limit with systemd
I can set a CPU limit for a service running under systemd like so:
[Service]
CPUQuota=25.00%
This will ensure the service will not use more than 25% of a single CPU. Unfortunately, I can see no way ...
1
vote
0
answers
44
views
Using Exclusive CPUSets does not work to remove cores from sibling cgroups
I have a CPU with two separate L3 cache components (The AMD 7900X3D in my case) and want to prevent processes other than the ones I choose from consuming any space in one particular cache.
As an ...
1
vote
1
answer
54
views
rsyslog holds on to dirty pages and does not flush pages to disk
We have kernel dirty bytes settings configured as below.
vm.dirty_background_bytes = 262144000
vm.dirty_background_ratio = 0
vm.dirty_bytes = 0
vm.dirty_expire_centisecs = 0
vm.dirty_ratio = 10
vm....
1
vote
0
answers
355
views
How does memory.max.swap work in linux's cgroup v2?
I can't figure out how swap limitation should work based on the documentation.
https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html
memory.swap.max
A read-write single value file which ...
14
votes
1
answer
1k
views
How does the Linux kernel decide whether to deny memory allocation or invoke the OOM killer when a cgroup exceeds its memory limit?
This question comes from my curiosity about how Kubernetes handles resource requests and limits, especially memory constraints defined for pods.
I understand that Kubernetes uses cgroups under the ...
2
votes
1
answer
418
views
Getting `cgroupfs-mount lacks a native systemd unit file, automatically generating a unit file for compatibility.`
I'm getting this error after a system upgrade to trixie.
SysV service '/etc/init.d/cgroupfs-mount' lacks a native systemd unit file, automatically generating a unit file for compatibility.
What is ...
2
votes
0
answers
131
views
cgroup / cpu scheduler tuning questions, cpu pressure & uclamp behavior
I've been working on this for a few days and I'm scratching my head. The kernel docs for cgroups, pressure stall information, and the scheduler have not helped me shed any light on this so far, so I ...
0
votes
0
answers
162
views
I'm trying to resolve "Failed to open cgroup2 by ID" from my socket statistics "ss"
I'm learning to investigate my socket statistics so I do..
sudo ss -tulerp
I get the following in the output..
Failed to open cgroup2 by ID
Failed to open cgroup2 by ID
Failed to open cgroup2 by ID
...
1
vote
0
answers
122
views
Too slow Tiered Memory Demotion and CPU Lock-up(maybe) with cgroup v2 memory.high
We are currently testing tiered memory demotion on a machine equipped with a CXL device.
To facilitate this, we created a specific script (https://github.com/hyun-sa/comem) and are using the memory....
2
votes
1
answer
295
views
How does a cgroup namespace work?
I’m trying to understand how cgroup namespaces work, but I’m stuck on something that doesn’t make sense to me.
My understanding is that a cgroup namespace should virtualize the cgroup hierarchy for a ...
0
votes
0
answers
78
views
cgoups: how safe is changing cpuset of a process?
I've recently started to observe unexpected output (and later stty -a outputs terminal settings different from new shell tab) from my shell scripts project. As of now, I'm very close to be sure the ...