Server Version 1.24.4.5081 (latest Beta)
General Version 4.63.0
I’m running Plex as a virtual machine, win10 21H1, latest updates, the host server is WinServ2019.
The server it’s running on has dual Xeon CPUs w/ 14 cores each for a combined total of 56 logical processors.
The virtual machine is set to take advantage of all of them.
Plex transcoder is set to ‘make my cpu hurt’.
From time to time plex server just goes away, nothing in event viewer, but it’s gone from task manager details. It leaves behind a ‘plexscripthost’
I recently built a new VM and transferred the plex server to this as a test to see if it was something in the OS. Same problem.
I have to kill the plexscripthost, start plex server, refresh the player and then it resumes normal operation.
I had a theory, maybe plex wasn’t liking so many processors. So I adjusted the number in the virtual machine settings down to 8 and played a movie. No issues. Upped it to 16, still no issues. Upped it to 28 (1CPU) and have watched an entire movie at 1080p w/ no issues.
I think what this is telling me is that Plex Server is not happy with dual CPUs.
Does anyone have any insight into what’s wrong and if there’s anything I can do about it?
So I set it back to 56 logical processors and the VM reported 2 sockets (2 CPUs). The problem resumed.
Then I shut it down and went into the VM settings, set NUMA maximum processors to 56.
Fired up the VM again, it reports 1 socket and 56 logical processors. Fired up half a dozen streams and it pegged out all 56.
Been running 2 days now and Plex Server has not crashed. Whatever the problem is, it does seem to be related to dual CPUs.
I do still get an interrupt when I pause the movie and go away for a while (Chrome client), It plays for about 60 sec, then I get spinning ball.
An F5 refresh and login fixes this and it will continue playing w/o having to mess with the Plex server. ie: Plex Server is not crashed.
Hyper Threaded cores are not the same as physical cores.
I would recommend disabling hyper-threading then you will have a working set of 28 cores.
Of the 28 you should reserve 4 for they hypervisor, that leaves you with 24 cores for your Windows 10 VM, again that’s assuming that you have no other workload/VMs on your machine.
For performance tuning of the transcoders I recommend setting processor affinity so that the main plex process has an affinity reservation across the first four virtual cores, and so that the transcoder processes have affinity of the remaining 20 cores. Process.ProcessorAffinity Property (System.Diagnostics) | Microsoft Docs
With 20 transcoder threads you should be able to support 10 concurrent transcoding sessions (audio & video) you may be able to get more but you will need to performance test.