Guest Additions periodically causes extreme slowdown in guest vm

Discussions related to using VirtualBox on Windows hosts.
TomG
Posts: 18
Joined: 15. Aug 2018, 22:07

Guest Additions periodically causes extreme slowdown in guest vm

Post by TomG »

I'm running a Windows 10 guest on a Windows 10 host. Both are Win10 Pro build 1709 on a PC with an i7-8700K with 64 Gb RAM and a Quadro P2000 video card. I have 24 gig of RAM and 4 of the 6 cores dedicated to the VM. I do not have 3D acceleration turned on. I have two monitors and use both of them in the VM.

Most of the time when using the VM there is little or nothing else running on the host. I installed VB on August 16 and created the VM at that time.

When I boot up the VM it works great. Sometimes it works great for an entire day. But sometimes it will suddenly become so slow as to be useless—20 or 30 second or longer delays between a keyboard or mouse action and the execution of the action. When everything is working smoothly and I look in task manager, the VB Guest Additions shows 0% CPU usage. When everything slows down it shows 10 to 20% CPU usage. Waiting for long periods of time does not result in it settling down, nor does closing all of the running apps. Rebooting the VM clears it up.

I haven't been able to identify a pattern as to when this happens. Any suggestions as to how to address it or analyze it would be much appreciated.
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: Guest Additions periodically causes extreme slowdown in guest vm

Post by socratis »

We need to see a complete VBox.log, from a complete VM run:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe error / 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.
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.
TomG
Posts: 18
Joined: 15. Aug 2018, 22:07

Re: Guest Additions periodically causes extreme slowdown in guest vm

Post by TomG »

OK, it took a little while to see the problem again, but it happened this afternoon. I've attached the log. Please let me know what you think.
Attachments
Win10 Scrivener-2018-10-12-17-53-58.zip
(52.96 KiB) Downloaded 10 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: Guest Additions periodically causes extreme slowdown in guest vm

Post by socratis »

00:00:01.469112 Drag and drop mode: Bidirectional
Disable DnD, see if that changes the situation.
00:00:06.023562 GUI: 2D video acceleration is disabled
And so is the 3D acceleration. Shutdown the VM and enable them in the VM settings » Display. You'll also notice that the max VRAM will jump from 128 to 256 MB after that; max the VRAM as well. Then re-install the Guest Additions (GAs) in the guest.
00:00:01.485872 [/Devices/ahci/0/LUN#2/AttachedDriver/Config/] (level 6)
00:00:01.485873   Format    <string>  = "RAW" (cb=4)
00:00:01.485874   Mountable <integer> = 0x0000000000000001 (1)
00:00:01.485874   Path      <string>  = "C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso" (cb=58)
I don't know why you have the DVD in SATA Port2, instead of Port1. BTW, always eject the Guest Additions (GAs) CD once you're done with the installation of the GAs.
00:00:05.475760 Host path 'D:\', map name 'D_DRIVE', writable, automount=true, create_symlinks=false, missing=false
What's "D:\"? Internal? External? Does it have a policy of "sleeping if inactive"?

And after that you have a log that goes on with sleeping, resuming, changing screens, screen sizes, etc. for 43 hours! I can't possibly go through a log like that, it's a pain. I need you to post a log where you're going to keep track of the time where the CPU spikes, from the time that you start the VM. So, telling me something like "In the 10:32:00 mark I see the CPU usage going crazy", that would help. Otherwise I'm looking for a needle in a haystack...
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.
TomG
Posts: 18
Joined: 15. Aug 2018, 22:07

Re: Guest Additions periodically causes extreme slowdown in guest vm

Post by TomG »

Disable DnD, see if that changes the situation.
I've disabled DnD
And so is the 3D acceleration. Shutdown the VM and enable them in the VM settings » Display. You'll also notice that the max VRAM will jump from 128 to 256 MB after that; max the VRAM as well. Then re-install the Guest Additions (GAs) in the guest.
I've turned on 2D and 3D video acceleration and maxed the VRAM to 256 MB
I don't know why you have the DVD in SATA Port2, instead of Port1. BTW, always eject the Guest Additions (GAs) CD once you're done with the installation of the GAs.
I don't know either, this is just the way it got set up when I created the VM. This is my first time ever using a VM so I no doubt inadvertently did something to cause it. Is there a way to change it, and any need to do so?
I did not know I should eject the GAs CD after installation, I've done that and will continue doing that whenever I reinstall them.
What's "D:\"? Internal? External? Does it have a policy of "sleeping if inactive"?
D_DRIVE is the D:\ drive on the host, I have it mapped to E:\ on the guest. It did have a setting of sleeping after 20 minutes on both host and guest; I set it to never sleep on both.
I need you to post a log where you're going to keep track of the time where the CPU spikes, from the time that you start the VM. So, telling me something like "In the 10:32:00 mark I see the CPU usage going crazy"
I will track the time from start to when the CPU spikes and, if the problem occurs again, post back to this thread.

Thanks again for all this; I'm learning ...
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: Guest Additions periodically causes extreme slowdown in guest vm

Post by socratis »

TomG wrote:
socratis wrote:I don't know why you have the DVD in SATA Port2, instead of Port1
Is there a way to change it, and any need to do so?
There shouldn't be a problem generally speaking, I just thought it was not common, that's all. If you still want to change it, from the VM Settings » Storage » select the DVD on the left » Change the drop-down to "Port 1" on the right (from "Port 2").

Then you could also select the SATA controller on the left and lower the "Port Count" on the right from 3 to 2.
TomG wrote:It did have a setting of sleeping after 20 minutes on both host and guest; I set it to never sleep on both.
Excellent. Let's see if that changes things...
TomG wrote:I will track the time from start to when the CPU spikes and, if the problem occurs again, post back to this thread.
Thank you! That would definitely help us pinpoint the issue, if at all possible...
TomG wrote:Thanks again for all this; I'm learning ...
Aren't we all? That's the spirit! ;)
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.
wcsbca
Posts: 39
Joined: 11. Jun 2016, 20:12
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: win7, win 10

Re: Guest Additions periodically causes extreme slowdown in guest vm

Post by wcsbca »

I have this same issue: near 100% CPU usage in virtual machine, guest browser unresponsive; I am about to drop back to an earlier release, since this 5.2.20 is useless (started out fine when I installed it on about 10/19 but got worse with every use). I thought perhaps my log could be useful to you.
Win 10 64-bit host (latest update is "2018-09 Update for Windows 10 Version 1803 for x64-based Systems KB4462933"), Win7 64-bit guest.

I am not a developer, but have enough software background to follow your instructions. Log attached.

Wayne
Attachments
Win7 Apr 2017-2018-10-30-22-09-17.zip
Brought up Win7 guest, initiated Firefox browser (only), brought Win7 down.
(30.55 KiB) Downloaded 17 times
wcsbca
Posts: 39
Joined: 11. Jun 2016, 20:12
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: win7, win 10

Re: Guest Additions periodically causes extreme slowdown in guest vm

Post by wcsbca »

Here is a Win7 Resource Monitor screenshot taken during a period when Win7 guest was up (nothing but a browser running)
nothing is running in VirtualBox 389x400.jpg
nothing is running in VirtualBox 389x400.jpg (103.18 KiB) Viewed 3156 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: Guest Additions periodically causes extreme slowdown in guest vm

Post by socratis »

You're close, but not exactly where you want to be. You show that there's a CPU usage, but you didn't investigate what is using the CPU. ;)
  1. In the tab that you're in (Performance), go to View » enable Show Kernel Times. It helps, generally speaking.
  2. Switch to the tab Processes, turn on the "Show processes from all users", click on the CPU column to sort the processes by CPU usage. Find out who's taking the CPU, who's on the top of the list. Note that you may have to click twice or more to sort them descending/ascending.
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.
wcsbca
Posts: 39
Joined: 11. Jun 2016, 20:12
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: win7, win 10

Re: Guest Additions periodically causes extreme slowdown in guest vm

Post by wcsbca »

I tried to get that info today, but failed. What I did find out was this: the test I ran yesterday was not a valid one, because I was trying to keep the log short, thus the virtual machine (Win7) was only up for a few minutes.

Today when I brought up virtual Win7 and began using Task Manager to check for the culprit, I found that the CPU usage fell off sharply after that first few minutes, which surprised me, since I had been seeing poor performance and high CPU usage for hours yesterday. I launched a browser and began perusing websites, and soon the performance fell off (to terrible) as it has previously. Regrettably I didn't revisit task manager before I brought Win7 down to restart the test anew, and Microsoft chose that moment to apply another update to Win7. Regrettably I had to leave and didn't have enough time to do a second test today. I will try tomorrow to do a longer test exercising browsers; if the high CPU usage issue returns I will check task manager to see if I can find the culprit(s). Regrettably I may not be able to upload a log, since it would be huge, unless there is an easy way to segment it (lop off all but the last few minutes, or all but the first and last few minutes).

I had another issue today that had been a problem for me a year or so ago: the virtual Win7 did not connect to a "My Passport" USB 2.0 drive, The host Win 10 sees it fine. Yes, the correct version of extensions is installed, and it is configured for a My Passport, and it has been connecting until today. No amount of unplug/re-plug, or reboot of host/guest systems would make it appear.

The previous time I had the My Passport issue a new release of VirtualBox came out while I was puzzling over the problem (I am only a periodic user of VirtualBox), so I installed the new release and voila, My Passport became visible.
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: Guest Additions periodically causes extreme slowdown in guest vm

Post by socratis »

wcsbca wrote:because I was trying to keep the log short, thus the virtual machine (Win7) was only up for a few minutes.
If you only boot, observe problem, shutdown, no matter how long your VM for, the log won't get bigger. It only logs things that change in the "hardware" aspects of the VM, not what you're browsing inside the VM. I've seen logs of 150 and 200 hours running, ZIP can make miracles... ;)
wcsbca wrote:I had another issue today that had been a problem for me a year or so ago
Please observe the rule of: one issue per thread, one thread per issue. Otherwise your USB problem won't match the title of the thread, right?
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.
wcsbca
Posts: 39
Joined: 11. Jun 2016, 20:12
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: win7, win 10

Re: Guest Additions periodically causes extreme slowdown in guest vm

Post by wcsbca »

OK, here is the Win7 VirtualBox trace file I promised, along with corresponding performance snapshots taken near the end of the run.

My computer has a 4GHz i7-4790K CPU and 16gb memory (half of that in Win7).
VirtualBox specifies 2 CPU's for Win7, and I didn't specifically change that for this VirtualBox release, so I may try upping it to 4.
I will report back.

In this run I had YouTube up in 2 tabs of Firefox browser, with active dance videos in each tab. They were running somewhat jerkily and sound was not good.
In the past it was not unusual for me to have 6 or more videos or other websites in Firefox tabs, perhaps 3 or 4 active, with no obvious performance issues.
I cannot explain the fact that performance monitor shows 6 Firefox tasks, probably some are background tasks rather than website tabs.

I think I solved the problem of the missing My Passport drive (he says, sheepishly), it seems I forgot to execute Guest Additions (inside the Win7 guest) after a fresh install yesterday.
Win7 Apr 2017-2018-11-01-22-19-18.zip
VirtualBox trace
(30.56 KiB) Downloaded 8 times
Win7 Performance monitor - processes
Win7 Performance monitor - processes
2018 11 01 VirtualBox Win7 perrformance snapshot - processes 500x450.jpg (124.4 KiB) Viewed 3116 times
Win7 Performance monitor - CPU usage
Win7 Performance monitor - CPU usage
2018 11 01 VirtualBox Win7 performance snapshot - CPU.jpg (120.46 KiB) Viewed 3116 times
wcsbca
Posts: 39
Joined: 11. Jun 2016, 20:12
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: win7, win 10

Re: Guest Additions periodically causes extreme slowdown in guest vm

Post by wcsbca »

I think I may have found a huge clue!!!

I was playing with Win7 under VirtualBox, getting terrible response, and I came across a Win7 tool I hadn't ever noticed before: "Performance Information and Tools"
When I ran that performance tool, it said Graphics is terrible.

My Win 10 does not seem to have that tool.
My i7 has an NVIDIA GeForce GT 720 graphics card.

I do not see a way to specify a graphics adapter in the VirtualBox definition of the Win7 guest. But, I am a novice at VirtualBox...
can you just download a new graphics card driver in the Win7 virtual machine? Seems doubtful and I'm sure I haven't done that in past releases of VirtualBox.
Win7 Performance Information and Tools output 442x600.jpg
Win7 Performance Information and Tools output 442x600.jpg (94.86 KiB) Viewed 3112 times
VirtualBox Win7 Device Manager.jpg
VirtualBox Win7 Device Manager.jpg (77.09 KiB) Viewed 3112 times
wcsbca
Posts: 39
Joined: 11. Jun 2016, 20:12
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: win7, win 10

Re: Guest Additions periodically causes extreme slowdown in guest vm

Post by wcsbca »

I should mention that I tested my native i7/Win 10 computer by playing different dance videos in 8 tabs of Firefox simultaneously... the videos play flawlessly in each and every tab.
All browsers have badly degraded performance in the VirtualBox Win7 (Firefox, Chrome, Avast).

Here are a few screenshots of settings for the VirtualBox Win7, which has 8gb of memory allocated...
VirtualBox_2018-11-03_11-26-31.jpg
VirtualBox_2018-11-03_11-26-31.jpg (116.59 KiB) Viewed 3075 times
VirtualBox_2018-11-03_11-27-02.jpg
VirtualBox_2018-11-03_11-27-02.jpg (93.43 KiB) Viewed 3075 times
VirtualBox_2018-11-03_11-27-27.jpg
VirtualBox_2018-11-03_11-27-27.jpg (84.15 KiB) Viewed 3075 times
Display: Video memory is 256MB, Monitor count is 2, scale factor 100%, 2D and 3D acceleration are enabled, video capture is not enabled.
wcsbca
Posts: 39
Joined: 11. Jun 2016, 20:12
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: win7, win 10

Re: Guest Additions periodically causes extreme slowdown in guest vm

Post by wcsbca »

One more thing: here are recent updates to Win7:
recent Win7 updates 640x213.jpg
recent Win7 updates 640x213.jpg (108.99 KiB) Viewed 3074 times
Post Reply