Hoopster Posted February 13, 2023 Share Posted February 13, 2023 5 minutes ago, jvorn said: This is great but I have a question, is this a UserScript that runs for you on startup or something? Thanks!!! Not a startup script. These are entries in the go file in the /config folder of the flash drive. Quote Link to comment
craigr Posted February 19, 2023 Share Posted February 19, 2023 (edited) On 10/13/2022 at 6:37 PM, Hoopster said: ...I have this in my go file to limit transcoding to 16GB and to recreate the folder in RAM on reboot: mkdir /tmp/PlexRamScratch chmod -R 777 /tmp/PlexRamScratch mount -t tmpfs -o size=16g tmpfs /tmp/PlexRamScratch With this, the mapping in the Plex docker container is /transcode to /tmp/PlexRamScratch This forces Plex to reclaim space by deleting older transcoded bits that have already played rather than just waiting to delete them all when the entire transcode finishes. For those who may not realize, for this to work, the PLEX container must be mapped like this: craigr Edited February 19, 2023 by craigr clarity 1 Quote Link to comment
tmchow Posted February 19, 2023 Share Posted February 19, 2023 (edited) 15 hours ago, craigr said: For those who may not realize, for this to work, the PLEX container must be mapped like this: craigr you can also accomplish this within Plex server settings specify the transcode directory to be /transcode/PlexRamScratch instead of it being /transcode Edited February 19, 2023 by tmchow 1 Quote Link to comment
cholzer Posted September 25, 2023 Share Posted September 25, 2023 Funny problem, Plex on my AppleTV complains that there is not enough disk space to transcode. And indeed, the ram disk it is full. Filesystem Size Used Avail Use% Mounted on tmpfs 8.6G 8.5G 107M 99% /tmp/PlexRamScratch Shouldnt Plex clean up old transcode files? Quote Link to comment
Mainfrezzer Posted September 25, 2023 Share Posted September 25, 2023 (edited) 28 minutes ago, cholzer said: Funny problem, Plex on my AppleTV complains that there is not enough disk space to transcode. And indeed, the ram disk it is full. Filesystem Size Used Avail Use% Mounted on tmpfs 8.6G 8.5G 107M 99% /tmp/PlexRamScratch Shouldnt Plex clean up old transcode files? Yes but there are 2 things that could stop it. 1. If the stream session isnt closed, it doesnt clean up after itself. 2. Depending on what kind of transcode quality youre trying to watch, 8,6GB isnt enough in size(especially if someone else is transcoding simultaneously). I think Plex does have "emergency trigger" which will clean up if the destination has not enough space anymore but it might be that the current available space is too much for plex to see the issue. Edited September 25, 2023 by Mainfrezzer 1 Quote Link to comment
cholzer Posted September 26, 2023 Share Posted September 26, 2023 (edited) 8 hours ago, Mainfrezzer said: Yes but there are 2 things that could stop it. 1. If the stream session isnt closed, it doesnt clean up after itself. 2. Depending on what kind of transcode quality youre trying to watch, 8,6GB isnt enough in size(especially if someone else is transcoding simultaneously). I think Plex does have "emergency trigger" which will clean up if the destination has not enough space anymore but it might be that the current available space is too much for plex to see the issue. The AppleTV is the only device which accesses my Plex Server and the transcoding is audio only as Video is direct streamed (Apple still refuses to support TrueHD / DTS-HD). So I thought that 8GB should be enough for this. But I have increased it to 16GB now. I wonder why Plex Server does not clean up after itself. However previously I have noticed that the transcode folder rarely reset in size while I was transcoding to an SSD. I always manually deleted the folder once a week. Edited September 26, 2023 by cholzer Quote Link to comment
alturismo Posted September 26, 2023 Share Posted September 26, 2023 3 minutes ago, cholzer said: I wonder why Plex Server does not clean up after itself. when i tested it (compared to emby which is known NOT to cleanup) plex indeed did free up while the transcode destination got filled up, but i only tested inclugin video transcode to make sure ... but no ios devices here TrueHD Transcode is known to use alot of space (whyever) ... may thats your culprit as its audio only ... so your questions rather should go to Plex Forums instead here including some debugging ... 1 Quote Link to comment
L0rdRaiden Posted October 5, 2023 Share Posted October 5, 2023 with compose it looks like this is working volumes: - /mnt/user/Docker/Plex:/config - /mnt/user/Video/Películas/:/media/Películas:rw - /mnt/user/Video/Movies/:/media/Movies:rw - /mnt/user/Video/Series/:/media/Series:rw - type: tmpfs target: /transcode tmpfs: size: 2000000000 I don't see disk writes while transcoding by plex, but If I remove them I can see a constant 1-2 mb/sec of writes by plex transcoder process in htop. Is there any other way to check that is working? it looks like tmpfs is not using /dev/shm Quote Link to comment
z0ki Posted November 7, 2023 Share Posted November 7, 2023 (edited) I have NVIDIA GPU transcoding working on my server. But I have a fair bit of ram i'd like to utilize also for transocding. But I do not think it is working as I am still getting very low ram usage according to unaid and plex dashboard. CONTAINER: BINHEX PLEX EXTRA PARAMETERS: --runtime=nvidia --device=/dev/dri --mount type=tmpfs,destination=/transcode,tmpfs-size=3200000000 --no-healthcheck Can someone please tell me what am i doing wrong and how to rectify it so I can utilize some ram? Edited November 7, 2023 by z0ki Quote Link to comment
bombz Posted November 10, 2023 Share Posted November 10, 2023 On 10/13/2022 at 7:37 PM, Hoopster said: This could be a problem. I used to have mine set up this way but without limiting transcoding RAM in some way, tmp will eventually fill up all available RAM completely especially if there are multiple transcoding sessions going on simultaneously. I also have 64GB RAM on my server but have limited transcoding to using 16GB RAM. I have this in my go file to limit transcoding to 16GB and to recreate the folder in RAM on reboot: mkdir /tmp/PlexRamScratch chmod -R 777 /tmp/PlexRamScratch mount -t tmpfs -o size=16g tmpfs /tmp/PlexRamScratch With this, the mapping in the Plex docker container is /transcode to /tmp/PlexRamScratch This forces Plex to reclaim space by deleting older transcoded bits that have already played rather than just waiting to delete them all when the entire transcode finishes. Hello, Was reviewing this post as I am soon to be migrating back to PLEX DOCKER from another OS. Are there some 'best practices' other than this transcode recommendation regarding the PLEX DOCKER deployment that are recommended? I will keep skimming this thread and attempt to collect information. Look forward to hearing back. Thanks. Quote Link to comment
Hoopster Posted November 10, 2023 Share Posted November 10, 2023 31 minutes ago, bombz said: Are there some 'best practices' other than this transcode recommendation regarding the PLEX DOCKER deployment that are recommended? I don't know about recommended but I also have Plex appdata folder on a dedicated SSD. I separated it from other Docker container appdata because Plex appdata can get large and backing it up and restoring it is easier with dedicated storage. This is certainly not a necessity. It is just a personal preference. Quote Link to comment
bombz Posted November 12, 2023 Share Posted November 12, 2023 On 11/10/2023 at 4:14 PM, Hoopster said: I don't know about recommended but I also have Plex appdata folder on a dedicated SSD. I separated it from other Docker container appdata because Plex appdata can get large and backing it up and restoring it is easier with dedicated storage. This is certainly not a necessity. It is just a personal preference. Hello, This is an interesting idea. I do currently use CA backup for all my current dockers, and you make a good point as the backups would get quite large if including the metadata within the plex docker folder. As you stated; you are currently running 'Plex\Library\<matadata>' appdata folder folder on a separate SSD or 'pool' -- out of curiosity, is it simple to point the PLEX docker to another SSD to use that location as the metadata, perhaps a variable that is required to be added upon deploying the PLEX docker? Can you install PLEX docker to the 'default appdata location' -- while pointing the 'metadata' DIR at another SSD disk/pool? or Are you simply pointing the whole PLEX docker instance 'appdata + metadata' at a whole different SSD disk/pool in a btrfs or zfs mirror? I am really curious to this setup because it is an excellent point if/when required to restore the docker the metadata is on a completely different disk. Please feel free to include screens or PM me as I don't want this to hijack the thread out of respect. Look forward to hearing back. Thank you. Quote Link to comment
Hoopster Posted November 12, 2023 Share Posted November 12, 2023 (edited) 1 hour ago, bombz said: I am really curious to this setup In Shares, Plex is a disk share (name of SSD): In Plex docker container plex appdata is on the mnt/plex disk share View of Plex SSD in Windows: Edited November 12, 2023 by Hoopster Quote Link to comment
bombz Posted November 14, 2023 Share Posted November 14, 2023 On 11/12/2023 at 3:29 PM, Hoopster said: In Shares, Plex is a disk share (name of SSD): In Plex docker container plex appdata is on the mnt/plex disk share View of Plex SSD in Windows: Hello, Much appreciated, and good idea. Thank you. Quote Link to comment
bombz Posted December 9, 2023 Share Posted December 9, 2023 On 2/19/2023 at 2:15 AM, craigr said: For those who may not realize, for this to work, the PLEX container must be mapped like this: craigr Hello, You have altered your go file @ \\UNRAID\flash\config\go which I am assuming looks like this? #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & echo ; >/usr/local/sbin/mover mkdir /tmp/PlexRamScratch chmod -R 777 /tmp/PlexRamScratch mount -t tmpfs -o size=16g tmpfs /tmp/PlexRamScratch From there you add the path variable within the plex docker? /tmp/PlexRamScratch Then within the PLEX GUI set the same transcode DIR? Would this requirement still be needed in EXTRA PERAMETERS? EXTRA PARAMETERS: --runtime=nvidia --device=/dev/dri --mount type=tmpfs,destination=/transcode,tmpfs-size=17179869184 --no-healthcheck Use Nvidia GPU -runtime=nvidia Use CPU for Trancodes --device=/dev/dri Use 16GB RAM for Transcode --mount type=tmpfs,destination=/transcode,tmpfs-size=17179869184 --no-healthcheck Look forward to the feedback for clarity Quote Link to comment
frodr Posted December 14, 2023 Share Posted December 14, 2023 Will the guide work on Jellyfin? Quote Link to comment
craigr Posted December 15, 2023 Share Posted December 15, 2023 (edited) On 12/8/2023 at 10:06 PM, bombz said: Hello, You have altered your go file @ \\UNRAID\flash\config\go which I am assuming looks like this? #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & echo ; >/usr/local/sbin/mover mkdir /tmp/PlexRamScratch chmod -R 777 /tmp/PlexRamScratch mount -t tmpfs -o size=16g tmpfs /tmp/PlexRamScratch From there you add the path variable within the plex docker? /tmp/PlexRamScratch Then within the PLEX GUI set the same transcode DIR? Would this requirement still be needed in EXTRA PERAMETERS? EXTRA PARAMETERS: --runtime=nvidia --device=/dev/dri --mount type=tmpfs,destination=/transcode,tmpfs-size=17179869184 --no-healthcheck Use Nvidia GPU -runtime=nvidia Use CPU for Trancodes --device=/dev/dri Use 16GB RAM for Transcode --mount type=tmpfs,destination=/transcode,tmpfs-size=17179869184 --no-healthcheck Look forward to the feedback for clarity 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 I do not have any extra parameters. I am however using the Intel IGPU not Nvidia. Good luck! Edited December 18, 2023 by craigr Quote Link to comment
alturismo Posted December 16, 2023 Share Posted December 16, 2023 On 12/9/2023 at 5:06 AM, bombz said: Would this requirement still be needed in EXTRA PERAMETERS? nope, its either / or ... both ways are fine and in the end the same result, but you dont need todo so "double" On 12/14/2023 at 4:17 AM, frodr said: Will the guide work on Jellyfin? yes, but be aware that jellyfin (emby) does not clean up once the (ram)disk gets full (while transcodes are running), so it should be big enough to handle ... Quote Link to comment
smaiderman Posted January 4 Share Posted January 4 Hi!. Thnks for all the tips. Is there a way to check if everything is working as intended? How can I know if my server is transcoding using ram? Thank you! Quote Link to comment
Hoopster Posted January 4 Share Posted January 4 9 minutes ago, smaiderman said: Is there a way to check if everything is working as intended? Look in the folder you have designated in RAM for transoding (/tmp/PlexRamScratch on my system). There should be a Transcode folder there with a Sessions subfolder which contains the transcoding pieces if things are working properly. Quote Link to comment
smaiderman Posted January 4 Share Posted January 4 38 minutes ago, Hoopster said: Look in the folder you have designated in RAM for transoding (/tmp/PlexRamScratch on my system). There should be a Transcode folder there with a Sessions subfolder which contains the transcoding pieces if things are working properly. Mine looks loke this, No "sessions" folder, but others Is this working? Thank you again Quote Link to comment
Hoopster Posted January 4 Share Posted January 4 1 hour ago, smaiderman said: Is this working? Mine has always had the /tmp/PlexRamScratch/Transcode/Sessions structure; however, if you see the transcode files being created and deleted in your folder structure as a file is being transcoded, that would indicate it is working properly. Quote Link to comment
xreyuk Posted January 8 Share Posted January 8 Thank you for this guide, this seems to be working for me as I can see items being created in the sessions folder on the RamScratch disk. However, I have 'stopped' a plex viewing halfway throguh and can still see items in the 'session' folder on the RamScratch Disk, how long does it usually take to remove these? Quote Link to comment
ChutneyBadger Posted January 8 Share Posted January 8 I've followed the guide from @craigr but for some reason the transcode isn't taking place on the RAM, as shown in the first screenshot. The movie is definitely being transcoded as you can see below. My Plex docker setup is shown below. I dont know where i've gone wrong and I cant figure out where the transcoding session is because it's not in my Appdata either. If anyone could help me out i'd really appreciate it. Thanks Quote Link to comment
Rhodius Posted January 27 Share Posted January 27 On 1/8/2024 at 12:10 PM, ChutneyBadger said: I've followed the guide from @craigr but for some reason the transcode isn't taking place on the RAM, as shown in the first screenshot. The movie is definitely being transcoded as you can see below. My Plex docker setup is shown below. I dont know where i've gone wrong and I cant figure out where the transcoding session is because it's not in my Appdata either. If anyone could help me out i'd really appreciate it. Thanks Hi, not sure if you still have this issue, it seems that you set your Plex Media Server to /Transcode and yet the docker refers to /transcode. For Linux based OS, capital is different than lower case. 1 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.