VirtualBox VMSVGA vGPU performance

Discussions about using Linux guests in VirtualBox.

VirtualBox VMSVGA vGPU performance

Postby DeinAbi » 30. Jul 2019, 13:32

Hi all,

after installing VirtualBox6 with the new VMSVGA driver I was expecting the get the same or similar GPU performance as in vmware workstation player, because (at least I though so) both are using the same driver. Sadly the GPU performance in VirtualBox is not comparable with vmware. I use the VM for development the whole day and thus notice that switching between windows, tabs, workspaces is not as smooth as in vmware.

Recently I was running some tests just to make sure that the issue is not on my end. So I made sure that VirtualBox is using the dedicated NVidia GPU in my laptop, which I verified by using the task manager and looking at which processes are using GPU-1 (which is NVidia in my case). both vmware and VirtualBox use the NVidia GPU.

While doing that I noticed that
- vmware is using around 90-100% of NVidia GPU and around 30-40% of CPU as shown in task manager.
- VirtualBox never uses more then 70% of the NVidia GPU and around 12% of CPU as sown in task manager.

In both cases I started the VM and ran glxgears in fullscreen (basically causing the load with glxgears).

Also, and I know this is not a tool for benchmarking, running glxgears gives 150-200 FPS in VirtualBox, 1700-2000 in vmware

In vmware I can assign up to 3GB of RAM to the GPU, but that should not matter in case 3d acceleration is enabled, right?

So I guess my question is, is anyone aware of a fact that VMSVGA in VirtualBox IS in fact slower then the (same?) driver in vmware? Or does the lower usage of the NVidia GPU and CPU by VirtualBox indicate some kind of bug in VirtualBox?

My host is windows 10 with Intel and NVidia Quadro GPUs, guest Ubuntu 18.04 with proper guest additions installed.
Attachments
Logs.zip
(60.09 KiB) Downloaded 8 times
DeinAbi
 
Posts: 13
Joined: 17. Jul 2019, 18:41

Re: VirtualBox VMSVGA vGPU performance

Postby piggyz » 31. Jul 2019, 13:12

DeinAbi wrote:Also, and I know this is not a tool for benchmarking, running glxgears gives 150-200 FPS in VirtualBox, 1700-2000 in vmware.

In vmware I can assign up to 3GB of RAM to the GPU, but that should not matter in case 3d acceleration is enabled, right?

So I guess my question is, is anyone aware of a fact that VMSVGA in VirtualBox IS in fact slower then the (same?) driver in vmware? Or does the lower usage of the NVidia GPU and CPU by VirtualBox indicate some kind of bug in VirtualBox?

My host is windows 10 with Intel and NVidia Quadro GPUs, guest Ubuntu 18.04 with proper guest additions installed.

I get between 300 and 1000, it depends from which Linux Guest I do run. Glxinfo command should give you a lot of information to debug the problem. It could be related with the lack of some feture in the way you/or your distro maintainer had build the vmgfx driver.

Then I do agree with you: the same driver perform better in VMware environment. I even get 3000 under VMware and it is definitely a lot more stable. We have to consider this is a new implementation for Virtualbox. so we maybe should wait a bit more to see some improvement, even if for my need the actual performance is pretty ok.

A problem I saw, is some Chrome/Chromium (and browsers based on them) when I tun them using vmware graphic emulation. It doesn't happen everytime, then it still happen sometimes.
piggyz
 
Posts: 46
Joined: 13. Feb 2013, 12:28

Re: VirtualBox VMSVGA vGPU performance

Postby DeinAbi » 1. Aug 2019, 18:48

piggyz wrote:I get between 300 and 1000, it depends from which Linux Guest I do run. Glxinfo command should give you a lot of information to debug the problem. It could be related with the lack of some feture in the way you/or your distro maintainer had build the vmgfx driver.

Yes I was already checking glxinfo and there are some differences, although I thought they probably don't matter. But here they are (G is just an alias for "| grep -i").
VirtualBox
Code: Select all   Expand viewCollapse view
➜ glxinfo G opengl
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
OpenGL version string: 2.1 Mesa 19.0.2
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 19.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:


vmware workstation player 15
Code: Select all   Expand viewCollapse view
➜ glxinfo G openGL                                                            16:38:43
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.0.2
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.3 (Compatibility Profile) Mesa 19.0.2
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 19.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:


piggyz wrote:We have to consider this is a new implementation for Virtualbox. so we maybe should wait a bit more to see some improvement, even if for my need the actual performance is pretty ok.

Yes, the performance is "ok", although I say that only because I use i3 as my window manager which is very lightweight. In regular Gnome Shell it is not acceptable in my opinion.

But yea, it is a new implementation and thus bugs are to be expected. I hope that some expert can take a look at the information here in the thread, for me the lower CPU/GPU utilization in VirtualBox compared to vmware is kind of a hint at some problem.
DeinAbi
 
Posts: 13
Joined: 17. Jul 2019, 18:41

Re: VirtualBox VMSVGA vGPU performance

Postby piggyz » 2. Aug 2019, 14:53

I repeat there is something wrong with your system: for me VMSVA3D driver performance is perfectly fine under ever Plasma desktop, GNome3 is simply perfect and very fast. The implementation as some obvious glitch like the one I pointed out in my other post, example not often Google Chrome (and derivate browser) plays well with VMSVA3D driver under Virtualbox (Linux guests), then people at virtualbox say there do not have enough resources to deal with this, so do not expect improvements in short time frame.
piggyz
 
Posts: 46
Joined: 13. Feb 2013, 12:28

Re: VirtualBox VMSVGA vGPU performance

Postby DeinAbi » 3. Aug 2019, 02:15

I am pretty sure that there is nothing wrong with my setup. First of all, the VMs are just freshly installed Ubuntu 19.04 with Guest Additions, nothing more.

Here are my "test parameters":
- 1 Display, 1920x1200px, 256 VRAM in VirtualBox, 2GB VRAM in vmware.
- Start VM in fullscreen mode.
- I start a normal Ubuntu session on the login screen (not wayland, because if performs worse, which is a wayland problem).
- After I can see the desktop, I open a terminal and start glxgears inside and make glxgears fullscreen.
- Then I just press Windows Button repeatedly, which minimizes all windows and shows them in whatever this mode is called, then back to normal. Since this is being done in 3d fashion, I always notices here the quicktest that a VM is not fast enougn.

So to summarize, in VirtualBox running an Ubuntu vm 19.04 the minimizing of the windows is not nearly as smooth as in vmware. I just tested it again.

I would be great if someone could replicate the test conditions and report if they have any issues.


You need to have realistic conditions for your tests. I can imagine if you start a VM with very low resolution then I can imagine the performance being good.
DeinAbi
 
Posts: 13
Joined: 17. Jul 2019, 18:41

Re: VirtualBox VMSVGA vGPU performance

Postby DeinAbi » 21. Aug 2019, 11:40

Any chance that some developer can have a look into this?

My question is still the same as in the OP:
Is it a fact that VMSVGA is slower in VirtualBox compared to vmware, assuming it is the same driver? Or does the lower usage of the NVidia GPU and CPU (compared to vmware) by VirtualBox indicate some kind of bug in VirtualBox?
DeinAbi
 
Posts: 13
Joined: 17. Jul 2019, 18:41

Re: VirtualBox VMSVGA vGPU performance

Postby DeinAbi » 7. Sep 2019, 12:24

DeinAbi wrote:VirtualBox
Code: Select all   Expand viewCollapse view
➜ glxinfo G opengl
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
OpenGL version string: 2.1 Mesa 19.0.2
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 19.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:


vmware workstation player 15
Code: Select all   Expand viewCollapse view
➜ glxinfo G openGL                                                            16:38:43
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.0.2
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.3 (Compatibility Profile) Mesa 19.0.2
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 19.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:




Ok for some reason I totally missed that that there are probably some important differences in the output.

OpenGL version string: 3.3 (Compatibility Profile) Mesa 19.0.2
vs
OpenGL version string: 2.1 Mesa 19.0.2

So the VirtualBox Guest Additions are reporting a lower OpenGL version, although the driver is probably capable to support newer version like in vmware player.

Can someone confirm that my observations regarding performance (especially the lower GPU+CPU consumption in the host in the case of VirtualBox, which has overall lower performance compared to vmware player) could have something to do with this?

And, is anyone aware of a hack to let my guest OS "think" that the vGPU has OpenGL 3.3 capabilities?
DeinAbi
 
Posts: 13
Joined: 17. Jul 2019, 18:41


Return to Linux Guests

Who is online

Users browsing this forum: multiOS and 14 guests