Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GPU Transcode to RAM

Featured Replies

Hi all!

 

So I want to use GPU transcoding to ram to avoid unnecessary SSD wear. So I follwed spaceinvader's tutorial for nvidia gpu transcoding and this one for ram transcoding

 

 

This is my plex docker:

 

Extra Parameters: --runtime=nvidia --mount type=tmpfs,destination=/tmp,tmpfs-size=20000000000 --no-healthcheck

 

1361543440_CleanShot2024-02-02at14_10.58@2x.thumb.png.f8ae3464757a907302dad77d30616177.png

 

And in Plex:

646258146_CleanShot2024-02-02at14_12.19@2x.thumb.png.270050ce1e957e56e3d2dad280d2fd89.png

 

GPU transcoding works fine but I can't see where it's going to. I went to /tmp and can't see a transcode folder?

 

1736990953_CleanShot2024-02-02at14_12.59@2x.thumb.png.52eb174c8730d9d091e83ade2c4fafe6.png

 

Any help would be appreciated! Thank you!

 

 

 

Solved by itimpi

  • Community Expert

Cannot see any entry in the docker settings that maps the /tmp location that you have set at the Plex level to a location on the Unraid host (e.g. mapped to something like /tmp/plex) so the transcode temporary file will be inside the container.

  • Author

Hm. I thought there was no need for that but that makes total sense.

 

I need to add a new path then right? How would I go about it? Thank you btw!

 

257115694_CleanShot2024-02-02at17_18.46@2x.thumb.png.a6244e354b688942e9a19e850162fb7f.png

  • Author
24 minutes ago, itimpi said:

Cannot see any entry in the docker settings that maps the /tmp location that you have set at the Plex level to a location on the Unraid host (e.g. mapped to something like /tmp/plex) so the transcode temporary file will be inside the container.

 

Actually I think I figured it out. I added a new path. Container Path: /transcode , Host Path: /tmp

and it shows this:

1224450281_CleanShot2024-02-02at17_34.24@2x.thumb.png.e51779066c15105b2f095dae7057837c.png

 

looks to be correct right?

  • Community Expert
2 minutes ago, Sptz87 said:

 

Actually I think I figured it out. I added a new path. Container Path: /transcode , Host Path: /tmp

and it shows this:

1224450281_CleanShot2024-02-02at17_34.24@2x.thumb.png.e51779066c15105b2f095dae7057837c.png

 

looks to be correct right?

I would suggest mapping it to a folder with /tmp as otherwise Plex may end up removing files under the /tmp path at the Unraid level that belong to other applications.

  • Author
3 minutes ago, itimpi said:

I would suggest mapping it to a folder with /tmp as otherwise Plex may end up removing files under the /tmp path at the Unraid level that belong to other applications.

 

I'm sorry, I'm not sure I follow. I'm absolutely new at this so I apologize for the annoyance!

 

As you can see in the image that is within the container, outside the container /tmp does not have a Transcode folder. I thought this was all happening exclusively within the container.

  • Community Expert

Simply mapping transcoding  to /tmp at the Plex level inside the container does NOT map it to RAM, but to a location inside the docker.img file.     What you would normally want is something like /transcode at the Plex level mapped to /tmp/transcode at the Unraid level since at the Unraid level /tmp IS in RAM.

 

  • Author
5 minutes ago, itimpi said:

Simply mapping transcoding  to /tmp at the Plex level inside the container does NOT map it to RAM, but to a location inside the docker.img file.     What you would normally want is something like /transcode at the Plex level mapped to /tmp/transcode at the Unraid level since at the Unraid level /tmp IS in RAM.

 

 

I think I understood? When I read your previous post I immediately changed the path config to this. As well as in temp directory in plex transcode settings to /tmp/plex_transcode, just to isolate it from the rest of /tmp

 

Thing is, it shows it's mounted on tmpfs inside the container, as you've said. I can also see /tmp/plex_transcode at unraid level but nothing inside it when transcoding, only inside the container whilst I'm transcoding. Shouldn't this be theoretically correct and safe (as it's nested in its own folder)

 

1106584881_CleanShot2024-02-02at17_56.21@2x.thumb.png.53452415a84d5253f3bcc795eed9019f.png

unraid level:
 

root@xx:/mnt# df -h /tmp/plex_transcode/
Filesystem      Size  Used Avail Use% Mounted on
rootfs           16G  1.2G   15G   8% /

 

inside plex container: 

root@xx:/# df -h /tmp
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           9.4G  172M  9.2G   2% /tmp


 

  • Community Expert
  • Solution

With those settings at the container level, you want to tell Plex to transcode to /transcode.   The docker system will then redirect that to /tmp/plex_transcode at the Unraid level.

  • Author
29 minutes ago, itimpi said:

With those settings at the container level, you want to tell Plex to transcode to /transcode.   The docker system will then redirect that to /tmp/plex_transcode at the Unraid level.

 

Perfect! Thank you so much!! That works! 

 

With the previous setup of just "/tmp" I had, I transcoded a couple of times to test, are the odds high that Plex screwed up something inside /tmp during that time?

  • Community Expert
27 minutes ago, Sptz87 said:

With the previous setup of just "/tmp" I had, I transcoded a couple of times to test, are the odds high that Plex screwed up something inside /tmp during that time?

That location is only inside the container so you should be fine.

  • Author
On 2/2/2024 at 7:13 PM, itimpi said:

That location is only inside the container so you should be fine.

 

I'm sorry for reviving this thread but just wanted to ask another question related to this if that's ok! 

 

So I'm testing this out, have plex on my android phone, connected to the same network. I'm playing a large 4K 60 Mbps file, direct play to the phone. Absolutely 0 problems, super smooth, fast seek times, etc

 

2071389075_CleanShot2024-02-06at07_44.57@2x.png.52063f9e285c56cf2e4736c9bbeb4f58.png

 

When I change the quality on the phone itself to say, 1080p 8Mbps. I get much more buffering and slower seek times than with direct play. On the same network. I honestly assumed this shouldn't be the case as the GPU would be fast enough as well as the bandwidth requirements would be way smaller?

 

At the same time, it looks like it's barely affecting the GPU. Just hovering between 0-8% on Encoder / Decoder usage. Is this expected? It also seems to not change the size of the /tmp/plex_transcode/ almost at all, though I do see all the transcoded sections being created there. 

 

Just want to gauge if this is the expected performance on a setup like this? Specifically with such a powerful machine I was hoping it would eliminate most of these hurdles!

 

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.40.07              Driver Version: 550.40.07      CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1660 Ti     On  |   00000000:07:00.0 Off |                  N/A |
| 44%   36C    P2             24W /  120W |     451MiB /   6144MiB |      3%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A     26040      C   ...lib/plexmediaserver/Plex Transcoder        447MiB |
+-----------------------------------------------------------------------------------------+

 

1594413738_CleanShot2024-02-06at07_36.52@2x.thumb.png.7367de6eaf3bd74fe14f3c13399c75cb.png

  • 10 months later...
On 2/6/2024 at 6:48 PM, Sptz87 said:

 

I'm sorry for reviving this thread but just wanted to ask another question related to this if that's ok! 

 

So I'm testing this out, have plex on my android phone, connected to the same network. I'm playing a large 4K 60 Mbps file, direct play to the phone. Absolutely 0 problems, super smooth, fast seek times, etc

 

2071389075_CleanShot2024-02-06at07_44.57@2x.png.52063f9e285c56cf2e4736c9bbeb4f58.png

 

When I change the quality on the phone itself to say, 1080p 8Mbps. I get much more buffering and slower seek times than with direct play. On the same network. I honestly assumed this shouldn't be the case as the GPU would be fast enough as well as the bandwidth requirements would be way smaller?

 

At the same time, it looks like it's barely affecting the GPU. Just hovering between 0-8% on Encoder / Decoder usage. Is this expected? It also seems to not change the size of the /tmp/plex_transcode/ almost at all, though I do see all the transcoded sections being created there. 

 

Just want to gauge if this is the expected performance on a setup like this? Specifically with such a powerful machine I was hoping it would eliminate most of these hurdles!

 

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.40.07              Driver Version: 550.40.07      CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1660 Ti     On  |   00000000:07:00.0 Off |                  N/A |
| 44%   36C    P2             24W /  120W |     451MiB /   6144MiB |      3%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A     26040      C   ...lib/plexmediaserver/Plex Transcoder        447MiB |
+-----------------------------------------------------------------------------------------+

 

1594413738_CleanShot2024-02-06at07_36.52@2x.thumb.png.7367de6eaf3bd74fe14f3c13399c75cb.png

Something is definitely not right.

I'm using a GTX 1660 SUPER for all my GPU assisted work in my server, capabilities should be the same as your 1660 Ti?

For reference, I'm transcoding 2 video files with Tdarr and transcoding a 4K DV/HDR file to my phone over 5G

5G.png.5ca45c75a785f08646416d97b41d3dd6.png

Screenshot_20241213-103642.thumb.png.911a9b2328c5ea220e8712f8f4ed2fb9.png

 

Same Plex file over WIFI and 1 transcode with Tdarr (The other one had finished in the meantime)

WIFI.png.247a223374ea441774059e9f3ad8d1d1.png

Screenshot_20241213-104234.thumb.png.0ceb2b3a78af01cad532ba482df617ec.png

 

And just for shits and giggles, only Plex transcode, same 4K DV/HDR movie over 5G

5GV2.png.9b22132d426301e5664f2733d0a23423.png

Screenshot_20241213-110059.thumb.png.909f9bf4a2a394e8d0fad43f31ea884e.png

 

I noticed your encoder/decoder is hardly working. Are you sure you have the right read/write access to your temp/transcode folder?

  • Community Expert

The GPU throttles after the transcode buffer is filled. I can't remember what the default setting is but it's either 60 or 120 seconds. Once that buffer is met, the transcoder throttles and doesn't need to encode/decode but in small segments. When you start seeking, the buffer is nuked and has to rebuild. Based on the screenshots, everything looks normal.

 

At the very start of a transcode session you will see the Encoder/Decoder stats climb up but after the buffer is full, it will drop to 1% or 0% until more buffer is needed.

 

Pay attention to the throttle state: image.png.3f91e58da231fac60b9143a94c71a325.png

 

P0 is most power <---> P8 is idle.

 

During Transcode Buffer Filling:

 

image.png.a79133b2c0db518fee9e59e271044b63.pngimage.png.bbd2f65ed646b85be6a4b530f4feb7fa.png

 

Buffer is full:

 

image.png.bc03ad8d603093c80019dc7c91cdf5e1.pngimage.png.66307daf712fc39dcea54855b95b1ecc.png

Edited by MowMdown

  • 1 month later...
On 12/13/2024 at 12:12 AM, Degn said:

Something is definitely not right.

I'm using a GTX 1660 SUPER for all my GPU assisted work in my server, capabilities should be the same as your 1660 Ti?

For reference, I'm transcoding 2 video files with Tdarr and transcoding a 4K DV/HDR file to my phone over 5G

5G.png.5ca45c75a785f08646416d97b41d3dd6.png

Screenshot_20241213-103642.thumb.png.911a9b2328c5ea220e8712f8f4ed2fb9.png

 

Same Plex file over WIFI and 1 transcode with Tdarr (The other one had finished in the meantime)

WIFI.png.247a223374ea441774059e9f3ad8d1d1.png

Screenshot_20241213-104234.thumb.png.0ceb2b3a78af01cad532ba482df617ec.png

 

And just for shits and giggles, only Plex transcode, same 4K DV/HDR movie over 5G

5GV2.png.9b22132d426301e5664f2733d0a23423.png

Screenshot_20241213-110059.thumb.png.909f9bf4a2a394e8d0fad43f31ea884e.png

 

I noticed your encoder/decoder is hardly working. Are you sure you have the right read/write access to your temp/transcode folder?

 

 

Sorry for the minor thread necro, but don't these screenshots show you using your CPU's transcoder? (Epyc) and not your GTX renderer? sorry-

 

I came back to this thread after updating to 7.0 and realizing id long forgotten to pass /transcode to /tmp/plex and when reading the thread I noticed this and wondered

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.