Plex not using the full CPU's potential

This is very much out of my comfort zone as I’m a windows guy… So I don’t know if this is a thing (and surely will not be able to assist) but are you sure about your CPU allocation in regards to the docker configuration?

Yes, when using multiple 4K streams I can easily get it to cap at 100%

Even when I have multiple streams, they all seem to be stuck at 0.8 transcoder speed while there’s 30% idling on the server

To put it simple: Certain tasks cannot be split across multiple cores. Your 32-core CPU has a PassMark score of 47000 – that’s huge, however it’s based on using all cores. For a single core that only adds up to ~1800 (which is barely enough to deal with a 1080p transcode)

Plex will make use of as many cores as it can/needs at a time (still searching for a post breaking this down in detail… I’ll link that once I find it). However, the cores it can utilize on their own aren’t powerful enough to deal with that 4K video of yours.

It just seems like every stream is capped to 8 cores, which isn’t enough for some of the content on my server, 1080p streams transcode at 10 times playback speed, and 4K stuff at 0.7-0.8 times playback speed

So would a CPU with higher single core speed be better? A 5950x for example, I decided on the 7502P instead because of the higher overal rating and support for more RAM (5950x is capped to 128GB)

It’ll come down to what your server needs to transcode… from what I could find, h264 and h264 codecs will use multiple cores, while vc1 is only able to use a single core. Same for the audio tracks… while most audio transcoding is “relatively” lightweight and common codecs support multi-core transcoding, some of the more modern ones don’t and need a hellish amount of CPU to transcode (e.g. EAC3). All subtitle transcoding is generally 1-core.

TL;DR: single-core speed is your critical factor.
The A 5950x isn’t that much more capable when it comes to single-core performance (total passmark score is approx. the same w/ half the cores… still only delivers approx. 3800 per core).

Well yes, but if it’s limited to 8 cores, 1800 * 8 = 14000, while 3800 * 8 = 30400, which is double the value which means it should be able to keep up with the content I’m transcoding.

I’m not quite sure what you mean with vc1. The video I’m transcoding is in HEVC with audio in TrueHD with 8 channels (7.1 layout)

“However, the cores it can utilize on their own”

Can you explain what this means? “Utilize on their own”? What is the limiting factor? codec? and is this a Plex or a ffmpeg limitation?

it’s about the codecs and if they’re capable to use multiple cores (and if so… how many).

VC1 is just another codec that’ll occasionally come with a BD remux.
Transocding TrueHD audio can be quite CPU intensive.

Are there any codecs that can use more than 8 cores? I’ve tried a few on my server and none of them go above that

Sorry, I’m not aware how many cores each codec will be able to utilize.

I suppose I’ll switch to the 5950X for now, thanks for all the help ^^

First I would take Plex out of docker to see if that makes a difference. If not then look at NUMA controls, the architecture of the EPYC processor takes tuning to make use of all the cores.

EDIT: Also your test example is a worst case scenario, everything was transcoded audio, video and graphic subtitles with HDR tone mapping.

Plex isn’t limited by Docker, I can easily cap the CPU to 100% with 10-12 4K transcode streams, it’s that a single stream seems to be limited to 8 cores. And yeah it is worst case, but it still used 8 cores.

So the bottleneck is what Plex uses to transcode (FFMPEG iirc?), although I’m no expert in all of this I would’ve assumed Plex can use more than 8 cores for one stream, that’s why I got the 7502P as well

Stumbled upon that topic a month later, but I think you’re looking at this from the wrong angle.

You should not be trying to software transcode 4k videos in the first place, hardware transcoding is much much more efficient for that task.
You don’t even need a discrete GPU either, 4 year old coffee lake Xeons with iGPUs and quicksync are out there transcoding 4k with <10% cpu usage. You def don’t need an epyc or a 5950X if all you’re trying to do is transcode 4k videos on plex, just a big waste of money (and of a good CPU), you’re using a sledgehammer to crack a nut.

So I’d suggest you look into hardware transcoding instead, you’ll get much faster transcoding, at a fraction of the power draw and cost. Just my .02

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.