In RHEL 8 why can't I constrain user memory usage using cgroups v2?
Issue
- When using cgroups v2 on RHEL 8 (systemd.cgroup_unified_hierarchy=1 on grub boot line), cgroup memory constraints do not work.
/etc/systemd/system/user-.slice.d/15-memory.conf
[Slice]
MemoryMax=1G
MemoryHigh=512M
MemorySwapMax=512M
Environment
- Red Hat Enterprise Linux 8 with cgroups v2 enabled
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.