Questions tagged [cgroup]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
52 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>...
user avatar
1 vote
1 answer
244 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-...
1 vote
0 answers
381 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, ...
user avatar
  • 193
0 votes
0 answers
55 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 ...
user avatar
0 votes
0 answers
177 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,...
user avatar
0 votes
0 answers
402 views

vServer Ubuntu: mkdir /sys/fs/cgroup/memory/ can not allocate memory: unknown

For about 1-1.5 years ago I installed docker on a (vServer) Ubuntu 18.04 server and since then running many docker containers without any problems. Yesterday I was applying a new update on one of my ...
user avatar
1 vote
0 answers
289 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 ...
user avatar
  • 11
0 votes
0 answers
77 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'...
user avatar
  • 1
3 votes
1 answer
893 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 ...
user avatar
  • 133
3 votes
0 answers
1k 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 ...
user avatar
3 votes
4 answers
3k 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
user avatar
  • 1,249
1 vote
0 answers
688 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 +...
user avatar
  • 111
0 votes
1 answer
68 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....
user avatar
1 vote
0 answers
144 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....
user avatar
0 votes
0 answers
119 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; ...
user avatar
  • 186
1 vote
1 answer
527 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/...
user avatar
2 votes
0 answers
174 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 ...
user avatar
  • 93
1 vote
0 answers
481 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 ...
user avatar
0 votes
1 answer
64 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 ...
user avatar
1 vote
1 answer
3k 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 ...
user avatar
2 votes
1 answer
508 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 ...
user avatar
4 votes
2 answers
17k 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 ...
user avatar
  • 89.6k
3 votes
0 answers
104 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 ...
user avatar
  • 261
1 vote
0 answers
103 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 ...
user avatar
  • 1,353
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 ...
user avatar
2 votes
1 answer
4k 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. ...
user avatar
1 vote
0 answers
135 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 ...
user avatar
  • 113
0 votes
0 answers
444 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 ...
user avatar
  • 147
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, ...
user avatar
-1 votes
1 answer
180 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 ...
user avatar
  • 101
1 vote
0 answers
484 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/...
user avatar
  • 1,013
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. ...
user avatar
  • 141
0 votes
0 answers
1k 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 ...
user avatar
15 votes
2 answers
28k 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 ...
user avatar
5 votes
0 answers
604 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 ...
user avatar
  • 191
2 votes
1 answer
490 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 ...
user avatar
  • 720
1 vote
0 answers
85 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? ...
user avatar
  • 220
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 # ...
user avatar
  • 215
3 votes
1 answer
1k 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?
user avatar
  • 131
1 vote
1 answer
640 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/...
user avatar
1 vote
0 answers
541 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 ...
user avatar
0 votes
1 answer
1k views

Couldn't find libcgroup.h in Ubuntu 14.04

libcgroup.h is generally located at /usr/include/libcgroup.h. After searching whole file-system ( find / -type f -name 'libcgroup.h' ), couldn't find it. From where can I get it?
user avatar
0 votes
1 answer
861 views

upstart conf file not being copied

Ubuntu 14.04 chroot apt-get install cgroup-lite invoke-rc.d: unknown initscript, /etc/init.d/cgroup-lite not found. If I download source files (tarball), decompress it, there is a cgroup-lite.upstart ...
user avatar
1 vote
1 answer
848 views

Prevent cgroup filesystem from getting mounted

On trusty, I installed cgroup-lite which mounts the virtual FS for cgroups subsystems in /sys/fs/cgroup/*. I've executed cgclear (from the cgroup-bin package) and uninstalled/purged cgroup-lite. When ...
user avatar
  • 293
9 votes
1 answer
7k views

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 ...
user avatar
  • 91
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 ...
user avatar
2 votes
0 answers
577 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 ...
user avatar
2 votes
1 answer
1k views

cgroups disk IO throttling with zfs

I'd like to use cgroups with my linux containers to throttle disk IO on them. Containers placed on ZFS volume /tank/lxc. I have three containers each in their own /tank/lxc/nodeXX directory. How can ...
user avatar
  • 1,977
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 ...
user avatar
  • 141
7 votes
1 answer
3k views

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 ...
user avatar