I’m running the Plex Server in a Docker container and detecting intros takes almost 100% of CPU (95.5%) as shown below (ps aux output from within the container). On the host is shows up as 25% as it’s a quad core CPU.
root 9128 120 0.1 51424 12532 ? R 20:41 0:02 /usr/lib/plexmediaserver/Plex Media Fingerprinter -raw -length 1929.8230000000001
The result of this is that the server becomes very unresponsive, often becoming completely unreachable.
Is there any way to improve this, either by limiting the process to lower cpu usage (maybe a “nice” setting?) somehow or by offloading the Transcode process to a different CPU?
I’ve searched the forum and saw other people are having similar problems but couldn’t find any good solution.
If you’ve only assigned 1 core to the container, then PMS can likely take up 100%. Skip Intro only works on the audio, but depending on the type of audio you have, this can still take a bit of time and power. Plex will try to finish the detection as quick as possible. I would recommend using at least 2 cores, that way the processing can be moved away from 1 core if you need the cpu for other tasks.
The docker container is actually setup to use all 4 CPUs if it needs to. What I think is happening is that long running skip intro audio tasks end up just running on one CPU and are maybe not multi tasked. If they run on the same CPU as the front end process it seems to block regular requests from getting in. At least that seems to be the problem here… Again, I think some sort of a “nice” value or another way of throtteling the CPU utilization a bit to let the front end catch up would help a lot.
That’s strange. If there are 4 cores and 1 is pegged, your OS should automatically switch to using the other 3 for other tasks and nothing should get blocked. I don’t believe Plex controls what core gets used, that should be handled by the OS.
I don’t think the OS can move a process from one core to another. So if it’s already occupying the CPU wher the werbserver process is running it will end up blocking that. At least in my setup it seems to be doing that very consistently. Especially when adding whole seasons this is an issue as it leaves Plex unusable for that time.
Again, I think a simple fix would be to either run the detection process with a nice setting or giving the CPU another option to catch up would be really helpful. There is already an option “Run scanner tasks at a lower priority”, why not do something similar for intro detection? I think it would solve the problem…