Page 1 of 3

Very poor performance Mac OS host

Posted: 17. Feb 2019, 14:00
by exharris
Host device : MacBook Pro 13inch 2017 model, 8Gb RAM, Core i5 CPU
Host OS : MacOS 10.14.3 Mojave
Virtual Box 6.0.4
Guest OS Linux Mint Mate 19 1

I am getting very slow performance on this guest, when moving windows it stutters. When playing short MP4 videos in VLC, the app goes non-responsive and is incredibly slow to respond to input.

The relevant VM settings are :-

Video RAM : 128Mg
Base Memory : 2048 Mb
CPU : 2
Acceleration > Virtualization : Default
Hardware virtualization : Enabled nested paging (no other option appears here)

As a point of comparison, my rather old Windows 10 PC (Core i5 3450 Ivy Bridge @ 3.10Ghz, 8Gb RAM) runs the same guest OS much better and faster.

The only difference I can see in the VM options it that my PC has the additional option of 'VT-x AMD-V' Hardware virtualization.

Can anyone advise?

Are MacBook Pros just not great for VirtualBox?

Re: Very poor performance Mac OS host

Posted: 17. Feb 2019, 14:40
by Martin
Your old PC has a quadcore i5 CPU which handles an 2 vCPU guest VM much better than the dualcore i5 CPU in your MacBook Pro.
You could try if setting the guest to a single vCPU improves the performance. This would leave your Mac OS host a free CPU core to handle the VM.

Re: Very poor performance Mac OS host

Posted: 19. Feb 2019, 01:17
by brycesteiner

Code: Select all

Are MacBook Pros just not great for VirtualBox?
Not anymore. It performs extremely well on my old 2011 27" iMac but not run-able on my 2018 MPB (32GB) Virtualbox has not kept up with any of the new hardware support such as Metal. It's too bad because I loved it. If you have older hardware it's fine.
If you have Windows host it's fine. If you have the newer hardware with T2 chip you may want to consider other VM software such as Parallels - which imported my VM's just fine. If virtualbox would keep up, I would gladly pay for it.

Re: Very poor performance Mac OS host

Posted: 19. Feb 2019, 02:15
by socratis
@brycesteiner,

I have:
  • A 2015 15" MBP retina (MacBookPro11,5) with 10.11.6, 10.12.6, 10.13.6, 10.14.3,
  • A 2011 17" MBP (MacBookPro8,3) with 10.9.5, 10.11.6, 10.12.6, 10.13.6.[1]
VirtualBox runs just fine on any combination of laptop/OS, so, I'm not quite sure what exactly you're referring to, honestly. And the last time I asked you for extra information/clarification, you didn't provide any, so...

And no, you keep insisting on post after post about "Metal" support. Absolutely nothing to do with it. Just because a fancy new term/API shows up, doesn't mean that if you don't "translate" your apps to work with the new API, they won't work nicely. Case in point? The X-plane flight simulator; it doesn't use Metal, it uses OpenGL. And please don't tell me that a flight simulator doesn't need high performance graphics...

[1]: Yes, I am missing a 10.10.5 in there, didn't bother, not enough space...

Re: Very poor performance Mac OS host

Posted: 20. Feb 2019, 17:24
by clouddev
https://www.virtualbox.org/ticket/16436

On my MacBookPro 2018 system with Linux guests, only VBox 5.0.40 works smoothly. Anything newer lags. This is well documented (see post above). I updated to Mojave today and couldn't run 5.0.x anymore and had to update to VBox 6. The UI is now sluggish. Is there a workaround to run 5.0.x in Mojave? That is the last Vbox that worked well in MacOS.

Re: Very poor performance Mac OS host

Posted: 20. Feb 2019, 17:33
by socratis
clouddev wrote:That is the last Vbox that worked well in MacOS.
If you read my post, just above yours, I have a wide range of OSX hosts running on HiDPI and non-HiDPI hosts. And I have no problem at all. With any combination. So, something is different about your setup. And unless I see a log, I won't have the slightest idea...

Re: Very poor performance Mac OS host

Posted: 20. Feb 2019, 19:03
by clouddev
Happy to provide logs to try and get to the bottom of this.

Re: Very poor performance Mac OS host

Posted: 20. Feb 2019, 19:10
by clouddev
I recorded a video showing the sluggish UI behavior: https://photos.app.goo.gl/8na3Ae8hN36Ko4Y56 Comparison of smooth window movement in MacOS, then I switch to a full-screen Kubuntu Linux VM and drag a terminal around. You can see how choppy the Linux side is (window lags cursor, for example, and doesn't move smoothly.)

Re: Very poor performance Mac OS host

Posted: 20. Feb 2019, 19:46
by andyp73
VBox.log wrote:
00:00:01.664425   NumCPUs           <integer> = 0x0000000000000006 (6)
00:00:01.849407 CPUM: Physical host cores: 6
You have assigned all of the host CPU cores (the thing VirtualBox cares about) to the guest. VirtualBox is an application running on the host and so by assigning all the cores to the guest you run the risk of starving the host.
VBox.log wrote:
00:00:10.776722 VMMDev: Guest Additions information report: Version 5.0.40 r115130 '5.0.40'
These are very old guest additions. If you are trying to run VirtualBox v6.0.04 you should update these so that they match.
VBox.log wrote:
00:00:01.855454 AIOMgr:     /Users/yan/vm/disks/vms/{7c582bfe-1c4d-4c26-b23c-da7b505ca990}.vdi
00:00:01.855460 AIOMgr:     /Users/yan/vm/disks/vms/{0f9b30e0-e798-4941-8976-27e11f3c66f7}.vdi
00:00:01.855465 AIOMgr:     /Users/yan/vm/disks/vms/{c03351ba-f8ea-497e-8c64-5eecc778043b}.vdi
00:00:01.855470 AIOMgr:     /Users/yan/vm/disks/vms/{54716e23-272d-4394-a8af-e98c29be9f29}.vdi
00:00:01.855474 AIOMgr:     /Users/yan/vm/disks/vms/{d4dad936-b4c7-4e11-b298-1dd88c714514}.vdi
00:00:01.855479 AIOMgr:     /Users/yan/vm/disks/vms/{a486678e-efdf-4fa9-a5e1-f9dd397c35ff}.vdi
00:00:01.855484 AIOMgr:     /Users/yan/vm/disks/vms/{d0fbf47e-78c3-4c60-8927-aa9184e95805}.vdi
00:00:01.855489 AIOMgr:     /Users/yan/vm/disks/vms/{c8017b85-118b-497e-a724-3d0b5d308f68}.vdi
00:00:01.855501 AIOMgr:     /Users/yan/vm/disks/vms/{367acd57-a9ae-49dd-80ef-b8aeb26fec52}.vdi
00:00:01.855513 AIOMgr:     /Users/yan/vm/Kubuntu14/vmwork.vdi
00:00:01.855518 AIOMgr:     /Users/yan/vm/disks/vms/{e34a4fef-2df7-405d-bf17-656b59042b2d}.vdi
00:00:01.855523 AIOMgr:     /Users/yan/vm/disks/vms/{78b0caa5-a896-4df4-a8a9-8ab6afc2603b}.vdi
00:00:01.855536 AIOMgr:     /Users/yan/vm/disks/vms/{bd695fd9-14ad-4d37-afdf-0b5aeed7ec11}.vdi
00:00:01.855545 AIOMgr:     /Users/yan/vm/disks/vms/{68fcb554-8735-4068-a66e-a2a3d87ba183}.vdi
00:00:01.855550 AIOMgr:     /Users/yan/vm/disks/vms/{33e70ecc-9562-4cb4-95db-dc6d7eb6f607}.vdi
00:00:01.855555 AIOMgr:     /Users/yan/vm/disks/vms/{167dfa49-ff17-4e99-8a74-d12046edcded}.vdi
00:00:01.855559 AIOMgr:     /Users/yan/vm/disks/vms/{24666434-e1dd-4347-a3c9-34220542b302}.vdi
00:00:01.855563 AIOMgr:     /Users/yan/vm/disks/vms/{caa6b441-42a7-4b82-aa2a-9e62d997bdb3}.vdi
00:00:01.855568 AIOMgr:     /Users/yan/vm/disks/vms/{7946941f-b497-4cc2-8243-ee9807de8965}.vdi
00:00:01.855573 AIOMgr:     /Users/yan/vm/Kubuntu14/Kubuntu14.vdi
This looks like you have lots of snapshots. They probably aren't causing your problem but each one makes the guest that much more fragile.

-Andy.

Re: Very poor performance Mac OS host

Posted: 20. Feb 2019, 20:42
by clouddev
Thanks for looking at the logs.

> These are very old guest additions. If you are trying to run VirtualBox v6.0.04 you should update these so that they match.

This VM is Kubuntu 14 and if I update to guest addons 6.0 KDE no longer starts.

> You have assigned all of the host CPU cores (the thing VirtualBox cares about) to the guest. VirtualBox is an application running on the host and so by assigning all the cores to the guest you run the risk of starving the host.

I normally run with 2 cores but increased to 6 today to try to improve UI performance.

> This looks like you have lots of snapshots. They probably aren't causing your problem but each one makes the guest that much more fragile.

I didn't know about that. How does it make it fragile? Will losing any of the snapshots cause the VM to stop working?


I just installed the newest version of Fedora (29), uninstalled the guest add-ons it came with, and installed the ones from 6.0.4. Performance is the same - sluggish when dragging windows, worse than VBox 5.0.x. Including log from the new Fedora VM w/ new add-ons here. Thanks!

Re: Very poor performance Mac OS host

Posted: 20. Feb 2019, 20:43
by clouddev
Forgot to attach logs from previous reply.

Re: Very poor performance Mac OS host

Posted: 24. Feb 2019, 07:44
by socratis
clouddev wrote:I normally run with 2 cores but increased to 6 today to try to improve UI performance.
Um... no, you don't:
00:00:01.336324 NumCPUs <integer> = 0x0000000000000001 (1)
00:00:01.516032 CPUM: Physical host cores: 6
Increase (actually) the vCPUs to 2.
00:00:13.255979 VMMDev: Guest Additions information report: Version 5.2.0 r68940 '5.2.0'
You need to update your GAs. Don't forget that step when you're updating your main VirtualBox module. And don't also forget to eject the GAs ISO once you're done with the installation.
00:00:16.661603 GUI: UIMachineView::sltHandleNotifyChange: Screen=0, Size=2352x1518
That certainly will not help you and you need to change it ASAP! You need to go to the VirtualBox Preferences » Display » Scale Factor » All monitors: 200%. And then change your display (from within the guest) to something that approaches "reality", something no more than 1280x1024.

You see, your "MacBookPro15,1" may have a 2880x1800 resolution (5.18 Mpx), but not even OSX will show you that, because:
  1. you'd need a magnifying glass, and
  2. that's way too many pixels to move around.
So, OSX shows you a max of 1920x1200 (2.3 Mpx). That's 1/2.25 (44%) less, a huge relief on your graphics. If your native OSX is doing that, shouldn't you be doing the same with your VMs, which are way less powerful, having a fake GPU and all?

Re: Very poor performance Mac OS host

Posted: 24. Feb 2019, 20:33
by clouddev
Thanks for the suggestions. Updating GAs to 6.0.4, running more VCPUs and changing display scaling to 200% and lowering VM resolution to 1280x1024 did not make a noticeable difference in UI performance.

Re: Very poor performance Mac OS host

Posted: 24. Feb 2019, 23:53
by socratis
clouddev wrote: did not make a noticeable difference in UI performance.
Hmm... time for the big report. Start the VM from a cold boot, login, move a window or two to observe the performance slowdown, shut down the VM. Open up Terminal and type the command:
  • VBoxBugReport "<VMname>"
where "<VMname>" is the actual name of the VM, "Fedora 29" according to the last log. This will generate a "YYYY-MM-DD-hh-mm-ss-bugreport.tgz" file in the current directory (most probably your home directory). Attach that file in your response.

BTW, is this the only VM that you have a problem with?

Re: Very poor performance Mac OS host

Posted: 26. Feb 2019, 04:49
by clouddev
Cold boot, login, UI activity and shutdown. Attaching bug report here. That's not the only VM I have this issue with. All Linux VMs I've tried have exhibited this behavior (Kubuntu 14,16,18 and Fedora 2x). Thanks