"Sharing a GPU" with Unraid?

Continuing the discussion from "Sharing" a GPU between virtual machines?:

So during my googling process for trying to get my system set up, I came across this thread. I see that looking glass is an option, but it seems to only be a workaround solution by streaming the desktop, and it still needs two GPUs.

Let me back up and describe my dilemma. I am considering building a new computer. I play games but I also have an interest in Data Science, more specifically Machine Learning. I would like to have a setup with Unraid (inspired by LTT’s 7 gamers 1 CPU). However, this leads to a quandary, because both VMs need the GPU, and I only have the budget for one GPU. I don’t want to have 2 cards dedicated to both VMs, because then I would be paying for 2 cards when at most times one will be completely idle even when I am gaming/training my ML model. Plus, I want to be able to add VMs to Unraid in the future, either for a NAS or something else, and I want a remote Machine Learning capacity too. I also saw Wendel’s video on SR-IOV but I am hoping my situation is different here.

Most Machine Learning is done with Linux and with GPU acceleration. For example, if you are training a model, you may need to do up to 300 epochs of training, each epoch training the model with the whole dataset, which can range from 100k lines to millions of lines of data, but in this case is about 300k lines of data. Having it done on the CPU means hours if not days of processing, but a mere 30 minutes when utilizing the GPU. So resource sharing of the GPU is a Must for me. The CPU is not that big a deal to split, but the GPU is needed in both applications.

Is there any solution that I can implement this simultaneous running of both the Linux for data science and also the Windows for gaming without resorting to dual booting, or getting 2 GPUs and letting one go idle whenever I need graphics cores? Or am I still waiting for this SR-IOV feature to be supported in consumer grade cards?

1 Like

Well, you can use an iGPU for the host machine / desktop / lookingglass client?

And pas the dGPU to whichever VM you wanna run at the time? gaming/ML/AI/Compute

Or grab a cheap used GPU / underpowered GPU like the gt710? Looks like $50 off newegg, or maybe some old card from goodwill / local recycler might do similar for $10 or something.

Theres no way to pass a single gpu back and forth between 2 VMs without stopping the VM using the card. Even then its not a simple process. You cant run both at the same time so its no different than dual booting really. SR-IOV would be the only way I know of and I dont believe unraid is going to handle that cleanly anyway.

1 Like

:arrow_up:

This topic was automatically closed 273 days after the last reply. New replies are no longer allowed.