You are not logged in.

#1 2023-09-06 20:59:37

PyroAVR
Member
From: Rochester, NY
Registered: 2020-05-29
Posts: 3
Website

systemd MemoryAccounting can only be set with systemctl

I'm configuring a multi-user system where we have a dependency on some known-leaky tools, which are not under our control. I'm observing that when a process is killed within a user session, the entire session is killed.

To remedy the situation, I am trying to set OOMPolicy and MemoryAccouting fields on user.slice.

However, I am unable to set these fields any way except for using

systemctl set-property user.slice MemoryAccounting=no

(for example). I've attempted to create drop-in units in /etc/systemd/system/user.conf.d/99-memory-acc.conf and /lib/systemd/user.conf.d/99-memory-acc.conf, with the contents:

[Manager]
MemoryAccounting=no
OOMPolicy=continue

However, after daemon-reexec or even a reboot, I don't see the change take place. I tried setting these directly in /etc/systemd/user.conf, despite it having lower precedence to the drop-ins, also without success. Am I missing something?

Offline

#2 2023-09-08 21:26:15

Brocellous
Member
Registered: 2017-11-27
Posts: 146

Re: systemd MemoryAccounting can only be set with systemctl

OOMPolicy= is a unit directive, the related key in user.conf is DefaultOOMPolicy, since it affects the manager defaults.

Anyway it sounds like you want to just put the failing tools in their own slice. Have you tried anything like that?

Last edited by Brocellous (2023-09-08 21:26:27)

Offline

Board footer

Powered by FluxBB