Questions tagged [cgroups]

cgroups are used to control resource management in kernel. They remain in an hierarchy and a new group can be created just by creating a directory in the appropriate place. Using cgroups, a lot of resource management can be done including memory, cpu etc.

cgroups (abbreviated from control groups) is a Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes.

369 questions
0
votes
1 answer

How do I limit all httpd processes to use less than 90% total CPU?

I've looked into nice, cpulimit, and cggroups, but I'm not sure if any of them would do what I want to do. Maybe they do, but I'm doing it wrong. My end goal is for CentOS to look into all the apache processes, and if they add up to a certain amount…
Tam N.
  • 2,687
  • 9
  • 30
  • 29
0
votes
1 answer

How to give docker exclusive access to cpus?

Is there any way I can give a docker instance exclusive access to some of the cpus?
smz
  • 391
  • 1
  • 3
  • 11
0
votes
1 answer

Measure resource usage of Docker container on exit

I create containers which compile/interpret user'c code and pass the result back to the browser (just like JSFiddle). Now, I need to know how much CPU and memory has been used for executing that code. So, I don't need it realtime but on container's…
Aleksandar
  • 1,163
  • 22
  • 41
0
votes
2 answers

How to resize docker container's cpu-share value dynamiclly?

I am using docker 1.11, I run a container like: sudo docker run -it --rm --cpu-shares 4 zeroboh/stress --cpu 2 I want to change cpu-shares's value while docker container keeps running. Is there any method to do so? I tried to edit file…
h22q
  • 3
  • 3
0
votes
0 answers

The right way to use cgroups to restrict cpu usage

I follow the red hat documents to create three groups for three users using command: cgcreate -t uid:gid -a uid:gid -g subsystems:group Say user A,B,C belong to group 1,2,3 respectively. But using this method, A can modify the cpu.shares file to…
cinvro
  • 115
  • 1
  • 13
0
votes
2 answers

Managing resource allocation using custom cgroups in system running systemd

I have an application which run as user "foo". I would like to set limit to CPU and memory that this application can use at run time. I am not able to realize how this can be achieved using systemd tools like - "systemctl" and "set-property" as…
Souvik
  • 151
  • 3
  • 14
0
votes
2 answers

Allocate memory to a process that other process can not use in linux

To limit memory resource for particular process we can use ulimit as well as cgroup. I want to understand that if using cgroup, I have allocated say ~700 MB of memory to process A, on system having 1 GB of RAM, and some other process say B,…
SD.
  • 1,432
  • 22
  • 38
0
votes
0 answers

Cgroup mount failed using cgconfigparser when configuring jstorm with cgroups

I am trying load /etc/cgconfig.conf using cgconfigparser to configure cgroup properties of jstorm. My OS is ubuntu 14.04, username is 'whaty' and I have installed libcgroup1, cgroup-bin, cgroup-lite. There is no cgconfig.conf in /etc. so I create it…
chenatu
  • 827
  • 2
  • 10
  • 22
0
votes
1 answer

cgroups works well until reloading config (hangs on mount)

I am walking around this problem a long time - cgroups just don't want to work when reloading config file again(hangs on mount), have to reboot each time to changes take effect. This are my steps: (1.)Fresh start of OS. (2.)cgsnapshot -s #…
Abc Xyz
  • 1,184
  • 12
  • 13
0
votes
1 answer

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: @gatewayer memory memlimit/ @gatewayer cpu cpulimit/ And…
Judking
  • 6,111
  • 11
  • 55
  • 84
0
votes
1 answer

Centos 7 and systemd: CPU Quota?

OS Version Information: [root@localhost system]# cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core) Configuration for the test.slice is as follows: [root@localhost system]# cat test.slice [Unit] Description=Test…
sydraz
  • 653
  • 6
  • 12
0
votes
1 answer

What does 'none' mean in "mount -t cgroup -o cpuset none /cpuset"

When practising cgroup, we need mount like mount -t cgroup -o cpuset none /cpuset Would you explain the significance of none here? Seems it's just a name and I could set it as any string, right? Is there any file, folder or file contant based on it?
Qiu Yangfan
  • 871
  • 11
  • 25
0
votes
1 answer

Cgroup usage to limit resources

My Goal: To provide user a way to limit resources like CPU, memory for the given process (C++). So someone suggested me to utilize Cgroups which looks like an ideal utility. After doing some research I have a concern: When we utilize…
Rambo
  • 103
  • 4
0
votes
1 answer

Running virtual machines in a cgroup

Is something like this possible for VirtualBox and/or VMware Workstation? And if so, which processes should be assigned to the cgroup to ensure the entire virtual machine is limited to the resources specified by the cgroup, regardless of its…
ecbtln
  • 2,646
  • 5
  • 27
  • 35
0
votes
1 answer

Regarding the process swap IN core number in multi core system

Is there any way I can find how many processes swapped into particular core in a given period of time on multi core system ? Say suppose, I have 8 core machine in which one process is hard affined to core 3 and would like to know how many times…
Snake
  • 63
  • 1
  • 9
1 2 3
24
25