nadbmal Posted December 1, 2018 Share Posted December 1, 2018 1 hour ago, Hoopster said: Any chance you have some bad RAM? Have you noticed any other potential RAM-related issues or is it just Plex transcoding in RAM? Perhaps you are seeing the issues because Plex is trying to move things around in RAM if some is bad. Even if it is the latter, a 24-hour memtest should eliminate or confirm RAM as the problem. Perhaps you are seeing the issues because Plex is trying to move things around in RAM if some is bad. This is a long shot, but, there does not appear to be an issue with transcoding in RAM in general. I admit I havent ran memtest for 24 hours on the RAM, but i have done 2 hours and it was fine. I would prefer not to run memtest any more because then I need to connect a GPU (the Ryzen 1700x has no integrated...) and the server needs to be offline, and I get upset when I can't access my Plex on the iPad before i sleep... I've had previous experience with bad RAM and in those cases Memtest almost immediately got an error. Also everything else seems fine (I got 45 days uptime on 6.6.1 before I updated to 6.6.5)... Is there some "lighter" version of memtest I could run without taking the server offline? maybe some script that runs in /tmp/ and just moves big files around verifying their integrity to simulate Plex transcoding? Quote Link to comment
nadbmal Posted December 18, 2018 Share Posted December 18, 2018 (edited) So I've been testing more and I've come to the conclusion that it is the client one of my users are using that is the problem: Chromecast. Whenever he plays something via the Chromecast it buffers the whole movie into RAM almost immediately, he can watch for 15 mins or so and then the whole movie is in RAM and gets killed. I had him try using the web player on his computer, and then it worked fine, it only buffered a couple of % ahead of where he was, like it should. This picture pretty much sums it up. Look at the buffer bars. EDIT: I have narrowed it down even further, and come to the conclusion that it is the transcoding of subtitles that is causing the problem, atleast when transcoding to ASS format. EDIT 2: And you can probably narrow it down even further to only being a issue with Chromecast users, because it transcodes to a MKV container. I tried with the web player in Chrome, which also uses ASS subtitles, but a MP4 container and then I can see the transcoder is throttled. Edited December 18, 2018 by nadbmal Quote Link to comment
Fish Posted December 28, 2018 Share Posted December 28, 2018 I will be giving this a try to see how it goes. I went from my SSD to what I think is my ram. LOL. Right now the transcode path is /tmp/. I dont see any ramdisk option under any folder. I did try to play a video through Chrome and I did not see my ram usage go up or down in any way. Quote Link to comment
drawmonster Posted March 4, 2019 Share Posted March 4, 2019 (edited) So is /tmp/ still the directory we should be using? Seeing posts where people are recommending /dev/shm/ Can a mod or someone comment on which directory is recommended by the Unraid team? Edited March 4, 2019 by drawmonster Quote Link to comment
gilahacker Posted March 4, 2019 Share Posted March 4, 2019 3 minutes ago, drawmonster said: So is /tmp/ still the directory we should be using? Seeing posts where people are recommending /dev/shm/ Can a mod or someone comment on which directory is recommended by the Unraid team? On *my* server, running 6.6.6, I have a /dev/shm tmpfs mount that is allocated 32 GB of RAM (per df). I have 64 GB total RAM, not sure why it's set to 32. I do not have a /tmp mount. I do have a /tmp directory, but it's not a tmpfs "RAM drive", just a plain directory. You can run cat /etc/mtab to see what your current mount situation is. I imagine it's similar. I have the Plex /transcode folder mapped to /dev/shm in its Docker settings. No issues so far. Quote Link to comment
drawmonster Posted March 4, 2019 Share Posted March 4, 2019 (edited) Yeah, I've heard from smarter people than me that /dev/shm/ should work fine. But it's hard to recommend it to people when there is an "official" way posted here. Maybe a mod/dev could update the OP with this alternate way so we can post links to here for "proof"? Edited March 4, 2019 by drawmonster Quote Link to comment
Hoopster Posted March 4, 2019 Share Posted March 4, 2019 9 minutes ago, drawmonster said: Yeah, I've heard from smarter people than me that /dev/shm/ should work fine. But it's hard to recommend it to people when there is an "official" way posted here. Maybe a mod/dev could update the OP with this alternate way so we can post links to here for "proof"? I am using /tmp and have verified several times that Plex is transcoding there, Being an OS folder outside of /mnt it is in RAM and works fine. I have no comment on /dev/shm as I have never used it since /tmp works for me. 1 Quote Link to comment
gilahacker Posted March 4, 2019 Share Posted March 4, 2019 @Hoopster brings up an interesting point. Because, unlike many (most?) Linux distributions, unRAID runs completely within RAM and nothing else gets mounted over-top the default rootfs (special instance of tmpfs). I believe this is similar to any "Live" distro, but don't have experience with those. So even though my /tmp isn't a tmpfs mount itself, it is *on* a tmpfs mount and exists only within RAM. Thus, either /tmp (a path on a tmpfs mount) or /dev/shm (an explicit tmpfs mount) should work exactly the same other than the fact that some of the space on / will be in use already. Quote Link to comment
Spies Posted March 29, 2019 Share Posted March 29, 2019 After rebooting my server, I had to change the mapping back to the /mnt/user/transcode share and then back to /tmp/transcode in order to get anything to play. Any particular reasoning for this? Quote Link to comment
MowMdown Posted March 29, 2019 Share Posted March 29, 2019 (edited) You guys are making this much more complicated than it needs to be. Just set the host path to: /tmp and then set the container path to: /transcode then inside Plex at the webgui, tell it to transcode to "/transcode" (no quotes) Edited March 29, 2019 by MowMdown Quote Link to comment
nadbmal Posted March 29, 2019 Share Posted March 29, 2019 2 hours ago, Spies said: After rebooting my server, I had to change the mapping back to the /mnt/user/transcode share and then back to /tmp/transcode in order to get anything to play. Any particular reasoning for this? I've run into that bug too. It fails because there isn't a folder called "Transcode" in /tmp/transcode after a reboot since the RAM was wiped. So you just need to create that folder and it works. You could probably automate it by running "mkdir /tmp/transcode/Transcode" at boot. Quote Link to comment
JonathanM Posted March 29, 2019 Share Posted March 29, 2019 1 minute ago, nadbmal said: I've run into that bug too. It fails because there isn't a folder called "Transcode" in /tmp/transcode after a reboot since the RAM was wiped. So you just need to create that folder and it works. You could probably automate it by running "mkdir /tmp/transcode/Transcode" at boot. Why bother? Follow these instructions, 9 minutes ago, MowMdown said: You guys are making this much more complicated than it needs to be. Just set the host path to: /tmp then you can be assured the folder exists, no need to go through the trouble of creating a transcode folder inside of /tmp. Quote Link to comment
MowMdown Posted March 29, 2019 Share Posted March 29, 2019 Plex creates "/Transcode/Session" inside of /tmp automatically if you specifiy "/tmp/Transcode" you'll end up with "/tmp/Transcode/Transcode/Session" Quote Link to comment
nadbmal Posted March 29, 2019 Share Posted March 29, 2019 It creates the "Transcode/Sessions" folder when you save your docker settings. It expects it to already be there after a reboot. Quote Link to comment
MowMdown Posted April 1, 2019 Share Posted April 1, 2019 On 3/29/2019 at 7:25 PM, nadbmal said: It creates the "Transcode/Sessions" folder when you save your docker settings. It expects it to already be there after a reboot. It creates it when you run a Transcode session. Quote Link to comment
nadbmal Posted April 1, 2019 Share Posted April 1, 2019 13 minutes ago, MowMdown said: It creates it when you run a Transcode session. It creates the Session folder when you start a transcode. It doesn't create the parent Transcode folder, and fails. Quote Link to comment
MowMdown Posted April 1, 2019 Share Posted April 1, 2019 (edited) 3 minutes ago, nadbmal said: It creates the Session folder when you start a transcode. It doesn't create the parent Transcode folder, and fails. Not for me, it creates both. I tested it by deleting both while I was transcoding, then a second later both directories were auto-generated again and the session resumed. If you map only "/tmp" that is. Edited April 1, 2019 by MowMdown Quote Link to comment
nadbmal Posted April 1, 2019 Share Posted April 1, 2019 (edited) 1 hour ago, MowMdown said: Not for me, it creates both. I tested it by deleting both while I was transcoding, then a second later both directories were auto-generated again and the session resumed. If you map only "/tmp" that is. Here's how to reproduce on my end (it simulates a reboot): - Have guest /transcode mapped to host /tmp/plexram - Stop the docker - Remove the folder /tmp/plexram - Start the docker. /tmp/plexram will be created again. - Try playing something that requires a transcode. It will only keep on spinning. - Create the folder "Transcode" inside /tmp/plexram - Now it works I'm attaching a screen recording of this. I don't wanna map /transcode straight to /tmp incase Plex sniffs around in there or if it ever does a "rm -rf *". Mapping it to its own subfolder is safer. 2019-04-01_16-13-51.mp4 Edited April 1, 2019 by nadbmal 1 Quote Link to comment
skaterpunk0187 Posted April 21, 2019 Share Posted April 21, 2019 I'm glad I stumbled across this thread. I was originally a FreeNAS user so I have a large amounts of RAM. Since Unraid doesn't use RAM for its cache or pretty much anything other then holding Unraid itself, thig gives me a use for the RAM I have. It works great using the /tmp directory with no other sub-directories as Plex will create its' own. With no errors after reboots. You can verify /tmp is Used only in RAM as you play a video that transcodes you will see the RAM usage on the dashboard increase. Let it play for a while and stop (not Pause) the video and you'll see the RAM usage drop to where its always is. I have been running like this for a several days with four devices (Xbox One, Xbox 360s, and Roku) transcoding off and on and all at the same time with 30+ hours watched without an issue. Quote Link to comment
MowMdown Posted April 21, 2019 Share Posted April 21, 2019 (edited) @nadbmal that's because you're not mapping directly to /tmp you're mapping to /tmp/plexram (don't do this) Plex cannot generate /plexram once it's deleted. That's why in your situation when you delete that directory it fails to transcode. it's looking for a folder that doesn't exist (docker is creating this path not plex) Just use /tmp as the transcode directory Plex will autogenerate /Transcode/Sessions every time on its own when a transcode is needed. you will never run into that issue doing it the proper way I described here: Edited April 21, 2019 by MowMdown Quote Link to comment
nadbmal Posted April 21, 2019 Share Posted April 21, 2019 7 minutes ago, MowMdown said: @nadbmal that's because you're not mapping directly to /tmp you're mapping to /tmp/plexram (don't do this) Plex cannot generate /plexram once it's deleted. That's why in your situation when you delete that directory it fails to transcode. it's looking for a folder that doesn't exist (docker is creating this path not plex) Just use /tmp as the transcode directory Plex will autogenerate /Transcode/Sessions every time on its own when a transcode is needed. you will never run into that issue doing it the proper way I described here: I don't wanna map /transcode straight to /tmp incase Plex sniffs around in there or if it ever does a "rm -rf *". Mapping it to its own subfolder is safer. Quote Link to comment
MowMdown Posted April 21, 2019 Share Posted April 21, 2019 I'm not sure what you keep in /tmp that is of high concern but my /tmp doesn't contain any sensitive data... Quote Link to comment
munit85 Posted April 23, 2019 Share Posted April 23, 2019 Doing this completely borks my plex. I have my plex appdata on an unassigned SSD I'm using nvidia card for transcoding and I'm running the encode/decode user script. I assume one of those things is what's breaking it. I just get spinning circle. Even when I undo the change and set everything back I can't get things to load at home. Assuming a full reboot will be needed. Anyone else in this boat? Quote Link to comment
MowMdown Posted April 26, 2019 Share Posted April 26, 2019 (edited) @munit85 Sounds like you have something mis-configured at the least. Force an update on the container then just try it with transcoding to ram, if that works we can rule out the Nvidia script. do it in layers until you find the problem. Edited April 26, 2019 by MowMdown 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.