Cgroup cpu.cfs_period_us cpu.cfs_quota_us not working

I have been trying to figure out why this does not work. Been trying to troubleshoot it for a few days now and still no go.

I am trying to set this up on a head node running 8.6 on a HPC cluster, so that user don’t overload the head node.

my cgconfig.conf, configs is to limit user to 2 cores, and 4GB of ram.

group limit_user {
cpu {
cpu.cfs_period_us=“100000”;
cpu.cfs_quota_us=“200000”;
}
memory {
memory.limit_in_bytes=“4g”;
memory.memsw.limit_in_bytes=“4g”;
memory.swappiness=“0”;
}
}

my cgrules.conf

@“domain users” cpu,memory limit_user

I know my memory limit works, because when I run

stress -c 5 -i 1 -m 1 --vm-bytes 5G

The program would get kill when it get pass 4GB of usage on the htop command.

It also does not show I have a slice or scope under cpu,cpuacct section

$ cat /proc/self/cgroup
12:memory:/user.slice/user-989965364.slice/session-13.scope
11:rdma:/
10:pids:/user.slice/user-989965364.slice/session-13.scope
9:cpuset:/
8:cpu,cpuacct:/
7:devices:/system.slice/sshd.service
6:hugetlb:/
5:net_cls,net_prio:/
4:blkio:/system.slice/sshd.service
3:freezer:/
2:perf_event:/
1:name=systemd:/user.slice/user-989965364.slice/session-13.scope

I also follow this guide 18.4 section Chapter 16. Using cgroupfs to manually manage cgroups Red Hat Enterprise Linux 9 | Red Hat Customer Portal and I ran the grubby command and it still does not work after a reboot.

I had it randomly work a few days ago, and I wipe the server thinking I figured how to set it up, but I was wrong.

Any pointer would be super helpful.

I was able to resolve this using systemd instead.
modified /usr/lib/systemd/system/user-.slice.d/10-defaults.conf
and create /usr/lib/systemd/system/user-0.slice.d/10-defaults.conf for root user.