[CentOS] Using Cgroups in CentOS-7

Tue May 18 08:33:37 UTC 2021
Gestió Servidors <sysadmin.caos at uab.cat>

Hi,

I want to limit CPUQuota and Memory using "Cgroups". After reading some documents, it seems I need to modify "user.slice" systemd file adding "CPUQuota=25%" (for example) but, after it, if I run a "stress" with other user (not "root"), stress process takes 100% CPU. I have noticed that rebooting system non-root user has % CPU limited... but also root... so is it possible to configure that limits to all users but non root?

Thanks.