Simon Posted December 23, 2019 Share Posted December 23, 2019 (edited) So I created a 8GB RAM disk under /tmp/, set Plex to use it and kicked off a 4K movie in a Web Browser to ensure it was Transcoding. Monitoring the directory I saw it grow to 100% usage (about an hour into the movie) and then it emptied itself and has started growing again. I assume (dangerous I know) that it will continue doing this and that multiple transcoding streams will just cause this to happen sooner. I'll leave it like this for a while and monitor. Edit: Kicked off two transcoding streams (from 4K, which I'm impressed my system managed - see attached image) and my observation was that the usage grew to 8GB (100%) and then dropped to 4GB (50%). So it seems Plex might be dividing the available transcode space evenly between jobs and purging history once they fill their "allowance". Edited December 23, 2019 by Simon Quote Link to comment
1812 Posted December 23, 2019 Share Posted December 23, 2019 5 hours ago, Simon said: I'm playing around with this on my setup. I notice the Plex support site says: Wouldn't that be way more than 4GB? I think that use to be correct, but plex has gotten better at reading a RAM disk size. I use to use one exclusively until I started using the dvr, which needs a scratch disk the size of the recording (which is big for football games.) sometimes when setting up a RAM disk for the first time, plex may crash the stream filling it up, but then never exceeded it again. Sometimes it reads the size right the first time and there are no problems. Quote Link to comment
Walter S Posted January 5, 2020 Share Posted January 5, 2020 i'm confused I tried setting up my unraid plex container for ram transcoding, I'm seeing several ways of doing it. regardless what i do my cpu pegs at nearly 100% and and the memory bearly changes (when i watch my unraid dashboard). any suggestions, or is this normal. I'm running unraid v680 the latest plex docker AMD FX™-8320 Eight-Core @ 3500 MHz 32 gb ram Quote Link to comment
rxnelson Posted January 6, 2020 Share Posted January 6, 2020 I could be mistaken but I don’t think the two are necessarily related. The CPU being pegged suggests that a transcode is occurring. Your chip has an ~8000 passmark so it should work. Are you trying to transcode 4K or something?I’m thinking if the CPU is pegged that it would be pegged wherever your transcode location is. Quote Link to comment
Walter S Posted January 6, 2020 Share Posted January 6, 2020 Yes 4K local, I just swapped out the MB with a newer one 8 core AMD 8320 with 32 gigs of ram. I just thougth the ram would show more activity in the dashboard.. thanks.. Quote Link to comment
dnLL Posted January 6, 2020 Share Posted January 6, 2020 (edited) Not sure why I didn't read about this before but I've just set it up (takes 30 seconds to do) and tested it and it works perfectly. Transcoding a 1080p movie to 480p on a poor connection with the server's IGP (some Intel HD something integrated into my Xeon E3-1245 V6) and it took about ~30MB of space on the FS... which translated to +30MB of RAM used too. As soon as I stopped the playback, the files were deleted. I'll test it for a while and as long as Plex keeps deleting its transcoding cache, this should be fine. CPU is usually around ~120% when transcoding with the GPU (or like 12% in the webUI, it's a 4c8t CPU). Without GPU transcoding it would usually gobble all 8 threads immediately until it throttled a little bit. I added another extra parameter to the docker to make sure it never takes more than 75% of my CPU: --cpus=6. Edited January 6, 2020 by dnLL Quote Link to comment
AndyMcJ Posted January 16, 2020 Share Posted January 16, 2020 I think that people also need to take into account the difference in speed between RAM and SSD not just that SSD's wear out faster. The main benefit to a RAM drive is its increased read and write speeds compared to an SSD or hard drive. ... Running our own quick benchmark test using XBench on a Macbook Air showed that write speeds for a RAM drive were an average of 4.5 times faster than the built-in SSD and read speeds were 6.3 times faster Quote Link to comment
BenDibble Posted January 17, 2020 Share Posted January 17, 2020 I have been experimenting with this today. The transcode->tmp worked fine and Plex is operating without issue. I laugh however when I don't see a notable blip in RAM usage, but I have 192GB of RAM and two Xeon E5-2665 CPUs. I have a gigabit fiber internet connection, and it pisses me off when I see my users transcoding from 1080p down to SD because of their own slow internet. At least I know I am doing everything possible to make the sever side without impedance. 2 Quote Link to comment
JesterEE Posted January 18, 2020 Share Posted January 18, 2020 On 1/16/2020 at 9:27 PM, BenDibble said: I have a gigabit fiber internet connection, and it pisses me off when I see my users transcoding from 1080p down to SD because of their own slow internet. And they'll still blame you for "bad quality content" because they can't use the app right to increase the quality setting .... SMH 🤣. This is why I don't share my library (of Creative Commons content 🙃) with non-techies anymore 😋. Quote Link to comment
JesterEE Posted January 18, 2020 Share Posted January 18, 2020 (edited) On the fringe of being related, here is a forum post I made on the Plex forum in 2018 cataloging some of my experiences while working with a RAM drive on a Windows server. Plex does some really strange stuff under the hood. TL;DR: Don't waste your time ... unless you have lots of RAM and nothing better to do with it (*looks down as to not make eye contact with anyone here* 😉). https://forums.plex.tv/t/plex-transcoder-ram-drive-experience Edited January 18, 2020 by JesterEE Typo Quote Link to comment
Aerodb Posted January 30, 2020 Share Posted January 30, 2020 (edited) Hey all, I followed the steps and Plex seems to be running fine. I decided to implement this only to extend the life of my SSD, not the potential performance benefits. However, when i check my appdata share, I see the plex docker, and the transcode folder sitting on my cache disk. How can i verify this is actually transcoding to my ram? I have 32Gb of ram and dont see any delta now. Edited January 30, 2020 by Aerodb Quote Link to comment
JesterEE Posted January 30, 2020 Share Posted January 30, 2020 8 minutes ago, Aerodb said: How can i verify this is actually transcoding to my ram? SSH into your server, transcode something, watch to see where the files go. If they don't go into your /tmp directory you did it wrong. Quote Link to comment
Hoopster Posted January 30, 2020 Share Posted January 30, 2020 8 minutes ago, Aerodb said: How can i verify this is actually transcoding to my ram? What is your RAM transcoding location? /tmp? Just look in the path you have set for RAM transcoding and see if there is a Transcode/Sessions folder. When actively transcoding, files will be created in the Sessions folder. Quote Link to comment
Aerodb Posted January 30, 2020 Share Posted January 30, 2020 i havent ever used SSH so im not sure where to start with that. however, below is my docker config. Quote Link to comment
Hoopster Posted January 30, 2020 Share Posted January 30, 2020 2 minutes ago, Aerodb said: below is my docker config. In Plex, what did you set as the transcode location? You have two variables in your docker config which could potentially determine where transcoding takes place. You have a TRANS_DIR variable set to /config/transcode (your Plex appdata folder on the SSD) and another set to /tmp. Which container path did you specify in Plex (TRANS_DIR or /transcode)? You don't need both. Quote Link to comment
Aerodb Posted January 30, 2020 Share Posted January 30, 2020 1 minute ago, Hoopster said: In Plex, what did you set as the transcode location? You have two variables in your docker config which could potentially determine where transcoding takes place. You have a TRANS_DIR variable set to /config/transcode (your Plex appdata folder on the SSD) and another set to /tmp. Which container path did you specify in Plex (TRANS_DIR or /transcode)? You don't need both. in plex i set it to /transcode . pictured below. Quote Link to comment
Hoopster Posted January 31, 2020 Share Posted January 31, 2020 30 minutes ago, Aerodb said: in plex i set it to /transcode . pictured below. Then it should be transcoding in /tmp in RAM. You can open a terminal session from the WebGUI and do a 'cd /tmp' from the command line. You should see the Transcode/Sessions folder there. If Plex is transcoding you will see the transcode files there. Quote Link to comment
Aerodb Posted January 31, 2020 Share Posted January 31, 2020 14 hours ago, Hoopster said: Then it should be transcoding in /tmp in RAM. You can open a terminal session from the WebGUI and do a 'cd /tmp' from the command line. You should see the Transcode/Sessions folder there. If Plex is transcoding you will see the transcode files there. Thank you for this help. I have a final question. So I did check the web terminal my tmp/Transcode/Sessions directory. I See items in there. there are more items when i start streaming/transcoding a video. (labeled plex trancode....) Does this mean that anything in the tmp directory is always put into ram? I ask in case there are other optimizations i could make with other dockers the same way. Thank you in advance for the guidance. Quote Link to comment
Hoopster Posted January 31, 2020 Share Posted January 31, 2020 30 minutes ago, Aerodb said: Does this mean that anything in the tmp directory is always put into ram? The entire unRAID OS runs in RAM. Any path outside of /mnt/xxx (where user and disk shares reside) and /boot (flash drive) is going to be in RAM; that means /tmp or any other path you create. Quote Link to comment
Aerodb Posted February 1, 2020 Share Posted February 1, 2020 9 hours ago, Hoopster said: The entire unRAID OS runs in RAM. Any path outside of /mnt/xxx (where user and disk shares reside) and /boot (flash drive) is going to be in RAM; that means /tmp or any other path you create. Thank you for the break down. That definitely adds clarity. Quote Link to comment
Aerodb Posted February 7, 2020 Share Posted February 7, 2020 On 1/31/2020 at 10:06 AM, Hoopster said: The entire unRAID OS runs in RAM. Any path outside of /mnt/xxx (where user and disk shares reside) and /boot (flash drive) is going to be in RAM; that means /tmp or any other path you create. Hey folks, After switching to the RAM transcoding, I have found an issue that im curious if anyone else has come up against, and overcome.... I have the homerun HD set up to allow me to stream live TV to the plex server and DVR media to the server. My homerun has two tuners and I have been able to DVR two shows at once to the server. BUT now that media is transcoding to RAM, it seems to error on the second show. Showing not enough storage space. as if my 32gb of RAM is not enough for two 60 minute shows. these are 720i (not 720p) streams, should be more than enough ram space. Also, while this is happening, the RAM is never over 40% used. Any help,advice or guidance is greatly appreciated. Quote Link to comment
Marshalleq Posted February 7, 2020 Share Posted February 7, 2020 12 minutes ago, Aerodb said: I have the homerun HD set up to allow me to stream live TV to the plex server and DVR media to the server. My homerun has two tuners and I have been able to DVR two shows at once to the server. BUT now that media is transcoding to RAM, it seems to error on the second show. Showing not enough storage space. as if my 32gb of RAM is not enough for two 60 minute shows. these are 720i (not 720p) streams, should be more than enough ram space. Also, while this is happening, the RAM is never over 40% used. Any help,advice or guidance is greatly appreciated. This is why I disabled RAM transcoding and went back to doing it on an SSD. I have 128GB RAM, so it's not like I don't have options. I think what was happening is that the RAW stream of the show was very big and for some reason was trying to play a full copy in the ramdisk. I think I did validate at some point that's what it did (there's some commentary around it earlier in this thread I think). There needs to be a way to separate the two out and then it would work I suppose, but I didn't look into it much further - too many projects on at the moment. 1 Quote Link to comment
Hoopster Posted February 7, 2020 Share Posted February 7, 2020 (edited) 6 hours ago, Aerodb said: I have the homerun HD set up to allow me to stream live TV to the plex server and DVR media to the server. My homerun has two tuners and I have been able to DVR two shows at once to the server. BUT now that media is transcoding to RAM, it seems to error on the second show. Showing not enough storage space. as if my 32gb of RAM is not enough for two 60 minute shows. these are 720i (not 720p) streams, should be more than enough ram space. Also, while this is happening, the RAM is never over 40% used. I no longer have transcoding to RAM configured for this reason. It was fine for a long time with HDHomeRun recorded shows, but, Plex changed something recently with how transcoding works that requires a lot more RAM/disk space when recording TV shows. I would see the same thing if two overlapping shows were scheduled to record. The first one would record without issue and the second one would fail. I have 32GB RAM in my server. I think it has something to do with being able to playback, FF/Rew a show while it is still recording and the setting mentioned below. I switched transcoding to a 1TB SSD (which also has other uses) and no longer have the problem. You might also try setting "Convert Video While Recording" to Off as this will use more RAM. Do that first and see if it makes a difference. If not, you may need either more RAM or a different transcoding location. Edited February 8, 2020 by Hoopster 1 Quote Link to comment
Andiroo2 Posted February 11, 2020 Share Posted February 11, 2020 I recently set Plex transcoding to /tmp, verified that the sessions were showing up as expected int he /tmp folder. Seemed to be working fine, EXCEPT for users on Amazon Fire Sticks. They are able to browse Plex and select a movie, but as soon as they play it, they get an error "Playback has stopped because the connection to the server has been lost". I had 2 Fire stick users confirm this today, and at the same house their Rokus and other devices work fine. When I move transcoding back to the default directories on an SSD, everything works again. Could the Android clients be managing transcodes differently? I find this so odd. Xeon 2699v4, 32GB RAM. I thought this would be enough but maybe not? Quote Link to comment
Spies Posted February 12, 2020 Share Posted February 12, 2020 That makes no sense, because I have a variety of users and transcode to /tmp/PlexRamScratch with no issues. I use the following to create the folder on array start #!/bin/bash mkdir /tmp/PlexRamScratch mount -t tmpfs -o size=6g tmpfs /tmp/PlexRamScratch Quote Link to comment
Recommended Posts
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.