Can multiple apps utilize the same GPU?

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
that’s interesting. I can confirm that tdarr is still able to use the GPU this way. And I can confirm that I have not yet updated either tdarr or plex to recent versions of the TC app to versions based on their new common chart. Still I can’t confirm if he transcode broke in plex at some previous TC update or if it was tied to the most recent Tnas update. I wish I had done more testing.
 

d22b

Cadet
Joined
Apr 23, 2023
Messages
2
Hi!

I am glad that I found this. Actually I am facing the issue, that my nvidia p2000 ist visible in true Nas scale (fresh install) but I can’t do anything with that card. I configured the emby truechart install with the values above but cant bring emby to use (or even see) the gpu.

Any advise?
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
According to advice from the Truechart Discord, this shared GPU trick is no longer possible with their new common chart. It seems TrueNas Scale has this feature planned natively in a future version (cobia) and thus it working in a TC chart unofficially is no longer possible.
 

d22b

Cadet
Joined
Apr 23, 2023
Messages
2
Thats a pitty. I was able to get it to work by assigning the gpu dedicated to the emby truecharts app. Transcoding are working now but the gpu is lost to another apps. Thanks for the Information.
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
The same for me. It works fine for a single app, but no sharing. I have my eye out for an inexpensive secondary GPU to assign to tdarr.
 

Crow

Cadet
Joined
Mar 23, 2023
Messages
8
This currently works for me. I have truenas scale 22.12.2 and plex in a container 1.32.3.7162_1.7.49. using an AMD processor with no GPU and a stand alone RTX 2600.
 

Attachments

  • temp.png
    temp.png
    62.1 KB · Views: 210

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
This currently works for me. I have truenas scale 22.12.2 and plex in a container 1.32.3.7162_1.7.49. using an AMD processor with no GPU and a stand alone RTX 2600.
Multiple apps have simultaneously accessed it? Your screen shot shows a single session for a single app
 

Crow

Cadet
Joined
Mar 23, 2023
Messages
8
Multiple apps have simultaneously accessed it? Your screen shot shows a single session for a single app
So I am using the GPU for the truenas install and for plex. I have no other GPUs. I could test another app if there is an easy one to setup. I do not know if multiple apps and truenas can all use the same GPU at the same time.
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
This topic is on how to permit multiple applications to share a GPU. You are correct in that a single app can use a single GPU, I also do that currently with Plex. Even though not officially supported, you could have multiple apps sharing a single GPU, but that functionality has since ended. Official support is on its way ... in a few months it seems
 

SitelabsNL

Cadet
Joined
Aug 22, 2022
Messages
2
According to advice from the Truechart Discord, this shared GPU trick is no longer possible with their new common chart. It seems TrueNas Scale has this feature planned natively in a future version (cobia) and thus it working in a TC chart unofficially is no longer possible.
Do we have a brave beta tester of Cobia, now that it’s out, who can confirm GPU sharing is possible? :)
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
I am not gonna try it :) not till it’s released and we hear from truecharts that this cobia functionality and their new base chart. Apparently it already works with ix apps, so if I was looking to experiment, I would start there.
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
Just tried it on Cobia RC1. The UI is still a bit buggy showing 5 available GPU for allocation, but I was able to get multiple containers running nvidia-smi out of the box.
Well that sounds new. Previously there was only one GPU resource to assign, so if you used that functionality you couldn’t share a single GPU with multiple apps. Sounds like they added functionality! Previously a single GPU could be shared by multiple apps by avoiding that resource assignment, and instead by adding/using environment variables. This worked with TrueChart apps for a bit then it stopped. I am not sure if there is any advantage of either design, but will be testing this when it hits GA!
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
I ungraded to Cobia. I run TC versions of Plex and Tdarr and added a single Nvidia GPU to each app. in plex GPU assist works, but when I add tdarr nvenv does not work.
 

TurtleFX

Dabbler
Joined
Nov 20, 2018
Messages
11
I've also upgraded to Cobia.
UI shows 5 GPUs to allocate.
GPU_allocation.png

Allocated 1 GPU to Plex and Jellyfin Apps. HW transcoding seems to be working.
Scrennshot with plex and jellyfin streams both transcoding from 4K to 1080p.
nvidia_smi.png
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
I forgot to leave an update here. This is working for me now as well. Cobia plus upgraded truecharts apps and allocating one you to each has me going again. I have multiple apps plex and tdarr able to simultaneously use GPU nvidia
 

Rudi Pittman

Contributor
Joined
Dec 22, 2015
Messages
161
Apps can share the same GPU. I've been doing it forever. When your setting up the deployment, do not allocate GPU to it as it will not allow any other pod to use it.

Set your env variables like this on each deployment to utilize GPU:
View attachment 58020

This info is so very important. It should be bookmarked at the top of the forum. Another point is the command "nvidia-smi -L" will show you your gpu's on your truenas machine. I successfully used this in dockerized containers for plex and for fileflows (transcoding .ts files to h.265) Anyone know how to keep the intel gpu active while primarily using the nvidia one? It appears to totally shut down the Intel GPU on my Asus LGA 1150 board.
 

Rudi Pittman

Contributor
Joined
Dec 22, 2015
Messages
161
The d
I ungraded to Cobia. I run TC versions of Plex and Tdarr and added a single Nvidia GPU to each app. in plex GPU assist works, but when I add tdarr nvenv does not work.
The docker containers run as root while the truecharts ones typically don't. It's quite possible the user running the container doesn't have access to the /dev/dri device.
 

Rudi Pittman

Contributor
Joined
Dec 22, 2015
Messages
161
According to advice from the Truechart Discord, this shared GPU trick is no longer possible with their new common chart. It seems TrueNas Scale has this feature planned natively in a future version (cobia) and thus it working in a TC chart unofficially is no longer possible.

Just roll your own instead of using the truecharts one with the launch docker button.
 
Top