On Fri, 2021-05-21 at 20:14 +0300, Andrei Borzenkov wrote:
> On 21.05.2021 17:07, Benjamin Berg wrote:
> > [SNIP]
> > Yes, you need to set it on all ancestors, and the documentation
> > mentions this:
> > 
> > """
> > For a protection to be effective, it is generally required to
> > set a corresponding allocation on all ancestors, which is
> > then distributed between children (with the exception of the
> > root slice). Any MemoryMin= or MemoryLow= allocation that is
> > not explicitly distributed to specific children is used to
> > create a shared protection for all children. As this is a
> > shared protection, the children will freely compete for the
> > memory.
> > """
> > 
> 
> OK, it is in upstream now, was not in my version and I did not pay
> attention to web page. Sorry.

Ah, true, they were updated not too long ago.

> I guess I expected systemd to somehow handle it, given that it knows
> all the settings, knows exact hierarchy and is the sole master of
> cgroup tree.

I think it is a bit of a conundrum. Automatic handling would be neat,
but it also does not make sense that protections further up in the
hierarchy could increase indefinitely.
A somewhat ugly corner case are the automatically created slice units
for template services. Here the user will need to explicitly configure
a sane limit on the parent slice unit.

Benjamin

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to