Questions tagged [cgroups]

Linux cgroups (control groups) allow limiting and accounting for resources on a system, including CPU, memory, and block I/O.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

what is the best way to remove unused cgroups?

I have a master process that creates so many child processes on demand and jail each of them with a cgroup (say cpu cgroup). What is the best way to remove the unused cgroup hirearchy. Currently i am ...
0
votes
0answers
14 views

Handling USER_HZ and the output from cpuacct.usage

I am writing a program that is supposed help run foreign code "safely". I also want to get the memory utilization and CPU compute time for the foreign code so I thought I would use cgroups. ...
0
votes
0answers
16 views

Two interfaces, mark packets to balance connections based on process groups, packets not forwarded

I hope that someone can help me since I spent almost entire evening trying to deal with packet marking and routing. I have two interfaces: eno2 and wlo1. I want eno2 to be the default interface and ...
1
vote
1answer
16 views

Using cgroups and nice with respect to the same process - does the order matter? What is the correct syntax?

I created a CGROUP on my desktop called background. The purpose of this group is to run all my sysadmin scripts within its CPU limit of 10%. The group is created on every reboot with the following ...
0
votes
0answers
24 views

Can't change cgroup settings, receive an error “no such file or directory”

Trying to work with Cgroups v2 on Debian Linux 9 Stretch. # uname -r 4.9.0-7-amd64 # uname -a Linux mycomp 4.9.0-7-amd64 #1 SMP Debian 4.9.110-1 (2018-07-05) x86_64 GNU/Linux As described in Linux ...
0
votes
1answer
13 views

How to install cgroup man pages on Fedora?

I want to install cgroup man pages on Fedora, but I can't find any package that contains it.
0
votes
0answers
17 views

Syntax for using systemd-run to limit CPU and memory usage of multiple processes?

I would like to use Linux control groups (cgroups) to limit CPU and RAM usage of multiple processes. If the processes are Process 1 and Process 2 with child process Process 2 Sub, would this be the ...
0
votes
1answer
53 views

cgroups: how to detach a process from cgroup

I have created a cgroup mygroup in my system and running a process under it cgexec -g memory,cpu:groupname/mygroup someprocess Now after some time when i feel there is no need to worry about the cpu ...
0
votes
1answer
28 views

Can you create your own top-level cgroup?

The docs seem to suggest this should work # mkdir /sys/fs/cgroup/mytest # mount -t cgroup mytest /sys/fs/cgroup/mytest mount: /sys/fs/cgroup/mytest: mytest already mounted or mount point busy. What ...
1
vote
1answer
21 views

Sharing a Partition Between Windows and Linux Throws Permission Errors

I created a new partition in Windows 10 formatted as Fat32, so that I could work with files located in one place despite being logged into my MX Linux installation or Windows 10. While logged into ...
1
vote
0answers
20 views

Why does “some” line have higher delay that “full” one due to memory pressure?

I have the following stats: cat /sys/fs/cgroup/user.slice/memory.pressure some avg10=0.00 avg60=0.00 avg300=0.00 total=1954777 full avg10=0.00 avg60=0.00 avg300=0.00 total=1626895 The documentation ...
3
votes
0answers
31 views

systemd .slice unit to limit a service to a specific interface/network classifier

Running on CentOS 7 [systemd ~243 & cgroup v1], I would like to limit a service to one specific network interface. The target machine has multiple physical network interfaces. The service is ...
0
votes
0answers
11 views

How can multiple cgroup namespaces be merged?

I stumbled upon an interesting cgroup setup and I want to understand how it works. It appeared like two separate Docker containers' cgroups were "merged" into a third cgroup which was a ...
1
vote
0answers
20 views

How to set Lower Limit for Throttling mechanism in blkio-controller?

Prior to Linux Kernel v 4.12, Block Throttling mechanism included throttling the Read/Write speed at a LIMIT_HIGH value. This value could be set by /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device /...
1
vote
1answer
69 views

Systemd resource limits not working as expected

I'm running Ubuntu 20.04 with systemd 245. I'm testing out systemd's resource control features; particularly the memory usage controls. The relevant section of my unit file looks like this: [Unit] ...
0
votes
1answer
68 views

Debian Buster: cgmanager fails, but why?

System is Debian Buster - I am trying to get cgroups to work, following what documentation I have been able to find online (mainly Redhat's Guide), but I have a problem: # systemctl status cgmanager ● ...
0
votes
0answers
14 views

Use cgroups in any network namespace

Basically, I have this exact question but it's been more than one year and it has not been answered. So in case anyone that didn't see the original and can/wants to answer it. Like I said, I have the ...
2
votes
0answers
40 views

Cgroup rules engine (cgrulesengd) misses child processes

I'm on Ubuntu 16.04 and 14.04 machines and am trying to keep users from using Nvidia GPUs in ssh sessions with cgroup rules engine. My current /etc/cgconfig.conf looks like: group nogpu { devices { ...
0
votes
0answers
11 views

cgroup not working properly after restarting the service

We are trying to limit the memory and cpu usage of users in our emr cluster by implementing cgroup. We created a new subgroup users_cg under cgroup and set the proper memory and cpu limits. However, ...
0
votes
1answer
39 views

Using cgconfig for thread and process sharing (cpu limit)

I have set the following limits for a user in the cgconfig rules # cat /etc/cgconfig.conf group group_mahmood { cpu { cpu.shares = 300; } memory { memory.limit_in_bytes = 1073741824; }...
0
votes
0answers
18 views

Assign process to systemd scope by name

Is it possible to move processes - however started - to a given systemd.scope(5) in order to control their resources, by matching on their name? For example, I would like to limit Firefox's memory ...
0
votes
1answer
34 views

Systemd resource management via CGroup

I want to know how can I limit ( or eliminate any limitation for ) the resource consumption (i.e CPU and memory usage ) of systemd slices via CGroup ? There's a command named systemd-cgtop which ...
1
vote
1answer
83 views

Run Systemd Service as Another User with Logind Session

Question How do I run an arbitrary service as an arbitrary user at boot with a logind session (specifically including all of the goodies under /run/user/uid) created for this user and without having ...
2
votes
1answer
97 views

How to limit CPU usage with systemd-run

I have a buggy program which uses 100% CPU even when it's idle. Since fixing it isn't practical at the moment, I'd like to just limit it to be able to use no more than 10% CPU. However no matter ...
0
votes
0answers
25 views

CPUAccouting/MemoryAccount/Accouting in general under user systemd service/cgroup not showing

I'm trying to get memory/CPU printed on a systemd service. I used to get it from when the service ran as root, but now its running as user, so I'm having a hard time getting it working. here is my ...
1
vote
0answers
72 views

Very high “hidden” memory usage inside a LXC container

We have a Proxmox VE (kernel 5.3) cluster running some IT services using LXC, one of which is used as a gateway for the whole intranet. It's set up with a Debian image and does forwarding & NAT ...
0
votes
0answers
82 views

Limiting cgroup memory - device busy

$ echo '+memory' >>cgroup.subtree_control echo: write error: device or resource busy That's the same error described in this answer from trying to set a memory limit that's less than the amount ...
1
vote
1answer
146 views

memory.memsw.limit_in_bytes: Invalid argument

I have a Debian 10 server and I am trying to limit the memory + swap of a user using cgroups2. Using memory.limit_in_bytes works fine, but I want to limit the memory+swap using memory.memsw....
0
votes
1answer
456 views

Docker reporting that my Linux kernel doesn't support cgroup cpu real-time period

I've configured Docker on my Ubuntu 18.04 Server to expose its API so I can create and deploy Docker containers via REST requests, which I need to add certain features to my project. This worked fine ...
2
votes
1answer
108 views

Why are my resource constraints not respected?

I want to limit the cpu resources that are available to the docker containers on my system.I do not want to limit the resource consumption of individual containers but only for all containers combined....
0
votes
0answers
28 views

Assign certain CPUs to a cgroup

I have 4 CPUs. I want to run a process and allow it to use only CPU number 4 among those. So I created a new cgroup for it, but I cannot find the way to enter such a restriction.
1
vote
0answers
59 views

Setting vm.dirty_ratio per cgroup

I was wondering if there is a way to set vm.dirty_ratio per cgroup? I see that the cgroup2 documentation mentions writeback but it seems that it will only use limits imposed by the memory controller ...
0
votes
1answer
138 views

auto nice daemon

I know path to parent executable (launcher). I would like to kill all other launchers without child processes (if any). I don't know PID of child process(es). Only kids should have high priority (...
0
votes
0answers
23 views

Opennebula deleted machines are not removed from /sys/fs/cgroup/

I am monitoring an open nebula host using netdata, after opening the monitoring dashboards I mentioned there are some qemu one instances in it which don't exist. When I checked the command systemd-...
1
vote
1answer
852 views

How to install cgroups on Mac OS

How can I install on my ordinary MacOS (Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64 i386) the Control Groups tools (tools to control and ...
2
votes
2answers
166 views

How to find total active namespaces in linux?

Is there any way to find how many active namespaces of each type are present in Linux? Such as: mount ns: 20 net ns: 40 etc.
0
votes
0answers
129 views

systemd-nspawn: Memory Accounting inside the Container

I've used systemd-nspawn, systemd, machinectl and debootstrap under a Debian 9 machine to setup a simple Debian 10 container as: debootstrap --include=ssh,locales,dbus,net-tools,vim,htop,gnupg2,curl,...
0
votes
1answer
58 views

Using cgroup to limit program memory as it's running

Let's say I have created a cgroup and attach a memory limit of 200MB to the cgroup. I then run a memory-intensive process inside the cgroup, and it uses up its limit of 200MB. As the process runs, is ...
0
votes
0answers
97 views

How to fully enable io.latency controller?

I'm trying to setup my Kodi to never skip. Currently I focus on providing absolute priority to Kodi's I/O. System is Fedora 31. Kernel 5.4.0, has CONFIG_BLK_CGROUP_IOLATENCY=y I've started with ...
1
vote
0answers
66 views

Limiting CPU hyperthreads that cgroup tasks are allowed to access?

Just a quick question about using CPUSET to limit the CPUs a cgroup can access when using a multi-core CPU with hyper-threading. The documentation linked above says: cpuset.cpus (mandatory) ...
0
votes
1answer
1k views

Cgroup memory limits and process killing

I have the following situation: (The following functions are ones taken from python) I have a process A which is running and has a cgroup memory limit set on it. I fork a child process from A using ...
1
vote
2answers
224 views

Fedora 31 - grubby --args=“systems.unified_cgroup_hierarchy=0” broke the system

I upgraded to Fedora 31 today. All good. I came across issue with Docker so I found the solution to run grubby --args="systems.unified_cgroup_hierarchy=0" and then grub2-mkconfig Now, systems won'...
1
vote
0answers
82 views

memory swapping and cgroup

I wonder how is swapping mechanism implemented under the memory cgroup v1. Most existing books (understanding the linux kernel, professional linux kernel architecture, understanding the linux virtual ...
3
votes
1answer
131 views

File/foler permissions & plex

I have an Intel NUC running Kubuntu (based on Ubuntu 18.04.3 LTS \n \l) & Plex server, headless. I used various guidance to set this up. The normal user account to the machine is 'exharris', and ...
1
vote
0answers
188 views

Running cgroups inside EC2 c4.xlarge instances failed - operation not allowed

Problem I'm currently trying to restrict the resource of of a specific user on an AWS EC2 instance. After doing some research online, I thought the following was enough to add a user to a cgroup that ...
0
votes
1answer
428 views

system MemoryMax by percentage not working?

I am trying to configure my .service file to limit how much memory a given service can use up before being terminated, by percentage of system memory (10% as an upper limit in this case): [Unit] ...
0
votes
1answer
466 views

cgroups: throttle per user disk I/O bandwidth on Linux

I have a Linux web server (Debian, just in case that made a difference), which is Apache + PHP-FPM. Each Apache VirtualHost uses a dedicated PHP-FPM pool (through a dedicated unix socket), which runs ...
11
votes
1answer
689 views

Why is conmon in a different cgroup when podman is started with systemd?

Given podman is installed on a linux system and a systemd unit named baz.service: # /etc/systemd/system/baz.service [Service] ExecStart=/usr/bin/podman run --rm --tty --name baz alpine sh -c 'while ...
1
vote
0answers
126 views

Why does groupmems command ask for a password even when executed as root

The groupmems command that allows us to edit group membership has a peculiar trait: When executed as root, it again asks for root password when trying to edit any group membership for any system user. ...
1
vote
0answers
48 views

Compiling a program causes my system to run out of memory, any workarounds?

During the compilation my system runs out of memory on a compilation unit. How can I deal with this issue? One way is to enable swap but just doing that would make the machine unuable while the ...

1
2 3 4 5