VirtualBox

Ticket #1884 (new defect)

Opened 6 years ago

Last modified 3 months ago

High CPU usage with idling guest

Reported by: G. I. Owned by:
Priority: major Component: VMM
Version: VirtualBox 1.6.4 Keywords: CPU usage
Cc: Guest type: Windows
Host type: Mac OS X

Description

VirtualBoxVM uses ~50% CPU on a 2.4GHz Core Duo MacBook Pro even when the guest (Win XP SP2) is idling at 0%.

Attachments

VBox.log Download (34.4 KB) - added by G. I. 6 years ago.
VBox.2.log Download (45.4 KB) - added by linickx 4 years ago.
Log File - VBOX 3.1.8 - OSX Host - Centos Guest
VBox.3.log Download (49.3 KB) - added by KuleRucket 3 years ago.
SLES 11 64-bit host / Windows 7 64-bit guest
VBox.4.log Download (72.4 KB) - added by Emerson Prado 12 months ago.
Win XP guest machine with VB 4.1.24 over Linux host

Change History

Changed 6 years ago by G. I.

comment:1 Changed 6 years ago by finnzi

Not sure if it helps but i have a 2.4Ghz Core2Duo Macbook and am experiencing the same issue with a clean install of Windows XP SP3 with the guest additions...Idling jumps from 15%-50%.

comment:2 follow-up: ↓ 3 Changed 6 years ago by G. I.

With VirtualBox 1.6.2 the problem remains.

comment:3 in reply to: ↑ 2 Changed 6 years ago by G. I.

I mean 1.6.4.. sigh

comment:4 Changed 6 years ago by frank

  • Version changed from VirtualBox 1.6.2 to VirtualBox 1.6.4

comment:5 Changed 6 years ago by amagine

Using USB Device - transfer of USB 1.1 data can Max CPU Usage of VirtualBox VM +100% to 130% and stall VM Guest for ~15min.

The DOCK.app will also climb to 70-75% usage (to complete the CPU demand for OS X Host) Suspected cause: the VirtualBox VM ICON update of image. Killing the Apple DOCK.app helps bring VM Guest back quicker (instead of 15min, ~11 or 12min)

Moving a Windows explorer window can cause 91% CPU usage of VirtualBox VM.app in OS X Host.

My VM Setup:  http://forums.virtualbox.org/viewtopic.php?t=8505

comment:6 Changed 6 years ago by parren

Same thing here with VBox 2.0.2, MacBook Pro Core2Duo 2.5GHz, WinXP guest. Running on VMware disk images, but with VMware guest tools removed and VBox tools installed.

comment:7 Changed 5 years ago by G. I.

Still the same with version 2.04 (on OS X 10.4.11), 50% CPU usage with XP SP2 guest idling at 1-2%. USB disabled.

comment:8 Changed 5 years ago by dyin2live

I'm experiencing this with Google Chrome Running(and maybe other applications I haven't yet noticed).

Running Firefox with Guest CPU <5% = host CPU <5-10%. Running Google Chrome with Guest CPU <5% = host CPU >100% (on dual core Macbook Pro). Changes effective immediately upon running/quitting Google Chrome.

comment:9 Changed 5 years ago by clement.denis

I have the same problem with Chrome, with a Windows XP guest (32 bit, SP3) on a Ubuntu host (Intrepid 64 bit).

When I launch Google Chrome (doing nothing else), guest CPU stays <5%, but VirtualBox uses 70% of host CPU.

I'm on VirtualBox 2.1.

comment:10 Changed 5 years ago by johnclayton

I've got the same issue...guest is sitting there idle, and the host is tweaking out at ~30% CPU usage. Oddly enough after chugging for about 30 minutes the host's CPU drops down to normal levels (nothing in the logs past the boot).

Host: XP SP3, VirtualBox 2.1.0

Guest: Server 2008 with ACPI, IO APIC, VT-x/AMD-V, & PAE/NX enabled.

comment:11 Changed 5 years ago by andulvar

I have the same problem. VirtualBox.exe goes to 100% CPU usage. The guest OS is responsive, and Task Manager in the guest indicates 0% CPU usage. The CPU load is occurring outside of the guest environment.

Even when the virtual OS is not running, just waiting at the Windows boot selection screen (where you select Safe Mode or Normal Mode boot), the CPU load is at 100%.

Looking at VirtualBox.exe in Process Explorer, I see one thread using all the CPU. The stack for this thread is:

ntkrnlpa.exe+0x8dafe ntkrnlpa.exe+0x29a82 ntkrnlpa.exe+0x33198 hal.dll+0x6199 hal.dll+0x63d9 hal.dll+0x6456 VBoxDrv.sys+0x74f ntkrnlpa.exe+0x1df85 ntkrnlpa.exe+0xf5437 ntkrnlpa.exe+0xf61bf ntkrnlpa.exe+0xeed08 ntkrnlpa.exe+0x897bc ntdll.dllKiFastSystemCallRet VBoxRT.dll!SUPLoadVMM+0x65b VBoxRT.dll!SUPCallVMMR0Fast+0x3a VBoxVMM.dll!VMMR3HwAccRunGC+0x1b VBoxVMM.dll!EMR3CheckRawForcedActions+0xc38 VBoxVMM.dll!EMR3ExecuteVM+0x21e VBoxVMM.dll!VMR3WaitU+0x3cd VBoxRT.dll!RTThreadReadLockDec+0x1f0 VBoxRT.dll!RTSemMutexRelease+0x112 MSVCR71.dll!endthreadex+0xa0 kernel32.dll!GetModuleHandleA+0xdf

My environment: Guest OS: 64-bit Windows XP Professional SP2 CPU: AMD x2 64 @ 2.21 GHz, 2GB RAM Host OS: 32-bit Windows 2003 Server SP2

256MB RAM, 128MB Video, 3D Acceleration disabled Enable ACPI ON Enable IO APIC ON Enable VT-x/AMD-V ON Enable PAE/NX OFF Clipboard Disabled IDE Controller PIIX4 IDE Hard Disk, 10GB dynamic CDROM disabled Floppy disabled Audio disabled Network disabled Serial disabled USB disabled Remote Display disabled

I have tried enabling/disabling most of the optional features: cdrom, network, audio, USB, 3D acceleration, ACPI, IO APIC but in all cases the CPU load is 100% even while the guest is idling at 0%.

comment:12 follow-up: ↓ 13 Changed 5 years ago by frank

Any improvement with 2.1.4?

comment:13 in reply to: ↑ 12 Changed 5 years ago by johnclayton

Replying to frank:

Any improvement with 2.1.4?

No change at all with 2.1.4.

Is there any data we can provide to track this down? The logs don't seem to contain anything while this is happening.

comment:14 follow-up: ↓ 15 Changed 5 years ago by alexk

See also #3613

comment:15 in reply to: ↑ 14 Changed 5 years ago by johnclayton

Replying to alexk:

See also #3613

That's it! I did have an instance of SQL Server running on the VM - once I stopped the service, the host CPU usage settled down!

comment:16 follow-up: ↓ 17 Changed 5 years ago by lkraav

this ticket looks like duplicate of #3613

comment:17 in reply to: ↑ 16 Changed 5 years ago by danielaharon

Replying to lkraav:

this ticket looks like duplicate of #3613

I'm experiencing exactly the same issue. This is not a duplicate of #3613 (although it could be merged with it), that ticket relates to having SQL server running - I don't have MS SQL running on my VM

An important point - adding another WinXP VM and running it in parallel indeed DECREASED the host CPU's load from 30% to around 16%. It's a temporary solution but there should be no need to waste expensive memory just to reduce the load. Also, even 16% is a lot for a machine that does virtually nothing.

I'll be happy to try and help find the cause for this problem.

Thanks, Daniel

comment:18 Changed 5 years ago by lkraav

the common denominator in #3613 is usage of interrupt 70h:

- MS SQL server 2008 (express or not), - SQL server 2005 SP3 - TwinCat? - Google Chrome - Or possibly another application which uses 70h interrupts for timing

google chrome was mentioned in current ticket as well, so that's why i posted my first reply.

i just installed xp sp2 into a fresh vbox 2.2.2 and there are no idling problems. instead, using virtual sound card in any windows seems to push host cpu load to the roof. here's my findings on that:

 http://forums.virtualbox.org/viewtopic.php?f=8&t=17557

comment:19 Changed 4 years ago by baseliner

I just started running Windows 7 in a VM on Mac OS X 10.6 (Snow Leopard) and the VirtualBox process is taking up around 15-20% CPU on my Mac even when there's nothing going on in the Windows VM. I do not have SQL Server installed and the CPU usage in task manager in the Windows VM is pretty much at 0. So it appears that the VirtualBox program itself is consuming CPU cycles for something.. I had the same issue w/ Fusion and Parallels earlier and was glad to see that VirtualBox on a Windows host doesn't suffer from this problem.. but looks like the Mac version does have this problem.. would be great if this can be fixed.. thanks!

comment:20 Changed 4 years ago by mabrodis

I have a XP host (dual core, 2 gig memory) with a CentOS Linux guest. The guest OS is doing nothing at all, load of 0.00 but host shows the VirtualBox.exe process taking ~34% cpu, set affinity to one of the cores, had no effect.

After reading this thread I tried the adding-another-VM thing. I created a Win31 VM with 16meg of memory, 70gig drive, told it to boot. It tried, failed because of no boot media, etc, however, just that act of trying and having the newly created VM's window sitting there with the error in it, caused the VirtualBox.exe process to drop to 0-1% cpu.

If I close the new VM window the CPU load goes back up to 33-34%. That is baffling to me, but since it gets the CPU down where I want it, I guess I'll leave this hack of a busted VM there since overall I guess it does something useful.

Just before this test I upgraded to 3.0.10, was hoping I would see the annoying CPU issue go away...guess now.

comment:21 Changed 4 years ago by Burz

I am having the same problem on OS X 10.5.8 host and CentOS 5.4 guest which is idling. OS X host reports CPU usage near 50%.

VBox version is 3.1.2 r56127.

The guest was moved from an Ubuntu host. I also have some fully updated Windows2003 and XP guests copied from Ubuntu host which do not show this problem.

comment:22 follow-up: ↓ 28 Changed 4 years ago by Burz

Just noticed its actually using close to 85% of CPU when the guest is at idle, not 50%.

comment:23 Changed 4 years ago by togume

Confirming this defect with 3.1.4.

Host: Ubuntu 9.10 Guest: Win 7

comment:24 Changed 4 years ago by pkohn11

i have 3.1.4 and i'm having the same issue. Host is Windows 7 and i have guests: xp, vista, win 7, server 2008, server 2008 r2, ubuntu, and backtrack. I run 1 at a time and it peeks above 50% on host and its like 2% on guest. if i run 2 at the same time it goes to 100%. Is there any fix for this yet?

comment:25 Changed 4 years ago by sandervl73

I'm sorry, but all such 'me too' comments are not useful. If you want a sensible answer, you should *at least* attach the VBox.log of the session in question.

Typical causes are:

  1. 1024 hz linux guest kernels
  2. io-apic overhead with 32 bits Windows guests
  3. Windows applications that set the timer to 1024 hz

comment:26 Changed 4 years ago by togume

You're right. I attached a couple logs to this ticket:

 http://www.virtualbox.org/ticket/4762

I opened a new one for 3.1.4:  http://www.virtualbox.org/ticket/6204

Please direct us if you have a better approach to getting resolution in this issue. Most of us are willing to help by providing anything that is needed, as long as we have guidance as to what that is. Your condescending attitude is not very helpful.

Changed 4 years ago by linickx

Log File - VBOX 3.1.8 - OSX Host - Centos Guest

comment:27 Changed 4 years ago by linickx

Hello,

I asked the community for help here:  http://forums.virtualbox.org/viewtopic.php?f=8&t=30851&start=0

I have uploaded my logfile  http://www.virtualbox.org/attachment/ticket/1884/VBox.2.log

I'm willing to help troubleshoot. Cheers, Nick

comment:28 in reply to: ↑ 22 Changed 4 years ago by Burz

After updating both CentOS and VB, I noticed the 85%+ CPU usage was occurring while the guest was running "makewhatis". This background program runs automatically and uses only about 6% CPU in the guest while accessing the disk a lot, but the OS X host shows over 85%. When makewhatis stops, the guest has about 1% CPU usage and VB shows about 25% in the host.

So there is still an idling problem, but file access exacts a large CPU penalty on the host too.

comment:29 Changed 4 years ago by Burz

Here is another observation (and possible workaround):

Running more than one VM cuts down drastically on the idling wastage. It doesn't matter what type OS the other VM is, and you can even create a dummy VM with 4K RAM and no OS: Once you start the dummy VM and it reports that it can't boot, pause it. The result is that the paused VM takes less than 1% CPU and the idling CentOS VM takes about 9% CPU instead of 25%.

comment:30 Changed 4 years ago by clemmonsm

I've validated Burz's latest comments on my machine. I'm running Mac OS X 10.5.8 as my host, VBox 3.2.4 with an XP guest. When the guest is idling at 0%, the host VB process is 60-80% constantly, sometimes dipping to 30%. When the guest is working, the VB process exceeds 100% CPU on the host. After adding a dummy VM, my VB idle is 8-9%. Fwiw, I've had the same problematic behavior with Mac OS X and an XP guest dating back to VB v1.

comment:31 Changed 4 years ago by padrino

I will backup the latest comment, on OSX host running at 100% CPU when CentOS 5.5 x86 guest idle. Created VM with no boot disk and just leave it running with the FATAL: cant boot error showing and my CPU dropped to <20%.

comment:32 follow-up: ↓ 33 Changed 4 years ago by dfigueire

Just a thought. Is it possible that several people are seeing this 50% thing because once the OS is installed for the first time it does a file system index?

I had this same problem. I checked the OS and it was indexing the file system. After it finished indexing the CPU went down to nothing.

comment:33 in reply to: ↑ 32 Changed 4 years ago by clemmonsm

Replying to dfigueire:

Just a thought. Is it possible that several people are seeing this 50% thing because once the OS is installed for the first time it does a file system index?

I had this same problem. I checked the OS and it was indexing the file system. After it finished indexing the CPU went down to nothing.

I don't think that's the case for me. My VB is on all day every day & I've been experiencing this behavior since v1.

comment:34 follow-up: ↓ 35 Changed 3 years ago by mentat

Confirm this bad behaviour on Windows 7 host with VirtualBox 3.2.10

comment:35 in reply to: ↑ 34 Changed 3 years ago by klaus

Replying to mentat:

Confirm this bad behaviour on Windows 7 host with VirtualBox 3.2.10

Sander already pointed out that such "me too" comments are totally useless without at least VBox.log.

comment:36 Changed 3 years ago by buffyg

IIRC VBoxManage vmstatistics output might be even more useful (in combination with VBox.log) to provide some indication of how VirtualBox understands CPU demand from the guest and how it translates it into host resource consumption.

comment:37 Changed 3 years ago by KuleRucket

OK, I am also a "me too", but I will attach my VBox.log.

To summarise some of the info that is in the log: Host: SLES 11 - 64-bit / 8GB RAM Guest: Windows 7 - 64-bit - allocated 1.5GB RAM VirtualBox 3.2.12 r68302 - with corresponding Guest Additions installed on guest. VT-x/AMD-V enabled IO-APIC enabled

When my Windows 7 guest is not doing much and has only ~3% CPU load, the VirtualBox process still uses about 30-35% cpu. This even happens if I leave Windows 7 in the login screen. I have read the reports on a number of bug reports in the database and I have tried the suggestions there but they are more aimed at Windows XP 32-bit guests.

Changed 3 years ago by KuleRucket

SLES 11 64-bit host / Windows 7 64-bit guest

comment:38 Changed 3 years ago by KuleRucket

Dammit, I should have pressed 'Preview' first...

OK, I am also a "me too", but I will attach my VBox.log.

To summarise some of the info that is in the log:

  • Host: SLES 11 - 64-bit / 8GB RAM
  • Guest: Windows 7 - 64-bit - allocated 1.5GB RAM
  • VirtualBox 3.2.12 r68302 - with corresponding Guest Additions installed on guest.
  • VT-x/AMD-V enabled
  • IO-APIC enabled

When my Windows 7 guest is not doing much and has only ~3% CPU load, the VirtualBox process still uses about 30-35% cpu. This even happens if I leave Windows 7 in the login screen. I have read the reports on a number of bug reports in the database and I have tried the suggestions there but they are more aimed at Windows XP 32-bit guests.

comment:39 follow-up: ↓ 40 Changed 3 years ago by ycsoftware

Same problem with us. I even created a video about it:  http://ycsoftware.net/virtualbox-high-cpu-problem-illustration/

This issue has been out there for quite some time, let just find a solution as it becomes very annoying.

I have experienced it with a Ubuntu Host and with a Windows 7 host, it is definitely not the operating system.

Quick Idea: If it is so difficult to resolve, why don't Virtualbox create a separate thread (hidden to us) that mimics whatever the dummy test machine is doing to the CPU.

Virtualbox Version: 4.0.4

comment:40 in reply to: ↑ 39 Changed 3 years ago by java97301

I was able to resolve this by unchecking the Settings->System->Acceleration->Nested Paging.

I am using w7x64 host vbox 4.1.0. I see the cpu max on a centos 32 linux guest.

comment:41 Changed 3 years ago by rogerdpack

Get the same thing here...I assume it's because I have quad core (64 bit windows running 32 bit ubuntu VM). This worked for me: since I have quad core, go into program files\virtualbox and “pin” every executable within virtualbox to cpu_0. And only tell the VM to use one core. Then it works without using 100% cpu and dragging very very very slowly.

Changed 12 months ago by Emerson Prado

Win XP guest machine with VB 4.1.24 over Linux host

comment:42 Changed 12 months ago by Emerson Prado

An update: using VB 4.1.24 r82872 over Linux Mint Debian Edition, and no trick seems to help anymore. I tried everything here, also the suggestions in #3613 and blocking kernel profiling access to VirtualBox user, as hinted here:

 http://wrightsolutions.wordpress.com/2011/09/10/banning-virtual-machines-from-hardware-aided-performance-counters/[[BR]]

My processor is an Intel Pentium 4 3GHz with two threads. With idle Win XP guest, Virtualbox CPU usage stays mostly between 110 and 170%. It's an all 32-bit system. I'll attach my VBox.log too.

comment:43 Changed 12 months ago by frank

Any change if you use VBox 4.1.26?

comment:44 Changed 12 months ago by Emerson Prado

Nope. Still keeps over 100% CPU all the time. I stopped my MSSQL server in the WinXP host, and opened another VM with Slackware, to no help. BTW, I tried 4.2.12 too, all the same. The VMs just seem to use all the CPU they can.

comment:45 Changed 11 months ago by stucki

I have the same problem, running a Windows 7 guest on a Ubuntu 13.04 host.

I suspect that it's caused by Unity running on the host. When I use metacity instead, then it works fine.

Can you please check if you can reproduce this?

comment:46 Changed 11 months ago by Emerson Prado

I use Marco, which is a fork of Metacity.

comment:47 Changed 11 months ago by stucki

So maybe we're not having the same issue then.

Just for completeness: Meanwhile I switched to GNOME3 (apt-get install ubuntu-gnome-desktop) and it works absolutely fine. So my problem is definitely a Unity but not a Compiz issue.

comment:48 Changed 11 months ago by stucki

FYI: I created a separate bug report about my issue, because I'm pretty sure it is not a VirtualBox issue but rather caused by Ubuntu / unity:  https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1180548

comment:49 Changed 3 months ago by Paul Draper

Windows 7 guest Ubuntu 12.04 host

2-5% CPU on guest 50-60% CPU on host

I stopped my SQL Server, and the problem was solved.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use