Questions tagged [cgroup]
A *cgroup* associates a set of tasks with a set of parameters for one or more subsystems.
40
questions with no upvoted or accepted answers
5
votes
0
answers
656
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 ...
4
votes
0
answers
691
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>...
4
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, ...
4
votes
0
answers
1k
views
Where's cgconfig in Trusty?
I'm trying to create a cgroup where I can limit the resources used by Google Chrome after I hit a memory leak that froze my notebook.
I followed the instructions here, here and here, but I've found ...
3
votes
0
answers
5k
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
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 +...
3
votes
0
answers
158
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 ...
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
# ...
3
votes
0
answers
2k
views
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1" crashes plasma 5
Following the instructions found here I modified my /etc/default/grub with this line:
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
on a kubuntu 14.04 and a kubuntu 15.04 machines.
The ...
2
votes
0
answers
620
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,...
2
votes
0
answers
400
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 ...
2
votes
0
answers
561
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
0
answers
509
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
921
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 ...
2
votes
0
answers
606
views
Cgroups I/O read restriction
I am trying to restrict group to read operation to 100 per second.
Here is my cgroups configuration:
# Configuration file generated by cgsnapshot
mount {
blkio = /cgroup/blkio;
}
group ...
2
votes
0
answers
211
views
net_cls and ns subsystems not available in 12.04?
I'm playing around with cgroups and I noticed when I try to list all available subsystems that the network ones are not available ? Running the following command should list ALL available subsystems - ...
2
votes
1
answer
526
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
276
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 ...
1
vote
0
answers
351
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 ...
1
vote
0
answers
507
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.
...
1
vote
0
answers
361
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'...
1
vote
0
answers
392
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....
1
vote
0
answers
112
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 ...
1
vote
0
answers
187
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 ...
1
vote
0
answers
588
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. ...
1
vote
0
answers
97
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?
...
1
vote
0
answers
601
views
How i can activate cpu.cfs_quota_us in Cgroup?
How I can activate cpu.cfs_quota_us function in Cgroup on Debian Jessie (raspberry pi 4.1.13-v7+ kernel)? This file not exist in cpu controller after creating the group and I didn't find how I can ...
1
vote
0
answers
2k
views
dpkg: error processing cgroup-lite (--configure)
i upgrade ubuntu 12.04 server today and i found with this error:
# apt-get install -f
Reading package lists... Done
Building dependency tree.......
Reading state information... Done
The following ...
0
votes
0
answers
160
views
What in Kubuntu could be limiting available cpu cores? (only half are utilized in Plasma)
I am running Kubuntu 22.04.3 LTS on a 12-core/24-thread AMD Ryzen 5900X.
The problem I am having is that many tasks running in KDE/plasma appear to be limited by CPU affinity to only 12 of the 24 ...
0
votes
0
answers
154
views
"systemctl daemon-reload" after upgrade to Ubuntu 22.04 I cannot start chromium or firefox anymore
I upgraded Ubuntu from 20.04 to 22.04. (I use fluxbox as windowmanager)
I'm aware that firefox is now a snap (like chromium) but now I cannot start firefox nor chromium anymore.
In both cases I get /...
0
votes
0
answers
216
views
cpu cgroup controller parameters rt_runtime_us and rt_period_us does not exist in Ubuntu 22.04
We are migrating Ubuntu from 18.04 to 22.04 in our product, while this activity we are not able to load our cgconfig.conf file which was loading fine in 18.04.
# cgconfigparser -l /etc/cgconfig.conf
...
0
votes
0
answers
49
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
1
answer
3k
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?
0
votes
0
answers
656
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
139
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
...
0
votes
0
answers
402
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;
...
0
votes
0
answers
480
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 ...
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 ...
-1
votes
1
answer
245
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 ...