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

learn more… | top users | synonyms

12
votes
4answers
637 views

Simplest possible secure sandboxing (limited resources needed)

I'm working on a project that implements distributed simulations: arbitrary code is executed on multiple nodes and the results are later collected and aggregated. Each node is an instance of an ...
7
votes
2answers
200 views

Does managing cgroups require root access?

I am trying to work with control groups on two different operating systems (Ubuntu and CentoOS). There are few concerns that I would like to ask. I am trying to create a control group using the ...
2
votes
2answers
525 views

Need help finding the CPU id numbers to use with cpu sets

The man for cpuset doesn't seem to clearly list how to figure out which numbers map to which processing units. My current machine has two Intel Xeon E5645s, each of which has 6 cores and ...
6
votes
1answer
336 views

Can you throttle the bandwidth to a tmpfs based ramdisk?

I created a ramdisk using tmpfs as follows: sudo mount -t tmpfs -o size=1024m tmpfs /myramdisk I was looking into cgroup blkio subsystem bandwidth limits "read_bps_device" and "write_bps_device" ...
4
votes
1answer
498 views

What priorities can be used in cgroups net_prio module?

Cgroups has a module called net_prio, and by using this module I can set the priority of network traffic generated by various applications. As you can read here, this can be achieved by setting ...
3
votes
1answer
555 views

Linux cgroups: limit CPU usage in absolute values which do not depend on CPU speed

I have a server with a 2.4GHz processor. And there are several cgroups, each one allowed to use 25% of CPU. That's equal to 600MHz. Then I replace the CPU with a faster one, let's say 3.0GHz. If I ...
0
votes
1answer
35 views

My systemd slices aren't reporting info to systemd-cgtop

I have a centos VM running via KVM on my Debian laptop. This is what I see when I run systemd-cgtop: I know I have a user,system,and machine slice, but I'm only seeing data from the machine slice. ...
0
votes
1answer
149 views

Cannot set memory.memsw.limit_in_bytes in cgroup on Ubuntu server using cgm

I'm trying to limit resource usage for a cgroup without having root access. I can set memory.limit_in_bytes using cgm setvalue memory memory.limit_in_bytes 150G But I can not set memsw....
0
votes
1answer
203 views

How do I read from memory.pressure_level in a cgroup?

I want to see the memory pressure of the cgroup. But simple cat memory.presure_level fails. How do I know the current memory pressure of a cgroup?
0
votes
1answer
337 views

Fedora 20 memory.limit_in_bytes not working

Fedora 29 (kernel 3.15.10-201.fc20.x86_64) This worked in F19. I'm trying to use cgroups to limit memory usage for some apps that are prone to misbehaviour, and I'm encountering problems. I'm ...
7
votes
0answers
86 views

Get quota usage information as non-privileged user

I have non-privileged access to a Linux server (shared PHP+MySQL hosting) and there are disk space, memory, CPU usage, I/O quotas. I wonder how can I get information about max/current quota usage ...
6
votes
0answers
703 views

receive signal before process is being killed by OOM killer / cgroups

In our cluster, we are restricting our processes resources, e.g. memory (memory.limit_in_bytes). I think, in the end, this is also handled via the OOM killer in the Linux kernel (looks like it by ...
4
votes
0answers
422 views

What does hierarchy support do in cgroup?

cgroup has 2 options for memory control: memory.use_hierarchy = 1 : use hierarchy memory.use_hierarchy = 0 : use flat hierarchy, according to this answer What is the difference between the two? I ...
3
votes
0answers
18 views

“leaky bucket” style disk io throttling using linux kernel

My goal is to prevent one kvm guest's disk i/o usage from negatively affecting other kvm guests on the same host. The host has one disk array - and separating guests onto different physical disks is ...
3
votes
0answers
86 views

Sandboxing a binary on linux

I am trying to understand various options I have to restrict/sandbox a binary in Linux. I see that I can use namespaces and cgroups like docker does. I could use SELinux like this link suggests. Which ...
3
votes
0answers
197 views

Limit system processes using cgroups

My server runs several dozens of processes that are not in my control (mostly monitoring software). According to my application logs, sometimes some of the third party processes try to allocate too ...
3
votes
0answers
777 views

cpu time measurement with wait4 vs. cpuacct cgroup

I want to start a process and measure the cpu time (user+sys) it needs until it terminates. I know I can use the wait4 system call, which returns a struct with user and system time (I use the sum of ...
2
votes
0answers
27 views

Limiting users ram with cgroups not working (for me)

I registred because I didn't manage running cgroups with several tutorials/comments/whatever you find on google. I want to limit the amount of ram a specifix user may use. Internet says "cgroups". My ...
2
votes
0answers
79 views

cgroups: cgclassify processes of other users

As root I've create a cgroup which limits cpu and memory usage. cgcreate -g cpu,memory:matlab_sandbox cgset -r cpu.shares=250 matlab_sandbox cgset -r memory.limit_in_bytes=8G matlab_sandbox Now I'm ...
2
votes
0answers
78 views

What is “state-object” in cgroups

I am gathering some idea about lxc, kernel name spaces and cgroups. While reading man lxc-cgroup, i find : lxc-cgroup gets or sets the value of a state-object (e.g., 'cpuset.cpus') in the ...
2
votes
0answers
116 views

Cgroups - memory subsystem

I want to set the memory.limit_in_bytes parameter for a control group and disable OOM, so processes freeze when the limit is reached. But i want to change that limit dynamically, if there is more ...
2
votes
0answers
159 views

CGroup Processes Not Terminated even when main process has been killed through Systemctl stop command

I am running systemctl stop process command for some process. Please find the output for systemctl status process below: Loaded: loaded Active: deactivating (stop-sigterm) CGroup: name=systemd:...
1
vote
0answers
50 views

Systemd: stop the main process (or the service) when a subprocess crash

I have two programs that I called program1 and program2 which perform a main task of two operations. When program1 start running it pipe its results to program2 which performs the final result. ...
1
vote
0answers
18 views

How to delete a device parameter for a cgroup?

Values of a specific parameter (for example, blkio.throttle.write_bps_device) for all devices are stored in a single file. echo "$MAJOR:$MINOR $LIMIT" > blkio.throttle.write_bps_device inserts/...
1
vote
0answers
22 views

How to limit/monitor a cgroup process's blkio when process has output redirection

I have some questions on cgroup blkio controller. I want to limit the IOPS on a specific process. This process uses IO redirection to write the stdout contents into a file. I tried to put the ...
1
vote
0answers
51 views

Does high Load average cgroups give “wrong” overall load average

Assume you have a system with 2 processors. Now create a cgroup and configure this group to use only 1 processor. Populate it with enough processes to give it a load average of 5 (to prove a point); ...
1
vote
0answers
161 views

How to set a process’s sched method to fifo and priority when cgroup are on?

I’m using CentOS 6.6, I want to set the sched method of my kvm VM to FIFO with priority 1. First, I use chrt and get error: chrt(): "failed to set pid XXX's policy" I find here: chrt(): "...
1
vote
0answers
109 views

cgroup memory.usage_in_bytes always zero for some tasks

I am trying to use cgroup to manage memory on a HPC cluster using torque queue manager on CentOS 6 machines. Just to test I login to a node running a job where I have: pbs_mom(12184)─┬─sh(24312)───...
1
vote
0answers
297 views

Using Cgroups with Systemd to restrict bash cpu & memory

I want to restrict every user on my Centos 7 server who is logged in via SSH. They should not be able to use, for example, a forkbomb and kill the whole system. The superuser will have no restriction. ...
1
vote
0answers
64 views

Why my limit on CPU does not validate via cgroups

/etc/cgconfig.conf ... group memlimit { memory { memory.limit_in_bytes = 8589934592; } } group cpulimit { cpu { cpu.shares = 1024; } } /etc/cgrules.conf: @...
1
vote
0answers
29 views

A way to set parameters in the LXC parent cgroups

So I have LXC installed, guest containers configured and all. The LXC containers each go into their own submodule (in cgroup parlance) and each are configured with cpu.shares and also the memory they'...
1
vote
0answers
280 views

Cgroups unrecognised service

I'm running the following command, after having modified my version of /etc/cgconfig.conf but get the following error (I'm running Ubuntu 14.04). Does anyone have any idea why this is the case? $ ...
0
votes
0answers
113 views

LINUX processes are forking up to thousand of processes again, even after kill command

On one of our boxes, I'm encountering strange problem from time to time.. in.tftpd processes are forking up to thousand of processes, getting server to almost unresponsive state. I've tried various ...
0
votes
0answers
3k views

Unable to mount cgroup

I've been searching for a solution to this problem but none was working. I would like to start my LXC container but i need to mount cgroup before. [root@stag-devCentOs ~]# lxc-start -n debianLxc lxc-...