Plex Media Server Docker hogs CPU

Server Version#: Docker - version.txt has:

version=beta
plex_build=linux-x86_64
plex_distro=debian

With the help of @ChuckPa I was able to change my PMS from a Synology app to a Docker container. Things seemed to have been running smoothly. Then I noticed a spike in CPU usage and started capturing data.

It has since settled down to around 50% CPU but even that seems high. I only have one person streaming at this time. I thought that using a Docker container would allow me to use the hardware transcoder in my Synology DS1019+ but this seems to instead being taxing my CPUs more!

Why would this one user tax my system that much?

@adefaria

Is the user burning subtitles ?

If you’re able to transcode normally otherwise until this instant, the most likely cause is subtitle burning.

Synology CPUs are VERY weak. Burning subtitles into high bit rate video will cause huge (pegging) load.

Which version of PMS is reported in Settings - Server - General please ?

Server - General reports Version 4.76.1

Subtitle burning? What’s that? This is a remote user who is not very sophisticated and IIRC she was watching a program that was in English and she’s a native English speaker. I don’t think she was doing any subtitling at all.

Can a remote user cause subtitle burning on my server and thus cause such high usage? Is there a way to turn off that capability?

BTW, how would I verify that I am indeed using hardware transcoding?

Please verify your Plex Media Server version.

4.76.1 is the version of Plex Web.

Check the Plex Media Server version at SettingsServer_Name → General or your list of Authorized Devices.

You would see (hw) on the Plex Dashboard. Transcoding is a two step process: The video is decoded from the current format, then encoded to the desired format. Ideally, hardware acceleration is used for both steps.

Example: The first (hw) is for decoding the video, the second for encoding.
hw-accel

It is not always possible to direct play or direct stream subtitles. Sometimes they must be incorporated into the video stream, becoming part of the video frame. This is called “burning” subtitles.

Subtitle burning uses the CPU, even when hardware accelerated transcoding is in use. Due to the weak CPU in Synology NAS, this generally results in high CPU utilization. The end-user may also experience buffering if the CPU cannot burn the subtitles in real time.

Plex clients vary widely in their ability to handle subtitles. There is no master list of subtitle capabilities across Plex clients. However, in general:

  • Enabling SSA/ASS subtitles results in subtitle burning on almost any Plex client. The Plex desktop apps seem to handle SSA/ASS without requiring burning.
  • Enabling image subtitles, PGS & VOBSUB, on Plex SmartTV apps results in subtitle burning.
  • If the audio is transcoding, enabling any subtitle on Plex SmartTV apps results in subtitle burning.
  • The Plex Android & Android TV app will play PGS/VOBSUB/SRT subtitles w/o burning. SSA/ASS subtitles are still burned into the video.

Yes. Any user, whether local or remote, can cause subtitle burning by enabling subtitles that match the conditions mentioned above.

No.

Technically, you could disable video transcoding, but that is not feasible for most people. No transcoding means no subtitle burning. However, if the video needs to be transcoded due to bandwidth limits or other non-subtitle related reasons, Plex would simply refuse to play the video and the user will receive a (somewhat vague) error message, “the server is not strong enough to convert the video.”

PMS Version 1.25.6.5577

Re: (hw) in the Plex Dashboard. Thanks. I’ll look for that.

Re: Subtitle burning - Again, I really don’t think this user was requesting subtitles in any form. They are using BRAVIA 4K GB ATV3.

Q: How do you enable/disable SSA/ASS subtitles?
Q: How do you enable subtitles for PGS & VOBSUB?

Again, I really doubt that this remote user is trying to use subtitles at all. In fact, I don’t think she even knows that subtitles are a possibility/option. I’ve used subtitles. I have a Vizio TV but I’m also the PMS owner and my TV and PMS are hardwired so I don’t think I need to transcode often.

I also know that some of my users have used subtitles in the past but I have never seen such a violent over-demand of CPU from remote users. It could happen as I don’t monitor the PMS CPU usage like a hawk.

Is there something on my end that I can do to verify that this subtitle burning is happening when I see the CPU usage spike on PMS?

@adefaria

In the player settings, for Subtitles → Set to Automatic.

If they are set to Always burn , you will always get subtitle burning.
If set to “Only Image Formats” then PGS, VOBSUB, and DVDRIP will be burned

Note: Some clients word this differently.

So to be clear, on my friend’s BRAVIA 4K GB ATV3 I need to locate the settings and set Subtitles → Automatic or Only Image Formats (speaking of which I don’t think I have any PGS, VOBSUB, or DVDRIP files).

Sidenote seems odd that a client setting that is apparently defaulted to a value that could tax the remote server that much. Most of my users have no idea that their clients even have settings!

when you see your server being hogged,

  1. Look at what’s playing.
  2. Go to those titles in your library
  3. Hover on the poster → Click the ellipsis → Get Info.
  4. Look for subtitles.

Folks often have embedded subtitles they didn’t know they were carrying

@adefaria Based on the Plex Dashboard screenshot in your first post, you are not using hardware accelerated transcoding. If you were, you would see (hw) in the video transcode section. Transcoding using the CPU, instead of the GPU, will also make CPU utilization spike, no matter what is happening with subtitles.

In Settings → Transcoder, make sure you have:

  • Disable video stream transcoding = NOT selected.
  • Use hardware acceleration when available = selected
  • Use hardware-accelerated video encoding = selected

Also, review Synology FAQ 28. Using Docker for HW trancode & Tone Mapping - How To.

Make sure Plex Docker can access the GPU in the Celeron processor: --device=/dev/dri:/dev/dri \.

Reviewing your prior conversation with @ChuckPA may also help.

I do have device=/dev/dri:/dev/dri set. What I didn’t have set was Use hardware acceleration when available was not selected.

@ChuckPa I looked at that episode’s info and didn’t see any mention of subtitles. Perhaps this must be done when the server is being hogged. As I said though, this is the first time I’ve seen the server being hogged like that. And assuming I now have hardware accelerated transcoding hopefully properly configured I may not see this issue again. I’ll keep my eyes opened.

In the client settings turn remote and local quality to maximum or original. This is the most likely cause for the transcoding which is rarely needed to begin with unless your internet is slow.

What are client settings? Which client? Where do I find these settings?

Also wouldn’t turning up the quality possibly cause more transcoding not less? Finally, when you say “your internet” do you mean my upload speed or a remote user’s download speed?

Need some time in the support articles.

Client settings for Android

What is your internet upload limit?
What is your friends internet download limit?
Do you have an upload limit set?

I was just trying to understand if you meant on my, server, end, or at the remote user’s, client end. I have no idea what settings they have set. I don’t have an Android TV, I have a Vizio. Is BRAVIA 4K GB ATV3 an Android TV?

On the server-side, I have Internet upload speed set to 9 Mbps (Speedtest.net says 37 Mbps but that is from my desktop, not the Synology. My desktop is connected via WiFi but the Synology’s wired into the router. I think the upload speed could be increased somewhat). For now, I guess I will set it to 37,

Limit remote stream bitrate is set to 4 Mpbs. Should I up that? To what?

Yes, the BRAVIA uses android tv and unfortunately you have to change each client in additional to allowing the server more bandwidth for sending.

If the goal is for your NAS to use a little CPU as possible then opening the transfer path as much as possible will eliminate one of the reasons it might start transcoding. A TV show usually tops out at 12Mbps so you should be good setting it to 30Mbps, remember that it will be shared with all remote clients. In the first post the picture says 2Mbps so that could be the client restricting the connection of remote connection via relay so once you get the client settings opened up you will have a better idea.

Look at the Plex Dashboard screenshot in your first post.

Each Plex client (SmartTV app, Roku app, etc) has local settings that can be accessed and changed only on the client itself. They cannot be configured remotely, “pushed” from the Plex server, etc.

How to access settings, what each setting means, etc is in the Plex documentation / support articles linked above.

No. Lowering quality/bandwidth leads to transcoding. Plex tries to play media at its original quality. Plex transcodes when needed to fit a quality/bandwidth limitation or due to a compatibility issue (ex: client does not support a certain audio or video format).

Read the Remote Access & Server Settings documentation and the Remote Access server settings, and Plex client support articles.

There are bandwidth settings on both the server and the client that should be reviewed and set appropriately.

Everyone’s setup (server, Internet access, etc) is a bit different. The default settings in Plex generally work, but may not provide the “best” overall experience.

It will take some trial and error to find the optimal settings for your setup.

This is the trial and error part. You may have to adjust it over time, especially if you have multiple simultaneous remote streams.

Try increasing it to a higher setting, see how things work. Adjust as needed. You might try setting it to Original just to see what happens.

The Internet upload speed setting takes precedence, so Plex Media Server will transcode if needed to keep the stream under that limit.

You should have your friend adjust the settings on their Sony TV as well. The Plex client default settings for remote streaming is 4 2 Mbps. Try setting it to Maximum/Original.

As mentioned, expect it will take some trial & error to find optimal settings. Also, remember there is no guaranteed bandwidth on the Internet. Your uplink speed might be “X” Mbps, but that does not mean remote users can reliably stream at that speed.

Example: My uplink speed is 30 Mbps. A friend across town has 100 Mbps downlink speed. However, the routing between our ISPs is quite poor. She can reliably stream from my server at 6 to 8 Mbps. We had to lower the remote bandwidth setting on her devices to avoid buffering.
Another friend several hundred miles away has no such issues. Their ISP has a better interconnect with my ISP, so they can stream at a much higher rate (and quality).

It’s a shame that the remote clients need to set this themselves. I’m working with very tech-unsavvy people here and it’s hard to get them to change things (hell it’s hard to get them to report things!) because they fear they will break something. This particular user I’m often over her house so maybe I can get in there and tweak the settings.

I got hardware transcoding working BTW. I simply streamed something to my own TV then changed the resolution to force it to transcode.

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