Plex in LXC container

Wanted to query folks on how anyone else has an LXC container setup for Plex.
I’m asking in terms of CPU usage. Currently have a PVE server setup with a number of different VMs and decided to test out Plex in a container. Have everything setup fine it seems, added CIFS shares and moved media over to the new plex server.
But I started out with just 4 CPUS, tried to transcode a movie to a remote web browser. seemed to work fine but I noticed the CPU was getting into the high 90% range. bumped up the CPU count to 8, then 12 then 24 then 32. it seems to eat up whatever I give it.
The R640 server it’s on has 64 CPUs listed and the VMs I have are barely sipping 2% of that. so it’s not that I can’t give the plex container more but I’m wondering what have people limited plex to in terms of resources.
I had plex running on a W11 machine, Dell 7060. was doing ok but have noticed over the past 2-3 years it will randomly close out of plex, need restarting etc. will probably aim to migrate everything over to the plex container if it’s working well. why not use the resources I have.
Only caveat I’m curious on is if people advise that running this back on bare metal (i.e. wipe windows on the 7060 and put Ubuntu with Plex on it would be more beneficial.

I have a PMS test box (Beelink S12 Pro) which I use to help folks
To setup the PMS lxc, I used the tteck helper scripts (was recommended)
I don’t know proxmox well enough to do the setup w/ gpu passthrough myself

What I have works extremely well

This is an active transcode, with tonemapping, and Dolby audio conversion on the N100 CPU.

For comparison, this is PMS, in a container on Ubuntu 22,04, playback of the same movie shown above.

I also use LXCs exclusively now instead of VMs

I am an entirely Linux shop here. The closest I get to windows is Windex & paper towels :slight_smile:

LXCs run as fast and efficiently as native bare metal Linux


My advice ?

  1. If you’re proficient with Linux command line, install and run Ubuntu Server and the machine will be (mostly / always) headless, that’s the best with the least CPU lost to GUI overhead / bloat.

  2. Otherwise, run Ubuntu desktop

I’ve written the installer to be accommodating.

If you want to customize where the PMS metadata is stored, or other values, you can do that by setting up a Systemd override.conf file

Awesome reply, thank you!
Had to chuckle pretty good at your Windows pun. love it.
This poweredge server is using two Xeon Gold 6130 procs and when I looked on the Intel site I can’t see anything about a GPU factor for it. So I figured the high CPU usage was simply due to that. It’s having to handle everything at that level versus offloading it.
But that was kind of the mindset I have an asking about this is if it will simply eat up as much CPU as I can give it, if there’s a limit that people have given or set so that it doesn’t start affecting other things on the server. I hadn’t had Plex in mind for PVE since I remember how much CPU it ate on an older server vs a i5 or i7 I was comparing it to. so this was just an idea to mess with it in PVE. main goal was to replace an r710 that was showing it’s age and that was just for VMs.
The flipside is like I mentioned, wiping the Dell OptiPlex unit and installing Ubuntu onto that one since it can use Intel Quicksync for GPU processing. I am not an expert with Linux CLI but can usually get the basics down. it would seem in comparison to the windows side there is far less to worry about with 1, a server CLI/headless setup and 2, hardly any need to mess with it. if I can ssh into it via a vpn and adjust what is needed for the machine itself after managing the plex stuff via the web interface, then cool.
The R640 obviously has the power factor but it would seem the 7060 has the efficiency factor.
Only have one main TV with an AppleTV hooked up. Second TV with the plex app instealled. have another ATV at the in-laws place for when we stay up there for the weekend but either way it’s usually only one device that would be actively streaming whether vis transcoding or direct play and only one move or show at a time. two at the max (at this time).
If faced with a similar situation, which route would you go?

I have several i7-8809 (Skull Canyon - NUC8-i7-hvk) machines and a TVS-1282 (QNAP) with i7-7700. Both do great with the hardware and now both are HEVC encoding capable. (recent PMS release)

Local structure here:

  1. LAN is all 10GbE for a few years now.
  2. Main is DIY: X10SRA w/ E5-2690v4 256GB ECC, X710-T2L , 12x12TB HDD RAID 6 XFS on 9670-24i controller, – and a P2200 for Plex.
  3. Workstation is NUC12-DCMi9 full with RTX2000 Ada Gen
  4. 3x NUC8’s for LXC Plex testing (different distros on various LXCs)
  5. Storage image backup is the QNAP (8x 20TB drives)

All said & done, 5 NAS boxes, 8 compute boxes, and about 20 LXCs


In Linux, GO WITH WHAT YOU KNOW – OR CAN QUICKLY MASTER :slight_smile:

You can install SSHD on the host so you can remote CLI into it

Consider:

  1. Ubuntu workstation – “Minimal” option – everything you need except bloat
  2. YOU control the partitioning (don’t let it make a huge blob in one partition)
    – 1 GB for UEFI ( /boot )
    – 128 GB for root ( / )
    – 64 GB for swap
    – Remainder for home ( /home )
  3. Install ssh package (for remoting into it)
  4. Install nfs-common ( NFS package to get the media )
  5. Install Plex
  6. Install other packages / tools as needed

What would I go with?

I would go with what I’ve detailed above.

PMS with Intel Core CPUs (-7xxx or higher) will now do
– HEVC HW transcoding & encoding
– HW subtitle burning
– EASILY do 2 simultaneous transcodes. An i3 should do at least 3
(My N100 can do 4)
– Depending on your media count, probably a 1-2TB SSD with at least 600 TBW. A “Pro” SSD will last much longer. The longer the better in this case.

I would run this on bare metal

I would move, using a systemd override, to put Plex metadata in /home partition.
Reason for this is to allow you freedom to change distro version WITHOUT losing your PMS installation ( /home can be preserved when reinstalling the OS )

INFO: I have 3 TVs but use the Nvidia Shield Pro (2019) as the player… My LG C1 can and does a beautiful job when I run the native Plex app. However the transcoder does get involved to remux the content to stream in the format it wants.

Have I answered everything?w

oh yes, very detailed answer. I think I’ll go down the Linux hole and see how that goes. but I’ll probably keep the Windows setup as a backup just in case.

Thanks again for all the great info!

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