Questions tagged [cgroup]
cgroups (control groups) is a Linux kernel feature to limit, account and isolate resource usage (CPU, memory, disk I/O, etc.) of process groups.
46
questions with no upvoted or accepted answers
7
votes
0
answers
2k
views
Applying systemd control group resource limits automatically to specific user applications in a gnome-shell session
Having seen that GNOME now launches apps under systemd scopes I've been looking at a way to get systemd to apply some cgroup resource and memory limits to my browser.
I want to apply a MemoryMax and ...
6
votes
0
answers
2k
views
How to view cgroups resource control heritage between parents and childs process
Taking for example this hierarchy from systemd-cgls:
└─user.slice
├─user-1000.slice
│ ├─[email protected]
│ │ └─init.scope
│ │ ├─3262 /lib/systemd/systemd --user
│ │ └─3263 (sd-pam)
...
5
votes
0
answers
2k
views
Use of cores with `isolcpus` and `cpuset`
I have a Red Hat Enterprise Linux Server release 6.9 (Santiago) (I don't manage it). In the GRUB config file I have, let's say, isolcpus=2-32 (out of 36 cores). I also have a cgroup with cpuset=2-32 ...
4
votes
0
answers
812
views
`systemctl show` outputs incorrect MemoryCurrent value
on one box, systemctl show get an incorrect value for unit memory usage:
$ systemctl show crond | grep MemoryCurrent
MemoryCurrent=18446744073709551615
18446744073709551615 == UINT64_MAX, this must ...
4
votes
0
answers
706
views
cgexec not inheriting LD_LIBRARY_PATH
My /etc/cgconfig.conf file consists of
mount {
cpuset = /cgroup/cpuset;
cpu = /cgroup/cpu;
cpuacct = /cgroup/cpuacct;
memory = /cgroup/memory;
devices = /...
4
votes
1
answer
2k
views
Linux cgroups cpuset w/ subs causes cgconfig not to start
I am having a problem trying to separate 2 groups using cpuset subsystem. This works fine, however if i go to add a subgroup to that group (in this case -- user1), cgconfig will fail to start with "...
3
votes
0
answers
87
views
Limit resources of a group of users on Debian 10
I know how to set limits per user:
systemctl set-property user-1000.slice CPUQuota=5%
However, I don't know how to set the limit for a group of users. I want to limit the sum of the CPU usage of all ...
3
votes
0
answers
311
views
Enable cgroups on Beowulf compute nodes
We are running a Beowulf cluster using the Scyld distribution from Penguin Computing, and it looks like cgroups are configured on the head node, but not the compute nodes. I'm trying to configure ...
3
votes
0
answers
479
views
Can cgclassify be used with systemd based resource management?
So as of redhat/centos 7, system resource management got a big overhaul. Before redhat/centos 7, cgroups were run using libcgroup packages and daemons like cgred.
Before, if I wanted to move a ...
3
votes
0
answers
493
views
How to trigger initial login so user slice gets created
I may be taking the wrong approach here, but the new centos 7 implementation of cgroups lets you put limits on user's access to system resources by attaching said limits to their slices.
Ie.
...
2
votes
1
answer
3k
views
Limit php-fpm memory usage on a constrained server
I "move" this question from superuser as I think it's more appropiate here. I've actually found sort-of duplicate questions, but none has solved my problem.
General scope
I have a Nextcloud (...
2
votes
0
answers
2k
views
How can I control how systemd assigns a service to a slice?
I have been searching for a while for information about how services are assigned to slices - it seems to be a very elusive subject, or maybe I'm not asking the right questions. I've come across How ...
2
votes
0
answers
1k
views
ClamAV for the host running docker containers - inotify/fanotify limits
I'm implementing anti-virus solution for Linux with ClamAV daemon running in On-Access mode, watching the created/opened files for malicious content at the host system AND in docker containers, ...
2
votes
1
answer
176
views
cgrulesengd-like support for cgroup v2
I was wondering if there are any best practices for automatically assigning processes to certain v2 cgroups based on a rules file or something similar. Pretty much what cgrulesengd did for v1. I have ...
2
votes
0
answers
482
views
User Resource management: cgroups + systemd + ssh
I am trying to limit the memory of a single user that keeps crashing our OpenSuse Server.
What I have done is as desribed here, to modify the limit of the user's slice via
systemctl set-property ...
2
votes
1
answer
775
views
Cannot move all processes by a user into cgroup using cgred
I am on a CentOS 7.4 server, and trying to setup CGroups.
My cgconfig looks like this:
#
# Copyright IBM Corporation. 2007
#
# Authors: Balbir Singh <[email protected]>
# This ...
2
votes
0
answers
329
views
How do I audit cgroup changes
I have a container process that is mysteriously changing cgroups long after it has been started. How do I track down who/what is changing it? I tried watching my audit log when manually doing a ...
2
votes
1
answer
889
views
OpenNebula-managed libvirt not allowing access to /dev/kvm
I have a fresh Open Nebula 3.2.1 installation which I'm trying to get working and manage some freshly-installed debian squeeze kvm hosts.
My problem is that when Open Nebula deploys VMs the KVM ...
1
vote
0
answers
121
views
Empty Cgroup entries in Nginx service status output on an Ubuntu server
I am running multiple web application on a single server, using Nginx as the web server. After git pulling an update to one of the django based website, I restarted the Nginx server. To check if ...
1
vote
0
answers
453
views
cgroups v2: cgexec causes "cgroup change of group failed"
When I try to use cgexec, I get the error message "cgroup change of group failed".
This is how I'm setting up:
CGROUPS_DIR='/sys/fs/cgroup'
createdGroup_dir="$CGROUPS_DIR/createdGroup&...
1
vote
0
answers
2k
views
Obtain statistics of CPU and memory usage from one cgroup
Context
I have a system in which I have to check periodically usage:
relative (percents) for CPU
and absolute (GB) for memory.
How it's currently implemented
Language we're using is python.
system-...
1
vote
0
answers
170
views
Does freezing the cgroup wait for TCP send buffers to be flushed?
What guarantees are there for flushing the TCP send buffers, if any, when the freezer subsystem freezes a cgroup?
Consider the following scenario: Server A, which runs in a cgroup, sends data to ...
1
vote
2
answers
1k
views
cgroup rt support in Debian Buster (Kernel 4.19.0)
Is it possible to enable the cgroup rt support in Debian Buster (kernel 4.19.0) without recompiling the kernel? Perhaps with a grub configuration parameter? Thanks.
Background: Docker logs this ...
1
vote
1
answer
724
views
Centos7 cgroups, limit cpu shares for cronjobs
Is it possible to limit the cpu shares for processes started from cron? Background: We have shared hosting on Centos7 and customers can make cronjobs via directadmin controlpanel. Sometimes these ...
1
vote
0
answers
238
views
cgconfig daemon restart leaves threads in root cgroup
I'd like to ask if my explanation of the behavior I observe is correct.
The behavior: After restarting cgconfig daemon, the processes have correct core affinity (as verified by taskset) but the ...
1
vote
0
answers
133
views
cgroup throttle on child device does not work
We're running Docker containers with devicemapper on CentOS 7 (3.10.0-514.10.2.el7.x86_64).
For some containers we can easily throttle reads through blkio.throttle.read_bps_device by specifying the ...
1
vote
0
answers
274
views
Replacing net_cls with nftables
I am currently using the net_cls cgroup to classify packets from a process and then later mangle them with iptables. From the kernel and systemd guys it seems that net_cls is deprecated and other ...
1
vote
0
answers
55
views
Limiting Oracle instances resources with Cgroups?
Is it possible to limit the amount of resources (I/O, CPU and Memory) a Oracle instance can consume using only cgroups? (no containers or virtualization)
The reason I wanna do that is because I want ...
1
vote
0
answers
984
views
cgred / cgrulesengd - does not move new user pid to task file
cgrulesengd can't move pid to task file while running as deamon, if I restart cgrulesengd all pids are moved correctly to task file, but new pid's not.
So, if i log in as hello user, and then run ...
1
vote
0
answers
61
views
(Unexpected?) blkio controller behavior
I'm using docker 1.4.0 with lxc-1.0.6 and cgroup-lite-1.1.5 on Ubuntu 12.04. I have 3 hard disks (/dev/[sdb-sdd]) that I write to from 3 distinct containers. They have only one XFS partition, mounted ...
1
vote
0
answers
670
views
How to change docker lxc/cgroup configuration at runtime
I would like to change docker lxc/cgroup settings while a container is running. As an example, if I launch a container like this:
docker run --lxc-conf="lxc.cgroup.cpuset.cpus = 0" ...
How do I ...
1
vote
0
answers
244
views
How to test if packet has been tagged with classid
I'm trying to troubleshoot an issue I'm having related to IFB Mirroring which I'm attempting to deploy based on this question: Tc: ingress policing and ifb mirroring
My theory is that since the ...
0
votes
0
answers
33
views
How can I limit resources for non root users using CGroups V2 on Ubuntu 22.04?
Currently, I'm limiting the CPU and Memory for different non-root users in my software via Cgroups v1 in Ubuntu 20.04. I want to upgrade my software to Ubuntu 22.04. How can I safely move to that with ...
0
votes
1
answer
286
views
Systemd CGroups - where are logs for exceeding resource limits?
By default systemd assigns resource limits through CGroups like TaskMax, here's a example of this:
$ systemctl status sshd
● sshd.service - OpenSSH Daemon
Loaded: loaded (/usr/lib/systemd/system/...
0
votes
2
answers
362
views
Limit CPU Usage per PHP Pool
I'm running a typical LEMP stack where I have multiple PHP-FPM pools, one for each site that's on a Rocky Linux 8 VPS. Occasionally, some rogue process on one of the sites will cause a huge CPU spike ...
0
votes
0
answers
636
views
Adding process to cgroup returns error "write error: Invalid argument"
On Red Hat 8.7 on x86_64 I would like to restrict process to be allowed to use only 50% of CPU time.
I tried to limit a process with cgroups following Red Hat tutorial
Setting CPU limits to ...
0
votes
1
answer
738
views
Docker Compose + Ubuntu:22.04-Unable To Create cgroup...Read-only file system
I'm playing around with Docker Desktop(4.16.3) and Slurm. When I run slurmd, I get an error with the following complaint:
common_cgroup_instantiate: unable to create cgroup '/sys/fs/cgroup/freezer/...
0
votes
0
answers
27
views
Where can I find up-to-date documentation for the croupv1 memory resource controller?
Anyone know where can I find some up-to-date documentation for the cgroupv1 memory resource controller?
The docs.kernel.org page about the cgroupv1 memory resource controller contains the note at the ...
0
votes
0
answers
138
views
How to set up multiple apache + php-fpm + mariadb service groups on a single server with per-group resource limits?
We have a centos8 web server hosting hundreds of websites, using 3 services: apache, mariadb and php-fpm. Because apache and mariadb do not support per-account resource limitation, all websites have ...
0
votes
1
answer
629
views
How to constraint already running interactive processes with cgroup2
My home-server is running some aged hardware (Core i5-3450, software RAID1 on SATA disks) and often has problems when I run performance-intensive things like a compile-job besides "normal" ...
0
votes
1
answer
842
views
CGroup not mounted on Fedora 34
I have freshly provisioned Linode instance with Fedora 34. The only thing I have installed on it is libcgroup. cgconfig service is starting properly and there are no errors but the subsystem is not ...
0
votes
1
answer
2k
views
Why does my cgroup report memory usage even though there are no processes running from the cgroup?
When running systemd-cgtop, I get the following result (showing just the first few lines):
Control Group ...
0
votes
2
answers
2k
views
Kubernetes DaemonSet Pod exceeds memory limit but is not killed
We use kubernetes (specifically: openshift) to run our infrastructure in our team.
One of the daemonsets, fluentd, is currently causing a lot of trouble, frequently taking full nodes down with huge ...
0
votes
1
answer
2k
views
Is it possible to get the cgroup path for a Docker container managed by Kubernetes?
When we use kubectl describe pods <pod_name>, a great deal of information is output, including the node that the server is running on, and miscellaneous information about the pod, including the ...
0
votes
1
answer
517
views
Stack trace of mount command shows File not found error
When I run a program, I am getting a mount error:
[root@host ~]# ip vrf exec wan1 /usr/sbin/ssh [email protected]
Failed to mount cgroup2: No such file or directory
I know my kernel supports cgroup2:
[...
0
votes
0
answers
829
views
Trouble using net_cls control group in tandem with tc for packet filtering
I'm having some trouble limiting network bandwidth using the net_cls control group in conjunction with the linux traffic controller (tc). I think I might just be confused about how I'm writing the ...