Host and VMs freezup when starting second VM

Discussions related to using VirtualBox on Linux hosts.
Post Reply
falcon74
Posts: 32
Joined: 4. Jun 2018, 20:02

Host and VMs freezup when starting second VM

Post by falcon74 »

Hi,

In my setup where the host is running Lubuntu 19.04 64-bit on an Intel i5-8400 (6 cores) + 8GB RAM, and running Virtualbox 6.0.14 r133895, I noticed a strange and repeatable issues where the host (and perhaps the VMs but I can't tell), freeze up or become tremendously slow (with heavy disk-activity) when a second guest VM is launched. The mouse cursor grinds to a halt (seems to move a little every 30-40 second later), screen refresh doesn't happen, keyboard too seems unresponsive, and any audio (s.a. HTTP streaming music or VLC playing local mp3 file) also stops.

However, for the same VMs, there is no issue when only 1 guest VM is running in isolation, and I've run the setup for months now. Only recently have I needed to run both guest VMs simultaneously. The two guest VMs in question are:
  • Lubuntu 18.04 64-bit VM w/ guest-additions (2 vCPU, 3GB vRAM, 16MB VMSVGA display, 20GB vDisk)
  • Windows 10 home 64-bit VM w/ guest-additions (2 vCPU, 2GB vRAM, 128MB VBoxSVGA display, 20GB vDisk)
Please note that my host root fs is installed on SDD, but the guest VM virtual-disks are on my HDD. Initially I thought it might be an issue as both guest VMs were supposed to run full-screen. The first time the issue happened, I remember seeing a message on screen that indicated something like another VM is running "full-screen". Subsequent times, I have not noticed it.

The issue is seen when either Windows guest VM is already running and I launch the Linux guest VM, or vice-versa. Looking at the logs, in both cases it seems there are the "Guest seems to be unresponsive" errors. Here is the latest log file from the Linux guest VM, seem is reported as "Aborted":
87:55:05.083338 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 6 seconds ago
87:55:05.522589 VMMDev: GuestHeartBeat: Guest is alive (gone 7 688 280 050 ns)
87:55:06.583362 OHCI: Software reset
87:55:15.138840 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 8 seconds ago
87:55:15.258886 OHCI: USB Operational
87:55:15.930473 VMMDev: GuestHeartBeat: Guest is alive (gone 10 409 952 015 ns)
regards,
Bani
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Host and VMs freezup when starting second VM

Post by mpack »

Please provide a VM log file. With the VM fully shut down, right click it in the GUI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
falcon74
Posts: 32
Joined: 4. Jun 2018, 20:02

Re: Host and VMs freezup when starting second VM

Post by falcon74 »

Sorry, it took a while to get back, as I was travelling and not using this PC. Logs are attached.
Attachments
VMlog.zip
(59.73 KiB) Downloaded 14 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Host and VMs freezup when starting second VM

Post by socratis »

falcon74 wrote:the host (and perhaps the VMs but I can't tell), freeze up or become tremendously slow (with heavy disk-activity) when a second guest VM is launched
falcon74 wrote:there is no issue when only 1 guest VM is running
falcon74 wrote:the guest VM virtual-disks are on my HDD
Given these statements, what do you think the issue might be? To me it's more than obvious that there's a lot of Host and Guest I/O going on, something that your Host can't handle.
falcon74 wrote:Windows 10 home 64-bit VM w/ guest-additions (2 vCPU, 2GB vRAM, 128MB VBoxSVGA display, 20GB vDisk)
That low of RAM allocation for a Win10-64 Guest is going to lead the Guest in swapping, which means a lot of Guest I/O, which means your Host will have to do a lot of I/O.

Remember that simple rule:
  • Total CPUs for your guests + 1 Host CPU cores.
  • Total RAM+vRAM+overhead for your guests Host available RAM + some.
Then you got to remember that if the Host starts using more than 75% of its total RAM, it has to do a lot of swapping too...

I believe you have to lower your expectations as to what you can do with virtualization...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
falcon74
Posts: 32
Joined: 4. Jun 2018, 20:02

Re: Host and VMs freezup when starting second VM

Post by falcon74 »

Hi @socratis,

Since I've been using Virtualbox for quite a while, I've aware of the CPU and RAM over-commit challenge (i.e. recommendation against it). The RAM especially is very carefully allocated, and CPU should be okay too. Here is why:
  • Host: 6 cores, 7.2GB RAM (minus the RAM used by intel-HDA GPU as per my settings). When issue happened, the host had Firefox browser with 3-4 tabs, WPS Office Presentation and 1 Virtualbox VM + manager open. Collective RAM utilization was about 3GB.
  • Windows VM: 2 vCPUs (~= 2 cores), 2GB vRAM. When the freeze-up followed by crash happened there was 1.0-1.1GB of RAM utilized in by Firefox running with 4 tabs and few other light background applications.
  • Linux VM: 2 vCPUs (~= 2 cores), 3GB vRAM. When the issue happened, there was just VScode with few extensions running, and an Apache Derby DB in network mode running, with memory consumption that was south of 1.2GB as well.
The above are not cooked up numbers, because I verified those through multiple repeats of the issues, and indeed the high disk usage did point to heavy swapping as the potential issue, but the numbers don't seem to add up. I do not have RAM utilization when 2nd VM starts up, but it should not add more than 3.5MB RAM at worst. I have ordered a 16GB RAM stick and will retest the setup once it is installed.

regards,
BD
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Host and VMs freezup when starting second VM

Post by socratis »

falcon74 wrote:I have ordered a 16GB RAM stick and will retest the setup once it is installed
I have the feeling that you're going to be pleasantly surprised... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
falcon74
Posts: 32
Joined: 4. Jun 2018, 20:02

Re: Host and VMs freezup when starting second VM

Post by falcon74 »

Sure hope so! :-)
Will try to see if pointing the Swap to SSD instead, might help a bit in the interim.
Post Reply