Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
larsen.el
Posts: 4
Joined: 9. Mar 2021, 22:29

Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by larsen.el »

Software info:
  • VirtualBox 6.1.18 r142142
  • VirtualBox Extension Pack 6.1.18 r142142
  • Host: Windows 10 Pro for Workstations 20H2
  • Guest: Ubuntu 20.04.2 LTS (Guest additions are nstalled)
  • No updates available on either the host or guest
Computer specs:
  • Xeon W 10885M
  • Nvidia Quadro 5000 (VirtualBoxVM.exe explicitly set to use this one, verified w/ Task Manager)
  • 32 GB RAM
  • 4K screen
  • Windows is set to "performance" power plan
Settings I'm using:
  • VMSVGA and VBoxSVGA, no noticeable difference. VBoxVGA is slightly better, but not by much.
  • 256 MB VRAM
  • 8 GB allocated RAM
  • 4 out of 16 "cores" allocated (CPU has 8 physical cores but hyperthreading and all that)
  • 3D hardware acceleration enabled
  • VT-x/AMD-V, Nested Paging, KVM Paravirtualization
  • Hyper-V, Windows Hypervisor Platform, Virtual Machine Platform are all definitely disabled in Windows
  • I've tried both 100% scaling and 250% scaling (Windows default)
Here is a short clip of the performance I am getting. I can't post URLs because my account is too new so open it at your discretion. In case you can't view the video for whatever reason, opening the applications menu takes around ~2 seconds and the visuals update in massive blocks every 1-2 seconds. I'm not expecting host-level performance of course, but this is virtually unusable. I'd also rather not change the desktop if I can avoid it, as I'm quite fond of Ubuntu GNOME.

I see no reason why the performance is this bad. Am I doing something wrong, or are my memories of using VMs like Parallels on my old Mac with no significant performance issues inaccurate? And if so -- maybe this isn't the best place to ask, but I suppose it's worth a shot -- can I expect anything better from VMWare's offerings?
Last edited by larsen.el on 25. Mar 2021, 03:19, edited 5 times in total.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by scottgus1 »

Please right-click the guest in the main Virtualbox window's guest list, choose Show Log.

Search the far left tab's log for this text:

Attempting fall back to NEM

If you find it, Hyper-V is still enabled. See HMR3Init: Attempting fall back to NEM (Hyper-V is active).

If you don't find that text, save the far left tab's log, zip the log file, and post the zip file, using the forum's Upload Attachment tab.
larsen.el
Posts: 4
Joined: 9. Mar 2021, 22:29

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by larsen.el »

scottgus1 wrote:If you don't find that text, save the far left tab's log, zip the log file, and post the zip file, using the forum's Upload Attachment tab.
Sorry this took so long! I ended up uninstalling the VM because I had lost hope, but I reinstalled it again so I could upload the logs. I believe the only thing that's any different is the GPU for VirtualBoxVM.exe may no longer be set to my dGPU, but from the few seconds of testing I did, there seems to not be any difference. Anyways, here are the logs!
Attachments
Ubuntu-2021-03-11-03-35-25.zip
Logs
(45.08 KiB) Downloaded 11 times
Last edited by larsen.el on 25. Mar 2021, 03:15, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by mpack »

Trying reducing CPU cores to 2, and install up to date Guest Additions. I don't know why so many Linux distros insists on bundling the 6.0.0 GAs - it should be obvious that installing anything with a "x.0.0" version number is asking for trouble.
 Edit:  Never mind, I see that you update the GAs during the logged session. 
larsen.el
Posts: 4
Joined: 9. Mar 2021, 22:29

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by larsen.el »

mpack wrote:Trying reducing CPU cores to 2, and install up to date Guest Additions. I don't know why so many Linux distros insists on bundling the 6.0.0 GAs - it should be obvious that installing anything with a "x.0.0" version number is asking for trouble.
 Edit:  Never mind, I see that you update the GAs during the logged session. 
Yeah, I immediately installed the guest additions via the virtual CD feature of VirtualBox. I don't believe Ubuntu ever automatically installed any version of GAs, since I was unable to use many VirtualBox display features (e.g. automatic resolution resizing) until I installed them.

The thing that sticks out most to me is that VBoxVGA has noticeably faster performance than either VBoxSVGA and VMSVGA (I'd say somewhere in the range of 15 FPS when opening the start menu as opposed to 1-2 FPS with the other two). GNOME seems to have a tendency towards "newer" graphics features (for a Linux desktop at least), which makes me think there's something that the graphics drivers all seem to be mishandling. I know very little about virtualization software programming, so take this with a grain of salt, but if there were a bug in VirtualBox that's causing this, I'd start by looking there. Just a suggestion though; as I said, I am significantly out of my element in this context.

Edit: I forgot to mention, I have tried 1, 2, 4, 6, and 8 threads allocated to the VM. 1 thread was slower overall but there was no noticeable difference with all the others.
Last edited by larsen.el on 25. Mar 2021, 03:14, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by mpack »

larsen.el wrote:I don't believe Ubuntu ever automatically installed any version of GAs
All Ubuntu installs come with VirtualBox GAs.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by fth0 »

mpack wrote:I don't know why so many Linux distros insists on bundling the 6.0.0 GAs
Because they don't. ;)

You have to differentiate between the VirtualBox GA and the VirtualBox kernel modules. In many Linux distributions, the Linux kernel modules packages (e.g. linux-modules-extra-*) contain version 6.0.0 of the VirtualBox kernel modules vboxguest.ko and vboxsf.ko. They are automatically installed, as a baseline, independent of any VirtualBox GA. When the VirtualBox GA 6.x.y (from Oracle or from the Linux distribution) are being installed, they try to build version 6.x.y of the VirtualBox kernel modules, but often fail due to Linux kernel headers not being installed. In consequence, you end up with the combination of the VirtualBox kernel modules 6.0.0 and the VirtualBox GA 6.x.y.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by mpack »

Does that intervention have a purpose? The log says that GAs 6.0.0 is installed. I have no idea (and frankly don't care) what actual components are present, that is not the point. The point is that it is not the current version. Not by a long shot.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by fth0 »

mpack wrote:Does that intervention have a purpose?
You wrote a global statement that is technically not correct IMHO, so that triggered me to try and explain the global background, for the benefit of all readers. Additionally, it explains the difference between the OP's and your point of view.
mpack wrote:The log says that GAs 6.0.0 is installed.
The problem with that log message is that it is misleading, depending on what you call the VirtualBox GA. I'd assume that for most VirtualBox users, the VirtualBox GA are the set of features as described in the documentation, which are contained in an installable software package. And the log message does not indicate that any VirtualBox GA package has been installed at all:
Ubuntu-2021-03-11-03-35-25.log wrote:
00:00:07.742335 VMMDev: Guest Log: BIOS: Booting from CD-ROM...
00:00:37.517717 VMMDev: Guest Additions information report: Version 6.0.0 r127566 '6.0.0'
[...]
00:04:58.365504 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:05:01.264320 VMMDev: Guest Additions information report: Version 6.0.0 r127566 '6.0.0'
[...]
00:19:26.731230 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:19:30.055276 VMMDev: Guest Additions information report: Version 6.0.0 r127566 '6.0.0'
00:21:02.061526 File system of 'C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso' (DVD) is ntfs
00:21:34.032132 VMMDev: Guest Log: 08:33:08.423494 main     VBoxService 6.1.18 r142142 (verbosity: 0) linux.amd64 (Jan  7 2021 17:26:51) release log
[...]
00:22:14.005108 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:22:17.718624 VMMDev: Guest Additions information report: Version 6.1.18 r142142 '6.1.18'
00:22:28.807119 VMMDev: Guest Log: 08:34:04.635370 main     VBoxService 6.1.18 r142142 (verbosity: 0) linux.amd64 (Jan  7 2021 17:26:51) release log
After boot #1, #2 and #3, the baseline VirtualBox kernel module 6.0.0 was loaded, but there had been no VirtualBox GA package installed so far. The installation then took place, and after boot #4, the VirtualBox kernel module 6.1.18 was loaded and the VirtualBox GA 6.1.18 were started.

If the VirtualBox kernel module version had still been 6.0.0 after boot #4 instead, it would have indicated with a high probability that the build of the VirtualBox kernel module had failed. We've seen that situation very often in the previous years, but it is not the case here.

Regarding the original problem: I don't see any indication of a performance problem in the Ubuntu-2021-03-11-03-35-25.log file, and I'd guess that it is related to the 4k screen resolution.
larsen.el
Posts: 4
Joined: 9. Mar 2021, 22:29

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by larsen.el »

fth0 wrote:Regarding the original problem: I don't see any indication of a performance problem in the Ubuntu-2021-03-11-03-35-25.log file, and I'd guess that it is related to the 4k screen resolution.
This was my next guess, but I get similar performance even when I set the virtual display to sub-1080p resolutions. For what its worth, the default/startup resolution (I believe it's 640x480 (VGA) or something? Don't quote me on that) is actually buttery smooth until I resize the resolution. I thought that was just because VGA is VGA at first, but then I discovered that the performance doesn't recover even if I set it back to 640x480. I'm not sure what exactly this might imply, but it seems unusual.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Is this the performance I should expect from VirtualBox, or is something horribly wrong here?

Post by fth0 »

If you write simple step by step instructions how to reproduce the behavior, and if you can successfully reproduce the behavior with them, I'd be willing to try them out myself ...
Post Reply