After switching to Plex Pass PMS is constantly utilizing one core (version 1.14.1.5488)

Hi Chuck, as noted in my earlier post I’m running XPEnology on an HP Gen8 Microserver, not Synology hardware. Hence I have access to a lot more of the hardware monitoring capabilities via iLO.

Since that initial post in this thread I’ve also upgraded the system to a Xeon E3 1265L v2 for a bit of extra grunt (the server’s doing a lot more besides running Plex).

Thanks. So XPE, not SYNO. Sorry for overlooking that.

In all my years, only lower CPU demand will lower temps.

As a consideration to you. Since you are XPE, should you ever wish to migrate out to something bigger like real Linux, Docker isn’t the vehicle. one Linux tar file and you’re done in about 10 minutes. Food for thought. :+1:

Regarding the temperatures, there is no way of pointing at Plex as the definitive cause for any temperature deviations.

The statement about single thread running : I have seen this. Should you wish to pursue further,
I would like to see a fresh start, with only DEBUG logs, captured when you see it jump up to 100% CPU so I can backtrack the activity.

Thanks for the feedback Chuck, but I have to take issue with that. I’m a Linux sysadmin as part of my job and know how to monitor a server. The system is being monitored via SNMP (both the OS and the integrated lights out (iLO) card in the system) using LibreNMS. As soon as 1.14.1.5488 was installed I saw one CPU core become permanently utilised at ~100%. The ‘top’ utility indicated this to be down to a “Plex media server” process. The high CPU utilisation was accompanied by a corresponding (and completely understandable) increase in thermal output from CPU, VRM and also RAM (suggesting lots of RAM access via the northbridge chipset). Stopping the Plex service saw CPU utilisation (and temperatures) drop to normal levels, restarting the service brought it straight back. Moving to the 1.15 Plex builds did not change the situation. Regressing the Plex install to 1.14.0 shows no high CPU utilisation and no corresponding increased thermal output. It is a bug in the 1.14.1.5488 build, simple as that. And, judging by other threads in this forum, it’s not limited to the Synology builds.

Since you want to name drop a few credentials:

I am a kernel and system application developer.
I specialize in the MMU (virtualization) and device drivers.

I started doing this in 1983 on Unix and migrated to Linux when it first appeared on the scene in the 90’s.

While I consider it unprofessional to continue in this manner, Shall we dispense with “measuring” ?

What I have seen

  1. A single processor thread spinning.
  2. I have performed both strace() and ptrace(). I can’t find it nor can I reproduce it on Synology, QNAP, or Redhat (Centos, Fedora) or Debian (including Ubuntu).
  3. I have not pulled out the kernel debugger and gone ripping into the kernel API to see where the apparent spin-lock is coming from. This may be the next step.
  4. Applications rarely use spinlocks. Most use simple semaphore (shared mem) locks at the library level.
  5. I’ve examined the Plex source code there are no accidental invocations of critical region spinlocks.

At this point, the only thing which makes sense to me is

Runtime library interation. Without having a list of everyone’s installed packages, including libs, there is nothing to correlate.

Whatever the issue, it is a subset of the Linux community. If it were rampant, or PMS (my assertion) , it would impact everyone. This issue is not impacting everyone.

Have you any suggestions?

1 Like

I can almost confirm this has nothing to do with user installed packages, since my setup is pretty much just a “fresh” install of PMS (in Docker) for DVR purposes only.
If there is anything you need me to provide to help pinpoint the issue, I’d be more than happy to help.

25% of total CPU utilization on an Intel Pentium N3710 processor is not leaving much room for other demanding processes :slight_smile:

I haven’t checked my SHIELD TV yet, using ADB, to see if it is running into the same issue. I was informed by some of my users that streams take longer than usual to start playing and seek (buffering message appears). Maybe I should do that now.

Looking forward to having this issue fixed!

Thank you to the Plex team!

Perform the same test AWAY from Docker.

By placing it in Docker, you’ve added a layer of abstraction. You are making yourself susceptible to any flaws in the base enironment’s runtime environment interface libraries (e.g. Docker itself).

1 Like

I haven’t tried what you suggested, but I just ran “top” on the Nvidia SHIELD TV adb shell, and the Plex Media Server process is stuck at full throttle on there too.

That would explain why it seemed to struggle so much for the past month now…

EDIT : To be clear, I’m running 2 Plex Media Servers on the same network, but on separate devices. Both devices (Synology NAS + Nvidia SHIELD TV) are showing the same single core 100% CPU utilization.

Chuck I’m sorry I offended you. I had no intention of calling your professionalism or experience into question, just trying to convince you of my own, and that possibly my observations where valid.

I’m afraid I have no further suggestions. I’m no coder, and obviously far less experienced that yourself, but am happy to continue to test and provide feedback if it’s wanted. FWIW I’m also running Plex on a QNAP TS-853A (1.14.1.5488) and am not observing the high CPU usage there. It’s a very different system though, obviously.

I appreciate that it’s no help in solving the problem with the code (if, indeed, that’s the problem) but a quick search of the forums for “CPU” shows quite a few users, all on 5488 or later, reporting 100% utilisation of one CPU core issues on a variety of platforms: Shield, Windows, Mac, Ubuntu/Linux, XPEnology/Linux, Synology/Linux. A few of them have reported the issue being resolved by reinstalling 5470 (or earlier).

I appreciate this isn’t a “rampant” issue and it’s obviously not affecting everyone, but thanks for taking the time to investigate in this thread, @ChuckPa . The users elsewhere seem to have been somewhat ignored.

1 Like

Disabling UPnP on my router has fixed the 100% cpu usage issue on my side. Maybe PMS team could start looking at their UPnP implementation (if they monitor these forums.)

2 Likes

When you say “disabling UPnP” on your router (I need mine to work for Xbox Live on Xbox One), is UPnP enabled on your Plex Server?

If you have Remote Access in Plex activated and set to automatic it hits UPNP, if you do manual port forwarding or not activated it won’t.

It didn’t matter if it was disabled in plex or not. I tried both (manual and automatic). I had to disable it on the router for plex not to run up one of my cores.

Okay, I’m currently on 1.14.0.5470 with no excessive CPU usage, UPnP is turned on on my router (it’s a Linksys WRT32X running OpenWRT, for the record) but I’m manually port-forwarding to my Plex server so turning off UPnP won’t affect that. Plex is set “Manually specify public port” so, to my mind, should not be attempting to configure anything by UPnP.

I unfortunately had to rebuild my monitoring system today and lost all my historical data, but I have about 6hrs of data showing very low CPU usage with Plex running (and I’ve been watching a 4k movie during that time). I’m going to turn on all the debugging, upgrade to 5488 again, get some stats of it running the CPU high, then turn off UPnP and see if there’s any impact. I’ll report back soon, hopefully!

I’m still gathering data, but spoilers: turning off UPnP on the router seems to have sorted it! :sunglasses:

Here we go, then:

21:50 updated to 5488, CPU straight up to ~12% (8-core system, so 1 core maxed out)

22:23 running at 12% CPU for half an hour, one core at 100%

22:25 stopped UPnP services on router, no change

22:28 restarted Plex service, CPU drops back down

by 23:00 I’d had half an hour of much lower CPU usage again, although notably not back down all the way to the idling state I was seeing on 5470, but much better

I’ll be leaving UPnP turned off for now, I only had it on because I’m lazy. Xbox owners, though, require it I believe, so this won’t be a solution for everyone. It very much looks like there’s some weirdness in 5488 and later builds with how it handles UPnP, even when the Plex server is told not to use UPnP and rely on manual port forwarding.

Sounds like you have a device on your LAN advertising as an IGD and not complying with the specfication (XML file).

You had not offended me.

My request to try PMS free and clear of docker removes the layer created by Docker. When dealing with abstration layers and additional runtime libraries, anything is possible.

In this case, an incompatibility between two runtime (binary) libraries can happen. I’ve seen it many times. My request to you was to a step to minimizing the variables in play. Nothing more.

I am very direct at times when deep in thought and problem-solving mode. I apologize if I seemed harsh or offended. Had I been offended, it would have been obvious :slight_smile:

1 Like

This problem isn’t Synology specific. It’s now happening on my Arch server. Plex Media Server is running full throttle on one core. If I disable UPnP on my router, the problem goes away.

1 Like