On 2021-07-15 09:58+0200 tastytea <gen...@tastytea.de> wrote: > www-apps/gitea often used all 4 of my CPU cores and slowed everything > else down. So I attempted to limit CPU usage with cgroups: > > I have set this in /etc/rc.conf: > > rc_cgroup_mode="unified" > rc_cgroup_controllers="cpu memory io pids" > > And this in /etc/conf.d/gitea: > > rc_cgroup_settings=" > cpu.shares 128 > cpu.cfs_period_us 1000000 > cpu.cfs_quota_us 1000000 > memory.limit_in_bytes 8G > "
The error was that I used documentation for cgroups v1 instead of v2¹. 🤦The right values are: rc_cgroup_settings=" cpu.max 1000000 1000000 memory.high 7G memory.max 8G " ¹ <https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html> -- Get my PGP key with `gpg --locate-keys tasty...@tastytea.de` or at <https://tastytea.de/tastytea.asc>.
pgpRHV5KnZVpQ.pgp
Description: Digitale Signatur von OpenPGP