0

I can't find /sys/fs/cgroup/cpu.weight, I only have cpu.pressure and cpu.stat and without the `cweight my minikube on docker doesn't work. How can I configure it?

cat /sys/fs/cgroup/cgroup.controllers
cpuset cpu io memory hugetlb pids rdma misc
ls -l /sys/fs/cgroup/
drwxr-xr-x root root 0 B Mon Apr  4 10:01:43 2022  ananicy_test_cgroup2
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.controllers
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.max.depth
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.max.descendants
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.procs
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.stat
.rw-r--r-- root root 0 B Sun Apr  3 11:22:32 2022  cgroup.subtree_control
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.threads
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cpu.pressure
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cpu.stat
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cpuset.cpus.effective
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cpuset.mems.effective
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  dev-binderfs.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  dev-hugepages.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  dev-mqueue.mount
drwxr-xr-x root root 0 B Mon Apr  4 10:02:21 2022  Example
drwxr-xr-x root root 0 B Sun Apr  3 11:22:50 2022  hostcritical.slice
drwxr-xr-x root root 0 B Mon Apr  4 10:01:43 2022  init.scope
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.cost.model
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.cost.qos
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.pressure
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.prio.class
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.stat
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  machine.slice
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  memory.numa_stat
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  memory.pressure
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  memory.stat
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  misc.capacity
drwxr-xr-x root root 0 B Sun Apr  3 11:22:48 2022  proc-sys-fs-binfmt_misc.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  sys-fs-fuse-connections.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  sys-kernel-config.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  sys-kernel-debug.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  sys-kernel-tracing.mount
drwxr-xr-x root root 0 B Mon Apr  4 09:18:13 2022  system.slice
drwxr-xr-x root root 0 B Sun Apr  3 11:22:50 2022  unevictable.slice
drwxr-xr-x root root 0 B Sun Apr  3 11:24:39 2022  user.slice

I already tried to do this,
sudo echo "+cpu" >> /sys/fs/cgroup/cgroup.subtree_control and it does not work.

Miuler
  • 473
  • 1
  • 5
  • 13
  • Error in Nomad with Docker: 2022-04-04T12:04:31.687-0500 [ERROR] client.alloc_runner.task_runner: running driver failed: alloc_id=cfc2ccf3-1adc-31e4-d140-52530a505717 task=hello error="Failed to start container 223b58...: API error (400): failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: openat2 /sys/fs/cgroup/system.slice/docker-223b588...scope/cpu.weight: no such file or directory: unknown" – Miuler Apr 04 '22 at 17:08
  • # echo "100" > /sys/fs/cgroup/cpu.weight (warning: An error occurred while redirecting file '/sys/fs/cgroup/cpu.weight' open: Permiso denegado) – Miuler Apr 04 '22 at 17:14

2 Answers2

0

Ok, the problem is the kernel version (linux-tkg-pds), the original version is:


$ pacman -Qi linux-tkg-pds
Nombre                    : linux-tkg-pds
Versión                   : 5.17.1-249
...

I'm install the package linux

$ pacman -Qi linux
Nombre                    : linux
Versión                   : 5.17.1.arch1-1
...
Miuler
  • 473
  • 1
  • 5
  • 13
0

PDS CPU scheduler doesn't support all the features CFS does. If you rebuild with CFS instead of PDS, you'll get the expected /sys/fs/cgroup/cpu.weight.

TkG
  • 1