Cgroups v2 is enabled in almalinux 9.1 with 5.14.0-70.22.1.el9_0.x86_64
kernel and systemd 250 (250-12.el9_1.3).

Content of /etc/systemd/system/user-1002.slice.d/override.conf:


















*[Unit]Description=User Slice for UID
1002[Slice]CPUAccounting=1MemoryAccounting=1IOAccounting=1TasksAccounting=1CPUQuota=70%MemoryMax=1GMemoryHigh=1GIOReadBandwidthMax=/
1GIOWriteBandwidthMax=/ 1GIOReadIOPSMax=/ 1000IOWriteIOPSMax=/
1000TasksMax=200[Install]WantedBy=multi-user.target*

I execute systemctl daemon-reload after saving the slice file.
Every value is getting enforced for the user when I test them by running
some commands from the user's terminal.
But they dont work after I run the same commands from the root's terminal
after doing su to that user.
They also dont work when a user's process is started from a php script
using putenv('user_uid');.
How do I make them work for all the user's processes no matter how they
start?
Do I have add some service file in /etc/systemd/user? Please help.

Reply via email to