Plex - Using RAM for transcoding? | PlexGuide.com

Plex Using RAM for transcoding?

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

stammbraeu

Experienced+
Original poster
Staff
Donor
Mar 21, 2018
112
42
Hi

I have been talking to one of my friends who is running a local plex installation -
he told me that using RAM as the location vor transcoding increased his speed

i'm using the setup of plexguide and transcoding happens in /transcode

Wouldnt it make sense to change it also to RAM for 2 reasons:
1. it should increase the speed as the RAM should be faster than the SSD
2. using the SSD to write every transcode should dramatically reduce the lifetime of the SSD

As i have 32GB of Ram and most of it is rather bored as long as i dont add 100 films in sab at the same time it should be no problem to use it

Any feedback on that?

All the best
Stammbraeu
 

pro_engineer

Experienced+
Staff
Donor
Feb 1, 2019
138
46
Unless you mean mounting a scratch disk in ./transcode ? 32GB doesn't leave a lot left for a scratch disk though
 

vFlagR

Experienced+
Staff
Aug 27, 2018
111
84
Strangely enough I was looking for exactly this information today too.

Luckily for you, the set up is already done. All you have to do is go into your Plex settings and change the transcode path to /ram_transcode

PG has set Plex up to mount /dev/shm (a linux ramdisk by default) as /ram_transcode so you don't have to worry about this.

One thing to note, don't do this unless you have spare RAM you're not utilizing. From my testing today you'll need a couple of GB of RAM per simultaneous transcode.

1580245461961.png
1580245499104.png
 
  • Like
Reactions: 3 users

vFlagR

Experienced+
Staff
Aug 27, 2018
111
84
Yep, just double check in Portainer that your Plex container volumes look similar to my screenshot above. As long as you have /dev/shm mounted as /ram_transcode then the Plex transcode location setting is the only thing you have to change :)
 
  • Like
Reactions: 1 user

Sheryars

Active
Feb 5, 2019
38
4
just wanted to ask a question with regards to ram transcoder temp directory . I have the EX61-NVme and it is setup like the picture above. I have some buffering issues regularly when users are around 15 and most are transcoding. How do I set up hardware transcoding as well on this server and is it wise to do hardware transcoding on it?.

thanks
 

peter2cfu

Noobz
May 26, 2020
2
0
I know this is an old thread but seems I ran into a complication, I'm using FreeNAS (FreeBSD) 11.3 their seems to be no reference to a ram drive at all, when googled I get nothing one way or the other, anyone know if this shared ram space exists in FreeBSD?
 

Datamonkeh

Data Hoarding Primate
Project Manager
Donor
Donor
Jan 20, 2018
834
387
Welcome to the forum :) You'll find pretty much everyone here runs Ubuntu/Debian PG installation either bare metal or VM. You can do this on FreeNAS. From memory tmpfs was the BSD way of doing things, but it's ben a long time since I messed with BSD. Also if you have nand based storage, it's a largely moot point in most circumstances.
 

peter2cfu

Noobz
May 26, 2020
2
0
Welcome to the forum :) You'll find pretty much everyone here runs Ubuntu/Debian PG installation either bare metal or VM. You can do this on FreeNAS. From memory tmpfs was the BSD way of doing things, but it's ben a long time since I messed with BSD. Also if you have nand based storage, it's a largely moot point in most circumstances.
Thanks, I have been looking at that seems it is used as default in FreeNAS just not sure if Plex uses it, had I known all the complications with FreeNAS I would not have gone this route, frankly, my windows system is far better for this task, but I learnt a lot, so be moving back to windows server 2016.

If anyone needs help with getting Plex working with FreeNAS I'm here, its a sweet setup but not worth the hassle if you want a performance system not to mention the very strict (none) raid requirement, I'm sure ZFS is very nice however I feel far more at ease with a hardware raid, not to mention the ludicrously slow raid rebuild time with ZFS.
 

Datamonkeh

Data Hoarding Primate
Project Manager
Donor
Donor
Jan 20, 2018
834
387
Instead of windows (which honestly sucks for Plex), why not have a look at running PG? Between the time you save vs installing/configuring everything manually, the agro saved from dealing with windows archaic transcoding limits and the built in ability to make use of unlimited cloud based storage, it's a lot better for automated media management.

FreeNAS and ZFS has it's advantages, but for local media storage UnRAID is just better suited.
 
  • Like
Reactions: 1 user

bretc

Experienced
Donor
Donor
Aug 8, 2018
64
16
Any thoughts on at what point it makes sense to use RAM vs CPU for transcode?
 

Datamonkeh

Data Hoarding Primate
Project Manager
Donor
Donor
Jan 20, 2018
834
387
Much like your VPS question, the answer isn't as simple as you're going to like. Transcoding to RAM only makes sense when you have enough spare RAM and are hitting or getting close to hitting your storage IO limits. For a server with symmetrical gigabit, that's easily doable on a mechanical drive and can be done on AHCI based SSD's, especially if you are using NTTP, but it can be easily managed with io nice settings in your NTTP client, with torrents it's a lot less IO intensive as no RAR/PAR work. Obviously if you're on a VPS and sharing that drive/array with others, it'll be a lot sooner than if you have a dedicated drive.
 

Datamonkeh

Data Hoarding Primate
Project Manager
Donor
Donor
Jan 20, 2018
834
387
I use imDisk Toolkit works perfect for this,byte my bites has a good video on youtube about this.
While that may work on Windows (see comment above on windows being an awful platform for Plex - even ByteMyBits has commented on this in previous videos), PG runs on Ubuntu/Debian with Plex in a docker, literally the only change that's needed to use RAM is the transcoder directory in Plex needs altering to /ram_transcode
 

bretc

Experienced
Donor
Donor
Aug 8, 2018
64
16
Much like your VPS question, the answer isn't as simple as you're going to like. Transcoding to RAM only makes sense when you have enough spare RAM and are hitting or getting close to hitting your storage IO limits. For a server with symmetrical gigabit, that's easily doable on a mechanical drive and can be done on AHCI based SSD's, especially if you are using NTTP, but it can be easily managed with io nice settings in your NTTP client, with torrents it's a lot less IO intensive as no RAR/PAR work. Obviously if you're on a VPS and sharing that drive/array with others, it'll be a lot sooner than if you have a dedicated drive.
I am currently on a VPS. I'm not using torrents, I am using NNTP. What do you mean in regards to "io nice settings"?
 

Datamonkeh

Data Hoarding Primate
Project Manager
Donor
Donor
Jan 20, 2018
834
387
It's possible to set io nice priorities in both SAB (see Switches > Post Processing) and GET (requires a script run prior to unpacking), this allows you to reduce the priority of disk IO for them so that even if you do hit your IO limits, other tasks take priority and your system is less likely to slow down due to IO limits, you can also limit cores used etc. for CPU for the same reason.
 

Datamonkeh

Data Hoarding Primate
Project Manager
Donor
Donor
Jan 20, 2018
834
387
For anyone else reading this, I believe he's talking about setting Linux Process Priority using nice and renice commands.
If I find an example of the script he's talking about, I'll also try to post it here.
You could do that if you wanted to, but as I clearly said, SAB has IO NICE (and NICE) variable fields under Switches > Post Processing. It even documents them in the wiki: https://sabnzbd.org/wiki/configuration/2.3/switches#ionice Get is slightly different, you could use a wrapper script as illustrated here: https://forum.nzbget.net/viewtopic.php?f=3&t=789&start=10#p6223 or you could set the variables via docker.
 
  • Like
Reactions: 1 user

bretc

Experienced
Donor
Donor
Aug 8, 2018
64
16

Recommend NewsGroups

      Up To a 58% Discount!

Trending