Huge CPU drain

Discussions related to using VirtualBox on Windows hosts.
Post Reply
falcon4fun
Posts: 9
Joined: 21. Oct 2017, 01:17

Huge CPU drain

Post by falcon4fun »

I have found that new versions (2-5 last) have a HUGE cpu drain.
I.E we have 2 XP guests with 2 cores on each. Launched simultaniosly.
We got that every of them is eating ~50% cpu time even they have no load. So 2 VMs will eat 100% cpu time without a load inside the VM
The problem is clearly seen in safemode and start sequence

Look at screenshot: i.imgur. com/fOIfjh7.png

Host system:
Win7 x64
i5-4690k
32gb ram

Guest systems in this case:
XP x86 and x64
With GuestAdditions

Any thoughts?
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Huge CPU drain

Post by andyp73 »

The i5-4690k has 4 cores according to ark.intel.com which means when you simultaneously start two VMs both of which have been allocated 2 cores then all of your cores are allocated to guests which could starve the host.

It may not explain the cause of the high CPU usage but we would be helped by seeing the log files for the two guests (zipped).

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
falcon4fun
Posts: 9
Joined: 21. Oct 2017, 01:17

Re: Huge CPU drain

Post by falcon4fun »

andyp73 wrote:It may not explain the cause of the high CPU usage but we would be helped by seeing the log files for the two guests (zipped)
Last log file for each VM was Safe Mode with CPU drain. Previous - normal boot with cpu drain in boot. Futhermore, normal mode is supposed to work normally (after boot sequence drain, when OS is fully loaded).
I tryed to play with options to find any which can cause it by enabling/disabling but hadn't found any :)
andyp73 wrote:The i5-4690k has 4 cores according to ark.intel.com which means when you simultaneously start two VMs both of which have been allocated 2 cores then all of your cores are allocated to guests which could starve the host.
Lags TOO terribly causing nearly no mouse responce to host (: And there was no such a problem to start 2-3-4 machines simultaneously on 5.0 (mb 5.1) (as I remember) :)

I can try to install previous version later and find on which the problem appeared. + Will try to delete GA to see if this will change smth.
Attachments
Logs.rar
(117.44 KiB) Downloaded 4 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: Huge CPU drain

Post by socratis »

00:00:01.702214 NumCPUs <integer> = 0x0000000000000002 (2)
00:00:01.923432 CPUM: Physical host cores: 4
00:00:01.923589 Full Name: "Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz"
andy73 is absolutely correct about the CPU. Reduce them to 1/guest or don't launch them at the same time.
00:00:01.702143 Per-VM extradata API settings:
00:00:01.702147   VBoxInternal2/UgaHorizontalResolution="320"
00:00:01.702163   VBoxInternal2/UgaVerticalResolution="200"

00:00:01.702351 [/Devices/vga/0/Config/] (level 4)
00:00:01.702352   CustomVideoMode1 <string>  = "1280x800x32" (cb=12)
00:00:01.702352   CustomVideoMode2 <string>  = "1366x768x32" (cb=12)
00:00:01.702353   CustomVideoMode3 <string>  = "1360x768x32" (cb=12)
00:00:01.702353   CustomVideoModes <integer> = 0x0000000000000003 (3)
Please remove any custom video modes that you've enabled.
00:00:01.181322 File system of 'D:\VM\Clean Test\Clean Test.vdi' is ntfs
What is "D:\"? Is it an external or a network hard drive?
00:00:01.702217   RamSize           <integer> = 0x0000000100000000 (4 294 967 296, 4 096 MB, 4.0 GB)
Your 32-bit WinXP will *not* see more than ~3.5 GB. There's absolutely no point in giving it too much RAM. 512 MB, 1 or 2 GB is more than enough...
00:00:01.702262 [/Devices/ahci/0/Config/] (level 4)
00:00:01.702263   Bootable  <integer> = 0x0000000000000001 (1)
00:00:01.702263   PortCount <integer> = 0x0000000000000002 (2)
Any particular reason that you changed the default proposed IDE to a SATA controller? Just curious... You thought that it would increase the performance?
00:00:01.702357   VRamSize         <integer> = 0x0000000001e00000 (31 457 280, 30 MB)
Increase the vRAM to at least 128 or even better 256 MB.

Finally, you said the following:
falcon4fun wrote:We got that every of them is eating ~50% cpu time even they have no load. So 2 VMs will eat 100% cpu time without a load inside the VM
From the picture that I saw [1] you're doing a copy of a large file in the guest. How is that "no load"? Of course there is load, it's not idling. Simply the load won't be CPU related, it's I/O related.

[1]: Please attach images locally next time. Also, I don't need to see (4 VBox.log + 1 VBoxHardening.log) * 2 guests = 10 logs. I don't need to see a generic VBox.log from "a" run. I need to see the complete VBox.log from "the run" that had the problem. With those settings that caused the problem, not "I tried this and that".
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.
falcon4fun
Posts: 9
Joined: 21. Oct 2017, 01:17

Re: Huge CPU drain

Post by falcon4fun »

socratis wrote:
00:00:01.702214   NumCPUs           <integer> = 0x0000000000000002 (2)
00:00:01.923432 CPUM: Physical host cores: 4
00:00:01.923589 Full Name:                       "Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz"
andy73 is absolutely correct about the CPU. Reduce them to 1/guest or don't launch them at the same time.
Why I CAN do this on previous versions without performance degradation?
Correct in what? That vbox has the problem with allocation cores to VM, fully load them and not allocating them by VM load?
Again. And again. And again. If I allocate 1 core, I will get CONSTANT 25% load. If 2 core, 50% of CONSTANT load. I think you understand what will be with 3 and 4 cores, ya? :roll:
It WILL NOT vary from any VM's load, world wars, my mood, how much I eat, global cataclisms and etc.

And it is WRONG. Cores load should be, like always, dynamic. Program inside VM eats 30%, Host core's load is 30%.
Or Am I missing smth? And there is a very new techs which "optimizes" VMs by loading their cores to max? :lol:

And.. Again. The problem shows while booting machine and inside safemode.
socratis wrote: Please remove any custom video modes that you've enabled.
What is "D:\"? Is it an external or a network hard drive?
Internal second storage's pratition
socratis wrote: Your 32-bit WinXP will *not* see more than ~3.5 GB. There's absolutely no point in giving it too much RAM. 512 MB, 1 or 2 GB is more than enough...
Any particular reason that you changed the default proposed IDE to a SATA controller? Just curious... You thought that it would increase the performance?
Increase the vRAM to at least 128 or even better 256 MB.
Fixed all this by recreating machine.
> Just curious
If nobody helps u, u try to find any setting to solve the problem.
Even if nobody understands your problem, maybe I have such a bad english, though.
socratis wrote: Finally, you said the following:
falcon4fun wrote:We got that every of them is eating ~50% cpu time even they have no load. So 2 VMs will eat 100% cpu time without a load inside the VM
From the picture that I saw [1] you're doing a copy of a large file in the guest. How is that "no load"? Of course there is load, it's not idling. Simply the load won't be CPU related, it's I/O related.
So. Again. 50% process load while guest is idling? :lol: :lol: Interesting
50% cpu time is I/O related? Okay. Okay..
https://i.imgur.com/J072sHf.png
So THIS IS I/O RELATED, yeah? Like I see, there is tons of I/O operations, that storage drains my CPU and bottlenecks *huge of sarcasm* :lol:
socratis wrote: [1]: Please attach images locally next time.
128 KiB limit.. :roll: Should I use grayscale or 20% jpeg quality or split 1 image to 5? What do you prefer more? :lol: :lol:
socratis wrote: Also, I don't need to see (4 VBox.log + 1 VBoxHardening.log) * 2 guests = 10 logs. I don't need to see a generic VBox.log from "a" run. I need to see the complete VBox.log from "the run" that had the problem. With those settings that caused the problem, not "I tried this and that".
Controller, vRam size and etc were the try to solve the problem by playing with options.
Even recreated VM with the same vHDD. All settings, except Ram, vRam size, IO APIC and CPU count, are default. Situation is the same. Safemode and VM's boot drain
VM settings, Log files attached. Can even send vhd if this will AT LEAST help to understand the problem :lol: Hovewer, it's seen on the first screenshot from first post. :roll:
Clean-New Test.zip
Logs + VM settings
(46.93 KiB) Downloaded 3 times
P.S. Why I hate to write bug reports. It takes very very very huge time even with screenshots, logs, balalaykas, dancing with pole bears, personal Putin and etc that smb understood the problem..
Say, please, that you have understood the problem now. ;/
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: Huge CPU drain

Post by socratis »

falcon4fun wrote:Say, please, that you have understood the problem now. ;/
I'm sorry, but not at all. All the icons, the CAPITALS, and the metaphors got me... lost. Or, as they say, TL;DR...
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.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Huge CPU drain

Post by andyp73 »

falcon4fun wrote:Why I CAN do this on previous versions without performance degradation?
If (and it is a big if) something has changed within VirtualBox that is causing this then in order to track it down we need to know which was the last version that worked and which was the first version that didn't.
falcon4fun wrote:Why I hate to write bug reports. It takes very very very huge time even with screenshots, logs, balalaykas, dancing with pole bears, personal Putin and etc that smb understood the problem.
As we don't reside inside your head we don't know what you know unless you tell us! The only other option is for us to... <resists temptation to make further comment about installing software so we can see what your PC does>

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
falcon4fun
Posts: 9
Joined: 21. Oct 2017, 01:17

Re: Huge CPU drain

Post by falcon4fun »

andyp73 wrote: As we don't reside inside your head we don't know what you know unless you tell us! The only other option is for us to... <resists temptation to make further comment about installing software so we can see what your PC does>
Yea, I know. But sometimes nobody wants to understand the key of the problem. Thats the problem.
Will take a look for bugged version. I think that was the first after redesign.
falcon4fun
Posts: 9
Joined: 21. Oct 2017, 01:17

Re: Huge CPU drain

Post by falcon4fun »

Hmmm. For now situation is quite an interesting..
Tryed some old vbox versions.

Found that:
1. my XP machines still have a problem in safe mode.
2. 2003 PE doesn't have this problem
3. XP PE has this problem
4. Fresh XP SP3 on 4.3.24 (Haven't still checked last version) doesn't have problem in safe mode.
5. Tryed to remove GA from that I have before. Still the problem in safe mode.

Hmmm.. Wuuuuuuuuut :D It's very interesing. As I see for now:
1. Problem in some updates
2. Problem in some OS changes.
3. Problem in GA. And some of them left. Will look which files it changes.

Will write more after some more analysis. :lol:

P.S. Log from machine WITHOUT a problem. Maybe will help to give me some thoughts where to look
Attachments
Logs.zip
Log from safemode without the problem
(37.24 KiB) Downloaded 3 times
falcon4fun
Posts: 9
Joined: 21. Oct 2017, 01:17

Re: Huge CPU drain

Post by falcon4fun »

I have found : )

To reproduce:
1. Install Windows xp with IO/APIC with 2 cores
2. Reboot to safe mode. Get all cores load.

To solve:
1. Install Windows xp without IO/APIC
2. Enable only after install IO/APIC and 2 cores

Tested on 5.2.6
Tested on 4.3.24

Why this problem can be? And how to fix it? Only reinstall OS?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Huge CPU drain

Post by mpack »

falcon4fun wrote: To solve:
1. Install Windows xp without IO/APIC
2. Enable only after install IO/APIC and 2 cores
I take it you aren't aware that XP can't dynamically replace a single CPU HAL with a multicore HAL. So all this procedure does is ensure that the XP VM can never use more than one core. Enabling "IO APIC and 2 cores" after installation did nothing except add an unnecessary core context switch to the VM.
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: Huge CPU drain

Post by socratis »

Ch. 3.5.1 “Motherboard” tab
Enable I/O APIC
  • Warning
    All Windows operating systems starting with Windows 2000 install different kernels depending on whether an I/O APIC is available. As with ACPI, the I/O APIC therefore must not be turned off after installation of a Windows guest OS. Turning it on after installation will have no effect however.
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.
NoNoNo
Posts: 51
Joined: 16. Apr 2015, 17:35
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP(32bit) / Debian 8.x / Debian 7.x / Windows 7(32bit)

Re: Huge CPU drain

Post by NoNoNo »

I can almost recognize your situation, that's why I never run winXP VM more than unicore.
falcon4fun
Posts: 9
Joined: 21. Oct 2017, 01:17

Re: Huge CPU drain

Post by falcon4fun »

mpack wrote:
falcon4fun wrote: To solve:
1. Install Windows xp without IO/APIC
2. Enable only after install IO/APIC and 2 cores
I take it you aren't aware that XP can't dynamically replace a single CPU HAL with a multicore HAL. So all this procedure does is ensure that the XP VM can never use more than one core. Enabling "IO APIC and 2 cores" after installation did nothing except add an unnecessary core context switch to the VM.
Thank you. Understood. :)
But there is still an unresolved question, why XP leaks on IO/APIC mode (correctly installed) inside the safe mode :) Why it hates IO/APIC

As I see for now:
1. There should be some differences in kernels. It's like only XP (maybe only x86) affected this. Because 2003x86 Enterprise doesn't have such a problem. Tryed the same way: installed 2003 in IO/APIC mode and went to safe mode after. As I tested, installing XP with IO/APIC with single core fixed this too.
2. There are no way to fix this software way, aren't?
socratis wrote:Ch. 3.5.1 “Motherboard” tab
Enable I/O APIC
  • Warning
    All Windows operating systems starting with Windows 2000 install different kernels depending on whether an I/O APIC is available. As with ACPI, the I/O APIC therefore must not be turned off after installation of a Windows guest OS. Turning it on after installation will have no effect however.
Hm. Okay. Thank you :) Simply messed with the interface tooltips. There was no last sentence in it. (: Too specific case.
Post Reply