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
0 answers

How can I stop dockerd from using cgroups at all?

I want to run Docker containers on a system using cgroupv2 instead of cgroupv1, but Docker doesn't support cgroupv2 yet. How can I configure dockerd to not use cgroups at all so that it will start?
dippynark
  • 2,743
  • 20
  • 58
0
votes
1 answer

how access cgroups via nodejs in macos?

i want access cgroup option for simulate docker in macos. i searched SO but as they said it's implimented via linux and unix system. but in golang you can work with syscall option . any clue or hint?
user11213886
0
votes
1 answer

Is a newly created Docker container associated with a new cgroup?

Is a newly created Docker container associated with a new cgroup? After all the processes inside a container finishes running, and the container is restarted again sometime later, will it be associated with a new cgroup or still the same cgroup as…
Tim
  • 1
  • 141
  • 372
  • 590
0
votes
1 answer

Is it possible to use cpu.shares with cpu.cfs_quota_us

I'm setting up cgroups config for my research team. The server has 8 cpus. The team member could only use part of the cpu time, so for the team I set cpu.cfs_quota_us = 400000. I also want to add task priority with cpu.shares. for example, here's my…
0
votes
1 answer

cannot find cgroup V2 controllor

guys I've mounted cgroup V2 manually but I found there are none controllor in the root hierarchy. [root@node5 /]# mount -t cgroup2 none /cgroup2/ [root@node5 /]# cd cgroup2/ [root@node5 cgroup2]# ls cgroup.controllers cgroup.max.descendants …
Wind
  • 31
  • 2
0
votes
0 answers

cgroups blkio subsystem is not counting the block write byte count properly for conatiner applications

I am working on the linux kernel base 3.14 version and i have enabled the cgroup and blkio subsystem on it for checking the write byte count of the block device from the container and host applications. But, I have problems in getting the written…
Selva Kumar
  • 91
  • 1
  • 8
0
votes
0 answers

MPI job "consuming" cgroup pids

I have a processing job which uses MPI for parallelisation, but is (in this case) running in a single host. Each time I run a job, it "consumes" a number of cgroup "pids". Specifically each time I run the…
Chris
  • 852
  • 1
  • 8
  • 19
0
votes
0 answers

Changing Android process's nice values

I understand that changing the nice value of any app can be done using the terminal with the "renice" function. My code to renice: renice -n However, it seems like the new nice value only stays for foreground applications. Once I…
0
votes
2 answers

Are write failures to cgroup tasks deterministically non-persistent?

Consider the following program. #include #include #include #include #include #include void setup() { system("mkdir /sys/fs/cgroup/cpuset/TestingCpuset"); system("echo 0,1 >…
merlin2011
  • 71,677
  • 44
  • 195
  • 329
0
votes
1 answer

Programatically starting a process in a control group in Go or C

I basically want the functionality of cgexec, but called from a C or Go program (kinda like fork), and I couldn't find any such functionality in an existing library. I understand that I could just use exec in Go, but this seems kinda ugly, and I…
nanogru
  • 23
  • 2
  • 10
0
votes
2 answers

Does the cgroup C/C++ lib exist?

I am currently trying to compile a project (DOMJudge) and the compilation fails on cgroup_init in -lcgroup. When I looked to the script I found that this installer was looking for the gcc lib cgroup called by the flag -lcgroup. But I don't find any…
Brighter side
  • 392
  • 2
  • 14
0
votes
0 answers

"sh: echo: I/O error" when I set cgroup quota

I use python to write a simple python program to set quota for a thread. # make path path = "/sys/fs/cgroup/cpu/%d" % (tid) os.mkdir(path) # to set set_quota = "echo %d > /sys/fs/cgroup/cpu/%d/cpu.cfs_quota_us" % (quota_us,…
skytree
  • 1,060
  • 2
  • 13
  • 38
0
votes
0 answers

Set kernel parameter for cgroup_enable=memory

I am on a RHEL system and I would like to add the following parameters so that I can have my datadog + docker integration as described here (https://github.com/DataDog/docker-dd-agent#cgroups). I need to set the following kernel…
summerNight
  • 1,446
  • 3
  • 25
  • 52
0
votes
1 answer

CGroup configuration in CentOS 7

I am using CentOS 7 and I have several users registered in system (UIDs: 1000, 1001, 1002, etc) I want to restrict memory consumption for each user using cgroup and systemd. The following commands work pretty well but the user with UID=1000 must be…
zavg
  • 10,351
  • 4
  • 44
  • 67
0
votes
1 answer

Simplest way to provide memory, disk and CPU isolation without downloading images

I am familiar with Docker, Rkt and LXD, but if I did not have the ability to install all these tools, what would be the basic mechanisms to provide isolation of CPU, memory and Disk for a particular process? CPU - I want to say that only 1 socket of…
user855
  • 19,048
  • 38
  • 98
  • 162