Page 1 of 1

[Resolved] VirtualBox 6.0 brutally slow with AMD Threadripper 2

PostPosted: 28. May 2019, 20:48
by dan397
I do a lot of scientific computing, and I recently switched from an old Intel i7-3960x workstation to a custom Threadripper 2990wx build with 128Gb of RAM. I use VMs to test our software on various platforms, and of course I was excited to have so many cores to distribute among test VMs. I am using the same basic setup as I did with the i7 system: VirtualBox on a Fedora host system (currently v29), running CentOS, Ubuntu, and Fedora guest OS systems for test purposes. The VMs on the threadripper system seem to work, but they are brutally slow. There is terrible input lag and the systems require tens of minutes just to boot up. But they do appear to run, so there is no clear error state.

Has anyone else experienced this? Does anyone know how much AMD-related testing there has been w.r.t. VirtualBox and threadrippers? A basic search for "threadripper" didn't turn up much here.

Re: VirtualBox 6.0 brutally slow with AMD Threadripper 2

PostPosted: 29. May 2019, 20:29
by dan397
Performed a regression test: removed vb-6.0.x and installed vb-5.2. Performance of test VMs was completely normal with v5.2. Therefore the issue is specifically with the new v6.0 release.

Re: VirtualBox 6.0 brutally slow with AMD Threadripper 2

PostPosted: 29. May 2019, 20:36
by dan397
Next test: VBox 6.0 on an intel i7 laptop running Fedora 29. CentOS 7 guest OS VM worked normally. Therefore I believe the issue is specifically with VBox 6.0 and AMD processors. Or at least my AMD processor, which is the 2990wx. Next test: reboot to Windows 10 and install VBox 6.0 to see if the host OS is involved.

Re: VirtualBox 6.0 brutally slow with AMD Threadripper 2

PostPosted: 30. May 2019, 08:56
by socratis
Excellent triage job so far! 8)
May I suggest another test, not sure if you've done it or not; different 6.0.x versions, to make sure that it's a 6.x issue, and not a 6.0.i vs 6.0.j issue.

And if you could grab a VBox.log from a failing and a working version? A complete VBox.log, from a complete VM run, where the problem occurs:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe problem / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image

Re: VirtualBox 6.0 brutally slow with AMD Threadripper 2

PostPosted: 12. Jun 2019, 09:17
by VersedBook0
Just so you know you're not alone, I've also found quite a slow down since upgrading to 6.
Also with an AMD CPU, but an older 8 core 8150. Linux Host (Mageia 6)

My VMs don't seem quite as slow as yours but absolutely slower. The scroll wheel is the most noticeable, it no longer zoom, you have to wait.

Re: VirtualBox 6.0 brutally slow with AMD Threadripper 2

PostPosted: 12. Jul 2019, 11:42
by tonystark78
I've got the same CPU, 2990WX, the virtualbox machine Windows 10 takes forever to load. I had to disable Hyper-V at the main OS start...(windows 10). After waiting 10 minutes it loads correctly and it has pretty decent performance..

Virtualbox 6 + AMD Threadripper 2: poor performace

PostPosted: 6. Sep 2019, 22:46
by mastupristi
I have the very same problem described in this post https://forums.virtualbox.org/viewtopic.php?f=7&t=93320

I just tried with last Virtualbox version (6.0.12), and the performance was incredibly low. I attach the zipped log.
I was forced to downgrade to version 5.2.32. With it the performances are back to normal.

And why can't I assign more than 16 CPUs (8 recommended) to the VM (neither with 6.0.12 nor with 5.2.32)?
Screenshot_2019-09-06_22-43-16.png
Screenshot_2019-09-06_22-43-16.png (32.97 KiB) Viewed 3619 times


best regards
Max

Re: VirtualBox 6.0 brutally slow with AMD Threadripper 2

PostPosted: 7. Sep 2019, 09:19
by socratis
mastupristi wrote:I have the very same problem described in this post viewtopic.php?f=7&t=93320
Which is exactly the reason that your post got merged with that thread...

mastupristi wrote:And why can't I assign more than 16 CPUs (8 recommended) to the VM (neither with 6.0.12 nor with 5.2.32)?
I don't know but something is really funky about that CPU and the way that VirtualBox sees it:
00:00:00.513737 NumCPUs <integer> = 0x0000000000000008 (8)
00:00:00.633358 CPUM: Logical host processors: 64 present, 64 max, 64 online, online mask: ffffffffffffffff
00:00:00.634288 CPUM: Physical host cores: 8
00:00:00.634691 Full Name: "AMD Ryzen Threadripper 2990WX 32-Core Processor"
I don't think I've seen 8 threads per core before, something's wrong here! :shock:
AMD (and almost everyone that I could find) claim 32 cores/64 threads (which makes a lot more sense).

You need to lower the number of CPUs that you've assigned to your guest. For whatever reason (could be a bug) VirtualBox sees 8 cores. You can't assign all of them to your guest, slowdowns will happen...

00:00:00.465823 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenAvailableGeometryCalculated:
Screen 0 work area is actually resized to: 0x33 x 3840x2086
That's *a lot* of virtual pixels that your CPU-driven, virtual GPU (vGPU) must handle. Expect slowdowns.

00:00:00.513939 [/Devices/ahci/0/LUN#0/Config/] (level 5)
00:00:00.513940 BlockCache <integer> = 0x0000000000000001 (1)
Go to the VM Settings » Storage » select your SATA controller » Use Host I/O Cache: enable that.

00:00:00.514176 [/Devices/usb-ehci/] (level 2)
You might want to change the USB controller to xHCI (USB3).

00:00:00.514222   3DEnabled        <integer> = 0x0000000000000000 (0)
00:00:00.514230 VRamSize <integer> = 0x0000000003000000 (50 331 648, 48 MB)
Go to the VM Settings » Display » Screen. Change the Graphics controller from "VBoxVGA" to "VMSVGA". Enable 3D acceleration. Increase the VRAM to the max 128 MB.

00:00:00.452882 VirtualBox VM 6.0.12 r133076 linux.amd64 (Sep  3 2019 12:51:52) release log
00:00:18.575135 VMMDev: Guest Additions information report: Version 6.0.6 r130049 '6.0.6'
You need to update the GAs. With the VM window having the focus, go to the host's menu "Devices" » "Insert Guest Additions CD Image...". If not prompted by auto-run, run "VBoxLinuxAdditions.run" from the CD. Make sure there are no errors or suggestions during the install. You can safely ignore the "modprobe vboxsf" one.

Re: VirtualBox 6.0 brutally slow with AMD Threadripper 2

PostPosted: 7. Sep 2019, 21:25
by mastupristi
socratis wrote:You need to lower the number of CPUs that you've assigned to your guest. For whatever reason (could be a bug) VirtualBox sees 8 cores. You can't assign all of them to your guest, slowdowns will happen...
How to report this bug?

I've been following all your advice. The performances are now absolutely acceptable.

For completeness I attach the last log

The only other issue left is the incorrect detection of the number of physical cores.

best regards
Max