Optimize Plex Server Configuration

Server Version#: 1.31.3.6868-28fc46b27
Player Version#:

I’m trying to optimize the performance of my Plex setup. I have a PMS server with …
Ubuntu 22.04
Intel Xeon E5-1630 v4 3.7GHz 8 core CPU
96 GB RAM
NVidia P2200 GPU
SSD with OS installed
15TB 7200 RPM HD w/ media files
GB network

Roku 4 & Ultra models on all TVs, all network hardwired
Plex clients set to Forced Direct Play so no transcoding happens

Ubuntu has a tmpfs partition, 64GB mounted on /tmpfs, Plex Transcoding set to /tmpfs/Transcode & I created a plexmediaserver systemd override file, Environment=“TMPDIR=/tmpfs”.

Is there anything else I can do to optimize my setup?

Is there something specific you’re having problems with, or are you just looking to max things out in general? I see you’ve got clients set to Forced Direct Play, are you looking to stay like this, or is part of your question about enabling transcoding?

If you don’t mind, could I make some observations, and drop in some thoughts? And for the record, I’m no expert on this topic (PMS/Ubuntu/Linux), so take everything with a fist-full of salt :wink::rofl:

Having such a spec’ed server, I’d expect it to be used for transcoding :man_shrugging:? Otherwise it’s very overkill IMO :man_shrugging:

  • Forced Direct Play
    – You don’t really need the GPU
    – tmpfs isn’t really needed if you’re not transcoding
  • RAM
    – That’s quite excessive, or should I say “over provisioned” (:blush:). For reference I can run on 8gb, with RAM transcoding, and things are all good. I do run some other services on my server like Jellyfin and Tdarr, so currently I have 16gb of RAM.
  • /tmpfs
    – I don’t know enough about the difference between this and /dev/shm/, but I just added “/dev/shm/plex” to my transcoder settings in the PMS GUI, and didn’t touch systemd. shm is only allowed to use “up to” half of your ram :man_shrugging:(which may be safer as it’s cant use all your ram?). Also, adding the extra /plex at the end means I can use the same location for Jellyfin transcodes also.
  • Single HDD
    – Depending on how many concurrent clients you have streaming, you may need to look at changing this for some form of RAID :man_shrugging:

Anywho, in general, I’d expect this server to rock along without issues, and be good for transcoding :man_shrugging:

Your server is massive overkill then - you’d be just fine with a raspi server

/dev/shm is a tmpfs device. I’m just creating 1 mount point at /tmpfs…

I was hoping for a response from @chuchpa since he seems to be very Linux oriented.

I also run Jellyfin server, and jellyfin clients on the Rokus.

I’m just trying to make the fastest responding media server I can with what I have.

/dev/shm and tmpfs aren’t technically the same, but similar :wink: (e.g. one is limited to 50% ram usage). Since you’ve got Jellyfin, altering the transcode folders, so you also have a subfolder for Jellyfin and Plex, is a good idea. I found out the hard way they the can conflict otherwise

There isn’t much you can tweak as such in PMS. Jellyfin has lots of customisation that affect performance. So the only thing thing you can really alter is hardware changes/tweaks :blush:

Switching how your media is stored will make things more snappy, but only depending on how may users/clients you have :man_shrugging:

Just as an example, nothing more: when PMS’s transcoder starts, it always tries an “intel” transcode 1st, then attempts Nvidia. There’s no way to alter this, so there will always be small delay when starting a Nvidia transcode. So there could be a way to make things more snappy, but it’s out of our hands :man_shrugging:

Since 99% of my media is h264 or h265, Direct Play works on all the Rokus on the clients, there’s really no transcoding happening.

I’m just trying to minimize the spinning circle when something loads, or I fast forward. I find Jellyfin feels more responsive than Plex, just trying to get the fastest Plex that I can. I’ve been spoiled with a DirecTV DVR for 20 years, when skipping forward DirecTV displays the video immediately, no matter if skipping 10 seconds or scanning. It would be so nice if Plex offered the same experience. Maybe I should open a new tpoic in Feature Requests for that.

1 Like

“Making things more snappy”, ok I see where you’re going here :wink: I know you mentioned Jellyfin before, it’s running on the same server as PMS isn’t it (just checking)?

I’ve not fully tested Jellyfin as of yet. It’s been up and running for a few months, but I only ever intended it to be

  • a backup for when/if Plex is having (cloud) server auth issues and I can’t log in properly from my Android TV
  • 2nd DVR system to test if it works better the PMS
  • just because I can :rofl:

Jellyfin has felt a bit quicker, sometimes, but without more testing (from me), I just put this down to either (a) transcoding, (b) directplay + codecs being slower at the client end. Only because it’s sat on the same server so it’s not a hardware “thing”.

One thing I don’t know anything about is the simple “how much data gets buffered by the client before it’ll resume playing”. I get the feeling that the client on Plex just wants to wait a little longer for more data; especially with it auto-bandwidth function, since it’ll need a good amount of data to check if things are up to muster :man_shrugging:

Also, I know that on Android devices, the client app has an option of ‘enable i/o cache’. There’s not a lot of documentation about this, but might with worth trying to adjust the setting to see if it helps. Though I don’t know if this is available on the Roku :wink:

For what I can tell, from a quick a dirty test I did (now :astonished:), the client is defiantly holding on for more data before it starts to resume playing something. Using a 4k film, direct-play, I can see the NIC stats from PMS dashboard rocket up for a few second before the client starts to play. And just as it starts to play, you can see the graph calm down and just intermittently send data. This isn’t scientific as there will be many delays in getting bandwidth data out to a web gui :rofl:. The same goes for looking at stats on my PC, where I’ve using the Windows Plex Client; I can see a big hit of data come in, and just as the video resumes play, the bandwidth usage drops and it just bursts after that. Again, my assumption is it’s buffering more data than say Jellyfin :man_shrugging:

Long story short, I’m inclined to say its the clients buffering up before it decides to play/resume :man_shrugging: Maybe it could be something for Plex to look into, maybe an option in the client to bypass or shrink the amount of data in needs to cache?.. That’s if my hunch is correct :man_shrugging:

What I will say is, your server is way over-spec’ed, which is no bad thing, and there isn’t a great deal you can do… If both Jellyfin and Plex were slow to respond to skipping/pause/resume, I’d be inclined to say “change how you media is stored”… You mentioned about requesting a feature, you could go the whole hog and record and evidence the speed/rection differences between Jellyfin and Plex? Then you could put a case together for it? Again, they (Plex/Jellyfin) are two wildly different pieces of software under-the-hood, so it’s not a fair apples-to-apples comparison. But I do concur that skipping, in Plex, even on Direct-Play can be slow :man_shrugging:

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