Questions tagged [cgroup]
A *cgroup* associates a set of tasks with a set of parameters for one or more subsystems.
67
questions
0
votes
0
answers
62
views
nsdelegate mount option missing for cgroup2 fs on Ubuntu 22.04
On several of my systems with Ubuntu 22.04, /sys/fs/cgroup is mounted like this:
$ mount|grep cgroup
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
On other systems it looks ...
0
votes
0
answers
26
views
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 ...
0
votes
0
answers
206
views
Cgroup one of the needed subsystems is not mounted
I'm a web application developer. I am learning about container internals and Linux.
I was following the article Complete Intro to Containers. When I ran the command cgcreate -g cpu,memory,blkio,...
0
votes
1
answer
703
views
How can I turn on cgroup v2 CPU controller on modern Ubuntu?
On Ubuntu 22.04, I get:
# cat /sys/fs/cgroup/cgroup.controllers
cpuset memory hugetlb pids rdma misc
I really need cpu contoller. Could you, please, help on how to enable it?
1
vote
0
answers
132
views
How to move already running processes to different `cgroup` with systemd?
I'm using Ubuntu 20.04 LTS with MATE desktop which doesn't natively support launching desktop UI and window manager in a separate cgroup from the other applications.
Is it possible to run some systemd ...
2
votes
0
answers
119
views
How to configure cgroup resource limits for desktop applications using official systemd features?
I've previously used cgmanager to group processes in separate cgroups and adjust memory and CPU limits as needed for each group. However, modern systemd doesn't want that other processes mess with ...
1
vote
1
answer
412
views
Unit user-.slice failed to load properly: Invalid argument
I have been trying to set up resource controls on 22.04.1 login node so users can't degrade the system by running anything too intensive. I looked at using cgroups but apparently since it's a systemd ...
1
vote
0
answers
323
views
How can I enable resource limit delegation for my not-root user using cgroups?
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.
...
0
votes
0
answers
492
views
How to reboot host into cgroup1 mode?
On an ubuntu 22 Jammy host.
Created lxc containers for centos7 or centos8-Stream.
But they don't work.
Having asked on the LXC forum, I got an answer
Chances are your system is running in cgroup2 ...
0
votes
0
answers
96
views
Unable to tear down cgroup access when try to create a snapshot of a KVM virtual machine
I want to create a snapshot of a VM on KVM using command:
virsh snapshot-create-as --domain vms1 --name vms1.snapshot --diskspec sda,file=/data/snapshots/vms1_disk.0.snap.qcow2 --disk-only --atomic
...
3
votes
0
answers
4k
views
Setting up cgroups on Ubuntu Server 22.04
I'm trying to set memory usage limits per user (256MB RAM, 64MB swap) using cgroups. I've looked into a few other questions on the topic (1, 2, 3), but can't figure out how to use cgroups properly.
...
3
votes
0
answers
544
views
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
#<user:process>...
3
votes
3
answers
3k
views
How to run cgexec without sudo as current user on Ubuntu 22.04 with cgroups v2, failing with "cgroup change of group failed"?
I've tried the procedures from:
Cgroups error: cgroup change of group failed
How to use cgroup in ubuntu 13.04
https://unix.stackexchange.com/questions/197718/does-managing-cgroups-require-root-...
3
votes
0
answers
2k
views
Unable to run firefox for different user in Ubuntu 22.04: cgroup error
Just installed Ubuntu 22.04 here, and I get this error while trying to run a firefox instance for an user which is not the one who logged into X. Here's the full command trace to reproduce the error, ...
2
votes
0
answers
426
views
cpu.cpuacct not found in Ubuntu 20
I tried to run a process to monitor the usage of CPUs. The process returned the following error:
FileNotFoundError: [Errno 2] No such file or directory: '/sys/fs/cgroup/cpuacct/cpuacct.usage'
Then I ...
2
votes
1
answer
3k
views
How to set cgroup_memory=enable on Ubuntu 21.10
I have seen evidence to suggest that on Ubuntu 20.04 you add this line to /boot/firmware/cmdline.txt per Enabling memory cgroup in Ubuntu 20.04, however I have a /boot directory but not /boot/firmware,...
2
votes
1
answer
1k
views
Limit CPU and Memory using cgroup in Ubuntu 20.04 LTS server edition
I have 3 groups in Ubuntu 20.04 LTS server which is group1, group2, group3. I would like to limit CPU and memory for each groups.
Group1 only allowed to use 20% CPU and 10GB RAM
Group2 only allowed ...
1
vote
0
answers
251
views
How to config cgroup v2 to limit only the ram memory and let swap unlimited?
Because Ubuntu 21.10 ship with Cgroup V2 and my project seems to need memory limitations I decided to use it, but I have some problems.
I need a lot of RAM to test an idea, so because my processor can'...
6
votes
1
answer
6k
views
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 ...
5
votes
1
answer
5k
views
What is the purpose of cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 swapaccount=1
I am trying to setup a kubernetes cluster on a raspberry pi cluster using Ubuntu 20.04.3. In many online guides available, one of the steps is mentioned as follows:
Edit the /boot/firmware/cmdline.txt ...
8
votes
4
answers
7k
views
after Ubuntu 21.10 upgrade: "cannot attach cgroup program" operation not permitted
Right after upgrading a Ubuntu 21.04 to 21.10, I got this issue:
Chromium/Firefox won't start.
The error(seen in terminal) is:
$ firefox
cannot attach cgroup program: Operation not permitted
3
votes
0
answers
2k
views
systemd --user fails to start while complaining about permission in ubuntu server 20.04 inside openvz 7
Info about the system.
# systemctl --version
systemd 245 (245.4-4ubuntu3.13)
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +...
0
votes
1
answer
168
views
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....
1
vote
0
answers
350
views
Windows Subsystem Linux cgroup issues with slurmd
I am trying to add my computer running Ubuntu WSL to a slurm cluster I have, made up of old laptops. And when I run
sudo service slurmd start
it comes back as failed. I checked the /var/log/slurmd....
0
votes
0
answers
309
views
John the Ripper. How limit CPU with CGroup
I want limit CPU at John by CGroup.
I did.
cgrules.conf:
*:john cpu cpu_1
cgred.conf:
group cpu_1 {
perm {
task {
uid = root;
...
1
vote
1
answer
2k
views
Unable to run systemctl commands on the host from the container which was working till Ubuntu 16.04
When the host OS is Ubuntu 16.04 or RHEL 7.x, the following command is working, helping us to run systemctl commands on the host from within the docker container:
# nsenter --mount=/hostroot/proc/1/ns/...
2
votes
0
answers
441
views
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 ...
2
votes
0
answers
812
views
How To Limit User RAM and CPU
So this is my first time posting on Ubuntu forums, so please excuse me if this question is repetitive, or just plain stupid.
A bit of background: I am a 14yr old developer, who has an ubuntu 20.04 ...
0
votes
1
answer
71
views
rootstrap: command not found
I'm trying create a system-root to do some tests using jail and I'm trying install rootstrap whitout success.
$ rootstrap
rootstrap: command not found
When try install:
$ sudo apt-get install -y ...
1
vote
1
answer
5k
views
Error messages during boot
I recently applied some software updates to my 18.04 LTS install, and I now see the following during restart:
$ cat /var/log/boot.log Scanning for Btrfs filesystems UBUNTU: clean, 700970/30883840 ...
2
votes
1
answer
994
views
Limiting Memory of Snap Packages
Some snaps (cough Slack) will given the opportunity eat up an almost unlimited amount of memory. In the pre-slack post systemd world I could create a namespace, limit it's memory/cpu etc... and force ...
6
votes
2
answers
29k
views
How to fix "docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown." on `docker run`?
I have Ubuntu 16.04.6 LTS installed.
Previously I have installed Docker from its repository as docker.io package.
Yesterday I have installed LXC with LXD and I suppose that they have some problem ...
3
votes
0
answers
146
views
Cgroup - CPU share doesn't go down
I tried to run a process dd if=/dev/zero of=/dev/null bs=20M
Then I got the PID using top. Afterwards, I created a foo directory under /sys/fs/cgroup/cpu/ and edited the following
1) Added 128 to ...
1
vote
0
answers
107
views
Limiting Handbrake Using a Cgroup?
I'm following a tutorial for cgroups, but they don't seem to be effective in limiting handbrake (A video conversion tool)'s performance.
I can't really multi task while it is running.
I've installed ...
2
votes
1
answer
1k
views
What is the best cgmanager alternative for Ubuntu 18.04 LTS?
I was using package cgmanager to automatically manage processes into memory cgroups in Ubuntu 16.04 LTS environment.
However, I did a fresh install of Ubuntu 18.04 and package cgmanager is no longer ...
2
votes
1
answer
5k
views
How can I configure CGroups and limit Chrome memory usage on Ubuntu 18.04
I am going through https://gist.github.com/juanje/9861623. I am trying to limit my Chromes memory usage on my Ubuntu 18.04. It appears my system don't have any of the mentioned commands/files here. ...
1
vote
0
answers
180
views
Why systemd wont support IOWriteIOPSMax?
I just installed Ubuntu 16.04.5 LTS and upgraded the kernel to 4.15.0-38-generic using the package linux-image-generic-hwe-16.04. The problem is that when I try to start a service unit that uses the ...
0
votes
0
answers
469
views
cgroup manager daemon
Ubuntu 18.04.1.
Cgroups is not installed.
System jobs admin shows checked:
Cgroup manager daemon (cgmanager)
Cgroup manager daemon (cgproxy)
I can not uncheck these items.
How can I remove them?
to ...
3
votes
2
answers
3k
views
cgmanager fails on ubuntu 18 update
I've just updated my Ubuntu 16 to 18.04.1 LTS, upon restart it fails to boot (completely unresponsive). I've tried booting in safe mode and works but I see there is an error on the cgmanager, ...
-1
votes
1
answer
227
views
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 ...
1
vote
0
answers
555
views
systemd vs cgroups for resource isolation by user program?
Environment: kubuntu desktop 17.10.1
Immediate goal: run chrome in such a way as to limit its maximum memory consumption.
Current workaround: I put the following in /usr/local/bin/cchrome:
#!/bin/...
1
vote
1
answer
1k
views
Docker child processes do not inherit niceness of daemon
I often run a lot of docker containers, which sometimes cause my system to freeze momentarily. To prevent this, I made a service that automatically sets the niceness of docker-containerd a bit higher. ...
0
votes
0
answers
2k
views
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 ...
15
votes
2
answers
30k
views
Install cgconfig in Ubuntu 16.04
I want to create some control groups using cgroup.
So far I have done the following:
I installed some packages:
sudo apt-get install cgroup-bin cgroup-lite cgroup-tools cgroupfs-mount libcgroup1
...
5
votes
0
answers
642
views
Nested unprivilaged lxc containers from upstart that its owner can stop
In a host running Ubuntu 14.04.5 LTS I have an user named ci that can create an start unprivilaged lxc containers also running Ubuntu 14.04.5 LTS. The user has the subid range 200000-231071. The ...
2
votes
1
answer
515
views
Upgrade to 16.10: PAM-CGFS errors
Since upgrading my Ubuntu host server installation from 15.10 to 16.04.1 yesterday these errors fill my log:
PAM-CGFS[28483]: Failed to create a cgroup for user root
Googling this turns up nothing ...
1
vote
0
answers
96
views
Is there a good way to ensure that I can still log into a machine even under heavy load?
I am considering increasing the priority of sshd by setting minimum niceness -20 via a nice stanza in the upstart script.
Has anyone done this? Does it work? Has anyone done this and had problems?
...
3
votes
1
answer
2k
views
how to limit apache memory via cgroups
I'd like to limit the total memory used by user www-data in Ubuntu Server 14.04 LTS. I've read that I can do this via cgroups.
This is what I've done so far:
# install
apt-get install cgroup-bin
# ...
4
votes
1
answer
2k
views
cgconfig.conf file is missing
I installed cgroup on my ubuntu (13.9.0) using this command:
apt-get install cgroup-bin
However, cgconfig.conf file has not been created in /etc and not anywhere else. Did I miss anything?
1
vote
1
answer
691
views
Removing Prior Crontabs
I think I have competing cronjobs. When I run "sudo service cron status" I get the following output:
Main PID: 31130 (cron)
CGroup: /system.slice/cron.service
|-11690 /usr/...