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

Pgpool fails to start on kubernetes as a pod

I have hosted pgpool on a container and given the container config for kubernetes deployment - Mountpaths - - name: cgroup mountPath: /sys/fs/cgroup:ro - name: var-run mountPath: /run And Volumes for mountpath for the cgroups are mentioned…
Joy
  • 6,438
  • 8
  • 44
  • 75
0
votes
0 answers

Linux Kernel Dev - cgroup - How to list tasks' id from a group?

I'm developping a kernel module and I'd like to be able to list tasks' id from a group. For example: I create two groups in the cpuset subsys: A and B. In B/tasks I put a PID. From my module, I'm getting a pointer to the subsys cgroup…
Reginas
  • 3
  • 2
0
votes
0 answers

Dotnetcore 3.1 memory allocation in Docker

I'm running a dotnetcore 3.1 application in a Docker container (in Kubernetes cluster). First case : I run the application with the following Docker/Kubernetes limits : requests.memory: 300Mi, limits.memory: 500Mi. According to my monitoring, the…
Antoine
  • 310
  • 1
  • 5
  • 14
0
votes
1 answer

Why some processes(even they are user processes) could not be migrated to a certain cpu by `cpuset(7)`?

Why some processes could not be migrated to a certain cpu by cpuset(7) while some processes could? I found that these processes could not be really migrated to a certain cpu(Though when you check the cpuset filesystem,it seems ok.But if check the…
sunshilong369
  • 646
  • 1
  • 5
  • 17
0
votes
0 answers

How to detach child process from cgroup of parent process?

How can I completely detach the child process from the parent process that is sharing a common cgroup? Currently, I am achieving this by forking child again by doing ssh localhost but I want to avoid ssh localhost. I also tried daemonizing the child…
ThinkGeek
  • 4,749
  • 13
  • 44
  • 91
0
votes
1 answer

How many threads for a kubernetes application?

I have a multithreaded application which does a CPU-intensive task that I want to run on Kubernetes. The node I'm using has 56 cores and I set a request and limit of 2 cores for my pod. Since it's CPU-intensive, typically there would be no point…
Display Name
  • 947
  • 2
  • 10
  • 18
0
votes
1 answer

Why `oom-kill-disable` is not effective for `kubectl create pod`, but is effective for `docker run container ` in myself System?

I want to forbid k8s pod is oom killed when memory is used totally, first I tried it by docker run, it works; but when I tried it by kubectl, it failed! [docker run][docker run -ti -m 256M --oom-kill-disable myselfImage bash] docker set…
LZG
  • 39
  • 4
0
votes
1 answer

Why docker run `--oom-kill-disable` is not effective , but `echo 1 > memory.oom_control` is effective in myself System!

When I run one container for docker run --oom-kill-disable, it is not effective; But when I "echo 1 > memory.oom_control", it is effective. docker version: Client: Version: 17.12.0-ce API version: 1.35 Go version: go1.9.2 Git commit: …
LZG
  • 39
  • 4
0
votes
2 answers

BPF cgroup device controller program problem with map

I want to pass data between user/kernel side with BPF_PROG_TYPE_CGROUP_DEVICE I have defined map as: struct bpf_map_def SEC("maps") my_map = { .type = BPF_MAP_TYPE_ARRAY, .key_size = sizeof(int), .value_size = sizeof(int), …
0
votes
1 answer

Linux kernel - How CPU subsystem(of CGROUPS) different from CPU scheduler?

Linux kernel code here provides, CPU scheduler that has multiple scheduling algorithms for scheduling the processes(including docker container processes). A control group is a kernel construct, which allows for limiting access to, and accounting…
overexchange
  • 15,768
  • 30
  • 152
  • 347
0
votes
1 answer

How to determine the cgroup of a device and give it to a lxc container

I'm new to lxc and cgroups. I'm trying to isolate an app, and building it's container with LXC. So far I'm able to give it some resources such as /dev/tty0 or /dev/fb0. That's fine, however I'm struggling to find how the number of the /proc/*/…
YCN-
  • 203
  • 2
  • 12
0
votes
1 answer

Can someone explain why the active_file and inactive_file values are much greater than cache in my docker container's cgroup memory.stat file?

Can anyone explain how it's possible active_file + inactive_file (~228MiB) is much greater than cache (~537KiB)? My understanding is that cache should include active_file and inactive_file, so how can the cache value be so low? Note: These stats…
0
votes
0 answers

Limit resources usage to a process on Linux without killing it

I need to run a Bach script on a Linux machine and need to limit the resources usage (RAM and CPU). I am using cgroups but it does kill the process when exceeding the limits, but I dont want that, I just want the process to keep running with the…
Frank
  • 2,083
  • 8
  • 34
  • 52
0
votes
0 answers

cgroup limit memory usage failed on Ubuntu?

I want to limit the memory usage of a process using cgroup but failed with error sh: echo: I/O error After creating a test dir in /sys/fs/cgroup/memory. I opened two shell, one run sudo sh -c "echo $$ >> cgroup.procs" to set the process, the other…
0
votes
1 answer

Apply control group rule to specific (or all) Docker containers in Kubernetes cluster

By default Docker containers are unprivileged. Of course devices can be added individually with docker run --device /dev/abc0 but this cannot yet be done in Kubernetes. In any event I have an arbitrary number of devices per node, which makes it…
alkalinity
  • 1,750
  • 2
  • 21
  • 32