Open bobrik opened 2 years ago
Thanks for reporting.
(Actually, the kernel allows shrinking memory (the page_counter link is not complete truth), in your case the reclaim was too hard or straight impossible, so the kernel gave up with EBUSY.) I can see how systemd dynamic property update could be improved in this regard (best to simplest):
s/max:/intended max:/
in the UI.FTR, systemctl daemon-reload
already re-applies (once) the cgroup settings. OTOH, it's not a good idea to base the solution on this, basically turning PID 1 into reclaim worker on behalf of the shrunk unit.
systemd version the issue has been seen with
Used distribution
Debian Buster
Linux kernel version used (
uname -a
)5.10.75, but applies to all of them.
Expected behaviour you didn't see
If I set
MemoryMax=15G
, I expect both kernel and systemd agree on the current value.Unexpected behaviour you saw
In reality I see:
Steps to reproduce the problem
The kernel does not allow to set the limit below current usage :
I think systemd shouldn't show 15G as the limit when it's not been set (in my example). As a consequence, it might be good to try to enforce the limit on every reload until it's successful. Not sure if there should be any sort of warning in
systemctl
output.