Single GPU sharing across multiple VMs

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Maxx.sonicfab
Posts: 6
Joined: 29. Mar 2021, 12:00
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 10

Single GPU sharing across multiple VMs

Post by Maxx.sonicfab »

Hi,
I'm testing multiple Windows 10 guests on Ubuntu 20.10 host.
The primary GPU is a 1Gb Nvidia Geforce GT 710, which is the only hardware graphic card available in my system.
The CPU (Intel Xeon E5-2690v4) has no embedded Intel graphics.

I've noticed that when I enable the 3D Acceleration in the Virtualbox guests display settings , the guest desktop environments show display errors and there is overall lack of performances.
Is Virtualbox capable to share the host GPU resources across multiple VMs?
Or is it only a limit of my lo-end GPU which could be solved with a better graphic card?

Thank you for any advice.
Maxx
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Single GPU sharing across multiple VMs

Post by scottgus1 »

Maxx.sonicfab wrote:Windows 10 guests ... when I enable the 3D Acceleration in the Virtualbox guests display settings , the guest desktop environments show display errors and there is overall lack of performances.
Try disabling Settings > Personalization > Colors > Transparency Effects in your Windows guests.
Maxx.sonicfab wrote:Is Virtualbox capable to share the host GPU resources across multiple VMs?
Virtualbox's 'video cards' inside the VMs are completely different sets of 'hardware' from the physical video card(s) in the host PC.

The VM does not ever actually see the host video card. When 3D is enabled, and Guest Additions are installed, the 3D calls done by the VM OS get calculated by Virtualbox on the host video card instead of on the CPU. However, the physical card's vide RAM does not ever get used by the VM.

So the video card in your PC is not limiting the performance of the VMs. Windows 10 seems to perform better if the transparency effects in the VM are turned off.
Maxx.sonicfab
Posts: 6
Joined: 29. Mar 2021, 12:00
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 10

Re: Single GPU sharing across multiple VMs

Post by Maxx.sonicfab »

Hi Scottgus1,
thanx for your feedback.
scottgus1 wrote: Try disabling Settings > Personalization > Colors > Transparency Effects in your Windows guests.
Ok I will do that
scottgus1 wrote: Virtualbox's 'video cards' inside the VMs are completely different sets of 'hardware' from the physical video card(s) in the host PC.

The VM does not ever actually see the host video card. When 3D is enabled, and Guest Additions are installed, the 3D calls done by the VM OS get calculated by Virtualbox on the host video card instead of on the CPU. However, the physical card's vide RAM does not ever get used by the VM.
If I understand well, Virtualbox uses host GPU resources and "pass the result" to the running VM OS (also with multiple running VMs?), which doesn't see the host video card at all.
Is it like that?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Single GPU sharing across multiple VMs

Post by scottgus1 »

Maxx.sonicfab wrote:If I understand well, Virtualbox uses host GPU resources and "pass the result" to the running VM OS
"host GPU resources" means "host GPU calculations" not "host GPU memory", if I understand it correctly myself. The 1GB RAM of your video card won't be touched, and the VM OS does not know there is a host video card. Otherwise I think you have it.
Maxx.sonicfab
Posts: 6
Joined: 29. Mar 2021, 12:00
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 10

Re: Single GPU sharing across multiple VMs

Post by Maxx.sonicfab »

scottgus1 wrote: "host GPU resources" means "host GPU calculations" not "host GPU memory", if I understand it correctly myself. The 1GB RAM of your video card won't be touched, and the VM OS does not know there is a host video card. Otherwise I think you have it.
Yes I meant "host GPU calculation" (sorry I'm a newbie). So VM OS will pass calculations to Virtualbox which will pass it to the host hardware GPU, but the process will rely on VM's allocated memory.
Is this correct?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Single GPU sharing across multiple VMs

Post by scottgus1 »

If I also understand it correctly, yes, that sounds correct.
Maxx.sonicfab
Posts: 6
Joined: 29. Mar 2021, 12:00
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 10

Re: Single GPU sharing across multiple VMs

Post by Maxx.sonicfab »

Thank you
Post Reply