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

2
votes
0answers
29 views

How to calculate blkio shares in cgroups?

Currently I'm trying to setup a test scenario with the use of Debian Wheezy with its default kernel 3.2.60-1+deb7u3 and the cgroups blkio controller. The calculation of blkio.weight is not working for ...
0
votes
0answers
32 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
1answer
28 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 ...
1
vote
1answer
105 views

How to enable swap accounting for memory cgroup in Archlinux?

On my Archlinux box I want to limit some applications to a smaller amount of memory using cgroups. Since I use swap, I need to account memory+swap. How can I enable swap accounting?
2
votes
0answers
48 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 ...
0
votes
0answers
463 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 ...
2
votes
0answers
41 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: ...
2
votes
1answer
530 views

USB passthrough for LXC containers

PROBLEM: So I've been trying to get a usb device (primesense - the OEM reference for the Kinect) to passthrough to an LXC container so I can develop without worrying about polluting my stable system ...
3
votes
2answers
101 views

Monitor when read/write on metadata or mmaped files hit the disk

On a server hosting a wide range of websites, I often see IO becoming a bottleneck without being able to identify the processes responsible of IO operations with tools such as iotop, iostat or sar. I ...
7
votes
1answer
245 views

Why are cgroups mapped differently on these two systems by systemd

I have two systems, both running customized variants of OpenSuSE 12.2 (Mantis), both running exactly the same kernel. I get two very different outputs of /proc/self/cgroup or /proc/$$/cgroup on the ...
1
vote
1answer
70 views

cgroups analogue in Darwin

Is there an analogue to cgroups in Darwin for preventing processes from escaping from the control / monitoring of its parent process by means of fork()? If yes, what is it? For some background, ...
1
vote
1answer
142 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
0answers
138 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 ...
5
votes
2answers
698 views

Turning off swapping for only one process with cgroups?

I would like to turn off swapping for only one process. Swap should work as usual for the other processes. How I can implement this with cgroups?
5
votes
2answers
202 views

Externaly limiting number of CPU cores used

I need to externally limit a process/session to a certain number of cores. Are there any other possibilities than CPU affinity (I don't like the need to specify the actual cores) and cgroups (hard to ...
1
vote
2answers
421 views

cgroups: blkio.weight doesn't seem to have the expected effect

I've got 2 LXC containers with these cgroup settings: lxc.cgroup.blkio.weight = 200 lxc.cgroup.cpu.shares = 200 and lxc.cgroup.blkio.weight = 800 lxc.cgroup.cpu.shares = 800 I have verified in ...
3
votes
2answers
94 views

Reference documentation for cgroups (control groups) settings

I'm looking for some reference documentation to explain what each of the settings are, for each control group. For example, there's cpuset.cpus, I think setting this to 0 means use all CPUs, setting ...
1
vote
0answers
387 views

cgroups, cpuset changing the cpuset of some processes fail

I am trying to "reserve" a core on a CPU for performance measurement. I have mounted a cpuset cgroups vfs. I created two subgroups like this: /cpuset.cpu_exclusive 1 /cpuset.cpus 0-3 ...
9
votes
2answers
635 views

How to solve this memory issue gracefully?

I have a standard Linux (Debian testing) laptop, with a swap partition. I do a lot of experiments with it. Some of them are really memory hungry and the way Linux behaves by default is an issue for ...
2
votes
0answers
381 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
1answer
1k views

controlling priority of applications using cgroups

I would like to understand cgroups better and would like to understand the use-cases for applying cgroups. Are cgroups a good way for prioritizing different applications (i.e, giving higher priority ...
3
votes
0answers
81 views

reserve resources for admin console

My servers is often almost DOS'ed by crawlers. I have not yet managed to figure out what exactly is responsible for the high load. CPU, memory and disk IO are not at the limit (could be network ...
1
vote
2answers
243 views

Creating one-time cgroup

I would like to be able to create a one-time temporary group in hierarchy. For example: #!/bin/sh run_with_csubgroup /sys/fs/cgroup/group/subgroup/ Which creates group say ...
11
votes
2answers
323 views

What are the effects, if any, of scheduler priorities and policies for threads in an uncontended cpuset?

I have a Linux system where we have used cgroups to create two cpu_exclusive cpusets, A and B, and where we have migrated all user threads and all unbound kernel threads to a cgroup attached to cpuset ...
2
votes
2answers
427 views

Measuring CPU and Memory per user to distribute “cost” of a server

How should I implement approximately correct per-user monitoring on a server? I want a way to split the cost of a server between the users based on their usage. On newer machines (RHEL6) I would use ...
10
votes
1answer
5k views

Using Linux cgroups to balance CPU performance

I have two dual-core Linux systems installed using Linux cgroups with relatively recent kernels; one is running Debian Squeeze, the other Ubuntu 11.04 Natty Narwhal. I've gotten CPU load balancing ...
5
votes
2answers
1k views

Use cgroup to limit the memory usage of virtualbox

I am trying to use cgroup (Control Group) to limit the memory usage of virtualbox, but it does not seem to work. My machine is: $ uname -a Linux fc.bgi 2.6.40-4.fc15.i686 #1 SMP Fri Jul 29 18:54:39 ...
12
votes
2answers
1k views

Weight-based block IO control for VMs

I use KVM to manage my virtual machines. I am trying to limit the resources provided for VMs. I am able to limit the CPU and memory allocated for VMs using libvirt/cgroups. Now I want to control the ...
6
votes
3answers
473 views

How to jail a fastcgi server (or a web-proxied server)?

If you have a web-server (e.g. nginx) often you use a fast-cgi server or another application-http-server for dynamic content. That means in both cases you have a nice process separation between the ...
3
votes
1answer
926 views

How can I configure fair bandwidth sharing between cgroups?

It's fairly easy to use tc with Stochastic Fairness Queueing (SFQ) to configure fair bandwidth sharing between flows, but an application can open multiple flows and get an unfair share of bandwidth. ...