[systemd-devel] Memory used by service reported wrong

Manuel Reimer Manuel.Spam at nurfuerspam.de
Sat Mar 16 17:02:59 UTC 2019


Hello,

I'm using this service file:

https://github.com/VDR4Arch/vdr4arch/blob/master/kodi-standalone-service/kodi.service

Resulting in this status:

# systemctl status kodi
● kodi.service - Starts instance of Kodi using xinit
    Loaded: loaded (/usr/lib/systemd/system/kodi.service; enabled; 
vendor preset>
    Active: active (running) since Sat 2019-03-16 17:41:20 CET; 12min ago
   Process: 372 ExecStartPost=/usr/bin/chvt 7 (code=exited, 
status=0/SUCCESS)
  Main PID: 371 (xinit)
     Tasks: 0 (limit: 4650)
    Memory: 216.0K (max: 2.8G)
    CGroup: /system.slice/kodi.service
            ‣ 371 /usr/bin/xinit /usr/bin/dbus-launch 
--exit-with-session /usr/b>


As you see I've set a maximum for memory as Kodi tends to "leak memory" 
sometimes.

Problem: Kodi can still use as much memory as it wants as systemd 
doesn't even notice that kodi is contained in this service.

I thought it isn't that easy to "break out" of an cgroup in systemd.

How can I somehow enforce systemd to keep track of the whole memory used 
by all processes spawned inside this service?

Thanks in advance

Manuel



More information about the systemd-devel mailing list