Jump to content

Plex: Guide to Moving Transcoding to RAM


Recommended Posts

On 12/15/2023 at 10:17 PM, craigr said:

 

My go file PLEX lines:

 

#Limit PLEX Transcode RAM Drive Size
mkdir /tmp/PlexRamScratch
chmod -R 777 /tmp/PlexRamScratch
mount -t tmpfs -o size=32g tmpfs /tmp/PlexRamScratch

 

image.thumb.png.022f2d3f5777ea953665c964f5995fbf.png

 

image.thumb.png.743c30210d79b596401e05bafba12161.png

 

image.thumb.png.ffc33220609d5a7ad3256716be31db34.png

 

I do not have any extra parameters.  I am however using the Intel IGPU not Nvidia.

 

Good luck!

Thanks for the writeup, what about adding in a script to check every 24h for files older than 24h and delete them? I just checked my ram transcoding folder and indeed didn't clean up properly after the last transcode. 

Link to comment

so i'm trying to move transcode to RAM to see if it works better like everyone says.  im using the below documentation to do the settings.

 

https://github.com/binhex/documentation/blob/master/docker/faq/plex.md

 

however, everytime i change and apply the settings the entire plex container disappears from the docker.  i have to change the settings back to my ssd for transcode for it to reappear and work again.  is there something i'm doing wrong or missing?  i have transcode settings in plex set to /transcode even after i change the container settings.

 

any advice is appreciated.

Link to comment
29 minutes ago, trurl said:

post

thank you for this.  i will try again after i do a full backup of the appdata section.  i want to make sure i have the pms db backed up before trying to change the paths again, then i will run all logs to post.

 

appreciate you.

Link to comment
  • 4 weeks later...

Forgive me if this has already been asked, but when transcoding in the RAM, should you see (hw) for transcodes? I have everything configured as the guide suggests but no extra parameters, and no GPU. My CPU is 2x E5-2697v2's (no iGPU). When I do a test transcode it just says transcoding, without the (hw). I am a PlexPass subscriber, on the latest PMS, and my transcode directory is set to /transcode which maps to /tmp/PlexRamScratch (using the go file posted).

Link to comment
14 hours ago, thisguyneedsabeer said:

but when transcoding in the RAM, should you see (hw) for transcodes?

doesnt matter if RAM or disk, hw transcode means GPU usage ,,,

 

14 hours ago, thisguyneedsabeer said:

and no GPU. My CPU is 2x E5-2697v2's (no iGPU).

so, if you dont have any GPU (like a NV, AMD, ...) used for transcoding, and no iGPU ... hw do you expect to use hardware transcoding ? ;) when there is no hardware to transcode ... ;)

Link to comment
On 4/18/2024 at 3:45 AM, alturismo said:

doesnt matter if RAM or disk, hw transcode means GPU usage ,,,

 

so, if you dont have any GPU (like a NV, AMD, ...) used for transcoding, and no iGPU ... hw do you expect to use hardware transcoding ? ;) when there is no hardware to transcode ... ;)

That's what I was asking; does RAM count as hardware transcoding or is hardware transcoding strictly locked to iGPU/GPU?

Link to comment
6 minutes ago, thisguyneedsabeer said:

That's what I was asking; does RAM count as hardware transcoding or is hardware transcoding strictly locked to iGPU/GPU?

hardware transcoding means you transcode via gpu accel ... has nothing todo with RAM ...

 

moving transcoding to RAM is meant to prevent teardown from a disk ...

Link to comment
  • 4 weeks later...
On 3/20/2024 at 3:39 AM, 10bn said:

Thanks for the writeup, what about adding in a script to check every 24h for files older than 24h and delete them? I just checked my ram transcoding folder and indeed didn't clean up properly after the last transcode. 

You know I've had this setup for a while and only recently users started reporting the "disk space" error. Every time I go in, the RAM transcode is full and not auto-clearing. Still haven't found a good fix or root cause (unless it's a bug that plex introduced sometime in 2024). 

Link to comment
  • 3 months later...

I've noticed Plex is using 14.79GiB / 31.19GiB this morning when the last play was a few hours ago. This is the highest usage I've seen.

 

/data/mnt/user/Media Library/
/config/mnt/user/Docker/Plex-Media-Server
/transcode/tmp

 

--mount type=tmpfs,destination=/tmp,tmpfs-size=4000000000

 

I thought the above would limit RAM usage for transcoding to 4gb. I'm just confused as to what's happening to cause almost 15gb usage in Plex from what should have been direct play over three hours ago.

Link to comment
1 hour ago, Pandemic said:

--mount type=tmpfs,destination=/tmp,tmpfs-size=4000000000

 

you shouldnt use /tmp as its a default tmpfs ... so prolly already existent when you trigger it ;)

 

rather name it like /plex_temp and set your mount to there ...

Link to comment
2 hours ago, Pandemic said:

I'll report back with results. thanks!

you can always check in the terminal ... sample for /tmp

 

root@AlsServerII:~# df -h /tmp/
Filesystem      Size  Used Avail Use% Mounted on
rootfs           16G  1.5G   15G  10% /
root@AlsServerII:~#

 

which is already mounted per default with 1/2 RAM usually

Link to comment
8 hours ago, alturismo said:

you can always check in the terminal ... sample for /tmp

 

root@AlsServerII:~# df -h /tmp/
Filesystem      Size  Used Avail Use% Mounted on
rootfs           16G  1.5G   15G  10% /
root@AlsServerII:~#

 

which is already mounted per default with 1/2 RAM usually

I was just coming in to mention the Plex container is currently using: 12.79GiB / 31.19GiB while there has been no transcoding activity for at least 8 hours.

 

df -h /tmp/ shows:

root@name:~# df -h /tmp/
Filesystem      Size  Used Avail Use% Mounted on
rootfs           16G  1.1G   15G   7% /

 

df -h /plex_tmp/ shows:

root@Arc:~# df -h /plex_tmp/
Filesystem      Size  Used Avail Use% Mounted on
rootfs           16G  1.1G   15G   7% /

 

Both look fine but the docker tab in unraid is showing more consumption and over the 4gb I thought had been set.

 

 

Link to comment
1 hour ago, Pandemic said:

Both look fine but the docker tab in unraid is showing more consumption and over the 4gb I thought had been set.

 

thats 2 different things

 

1/ plex consumption itself (can be up and down, while 12 gigs are pretty high ;))

2/ some tempfs for transcoding ... different value ...

Link to comment
10 hours ago, alturismo said:

thats 2 different things

 

1/ plex consumption itself (can be up and down, while 12 gigs are pretty high ;))

2/ some tempfs for transcoding ... different value ...

For sure but the docker tab showing 12gb was different than both /tmp and /plex_tmp was showing. Is it possible the container was using extra memory not allocated to transcoding?

Link to comment
2 hours ago, Pandemic said:

Is it possible the container was using extra memory not allocated to transcoding?

thats what i try to say, plex docker consumes RAM, more or less ... has nothing todo with your tempfs mount for transcoding or other existing /tmp dirs etc ... different story.

 

if you want to limit Plex RAM consumption (or any other docker) you can add a different extra parameter

 

documented here as sample https://docs.docker.com/engine/containers/resource_constraints/

 

as sample in extra parameter --memory=4000m will limit the docker usage to 4 GB RAM

 

but be aware that issues can happen ;)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...