Understanding systemctl status of a process

So I’ve been fighting a Plex Media Server memory usage problem lately. Never had the problem in Mint but with EOS, Plex just runs away with memory (using the same version of the server in EOS as I did in Mint). It gets so bad, when I try to log into the server, the unlock screen doesn’t respond. If I open up a new terminal, I can log in and see Plex is consuming everything. I added a ‘restrict.conf’ file for PlexMediaServer.service so we’ll see. In that file, I added ‘MemoryMax=4G’ to keep Plex at 4 gigs. But what I don’t understand is, when I issue this command: systemctl status plexmediaserver … the first time, it reports 6.7G RAM. Then a few minutes later, I reports 8.3.

● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; ve>
  Drop-In: /usr/lib/systemd/system/plexmediaserver.service.d
           └─restrict.conf
   Active: active (running) since Mon 2019-08-26 20:48:20 EDT; 56min ago
 Main PID: 822 (Plex Media Serv)
    Tasks: 96 (limit: 4915)
   Memory: 6.7G
   CGroup: /system.slice/plexmediaserver.service
           ├─ 822 /usr/lib/plexmediaserver/Plex Media Server
           ├─ 881 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Re>
           ├─ 966 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmedi>
           └─3920 /usr/lib/plexmediaserver/Plex Transcoder -codec:0 h264 -hwacc>


● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; ve>
  Drop-In: /usr/lib/systemd/system/plexmediaserver.service.d
           └─restrict.conf
   Active: active (running) since Mon 2019-08-26 20:48:20 EDT; 1h 8min ago
 Main PID: 822 (Plex Media Serv)
    Tasks: 96 (limit: 4915)
   Memory: 8.3G
   CGroup: /system.slice/plexmediaserver.service
           ├─ 822 /usr/lib/plexmediaserver/Plex Media Server
           ├─ 881 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Re>
           ├─ 966 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmedi>
           └─3920 /usr/lib/plexmediaserver/Plex Transcoder -codec:0 h264 -hwacc>

Looking at Sys Monitor:

image

My system is only using 3.4 gigs of RAM. So the big question is… what exactly is systemctl status showing when it reports the RAM like that?

Hi, I’m not familiar with plex configuration, but I believe that difference between RAM usage in systemd and Sys Monitor is there because systemd also counts cached ram of that app and SysMon does not. You will find more info on your Ram usage with:
free -h
it will show you how much of your ram is used and how much is reserved for buff/cache. It’s nothing bad that cache is filling up your ram, thats how Linux is designed and thats actually mostly a good thing.

Have you looked at the processes running and what they are consuming. Then use htop and watch.