GPU Sharing

WolfpacK

Active Member
Nov 11, 2018
11
0
41
44
What are my options for sharing a GPU across multiple VMs and/or LXCs?

I am currently testing a VM with VirGL, and it seems to be working. The Guest OS has GL enabled and GLXGears shows 1200+ FPS. I have determined that the integrated intel GPU is being used. In this instance, how can I use the discrete AMD gpu instead?

I'm testing with an old GPU, but the GPU and CPU are roughly the same vintage - ~2014-2015 timeframe. The intel GPU is a P530 and the AMD GPU is an AMD HD7850 I had lying around from my mining days.

I'm not interested in gaming. The features I am looking for are for sharing the GPU for desktop GUI enhancements and software like CAD and maybe video transcoding.

Also I don't necessarily care if the discrete GPU is better or worse than the intel GPU -at this time-. I'm just testing for now. Depending on how the tests shake out, I may decide to source a better GPU once I am more familiar with the features and limitations of what I'm trying to do. Obviously, if I can't get a discrete GPU to be used over the integrated GPU, there would be no point in spending money for a better GPU if it won't be used anyways.

I'm more interested in spreading the GPU load across multiple processes (LXC or VM) than I am with raw performance, at the moment.

Aside: Interestingly, I have one VM set to use the iGPU via PCI passthrough and the other VM is using VirGL. Both seem to run fine at the same time. However, GLXGears on the VM with PCI passthrough is running at 300fps while the VirGL gpu is claiming 1200FPS, both running simultaneously. Also however, it seems the VM with PCIe passthrough, which was started after the VirGL VM, is not actually using the intel GPU. The GL Vendor is being reported as Mesa, which I believe is software rendering. That might explain the difference in performance.
 
Last edited: