Jump to content

GPU Transcode to RAM


Go to solution Solved by itimpi,

Recommended Posts

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!

 

 

 

Link to comment
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?

Link to comment
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.

Link to comment
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.

Link to comment

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.

 

Link to comment
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


 

Link to comment
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?

Link to comment
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.

  • Thanks 1
Link to comment
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

Link to comment

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...