Page 1 of 1
Workaround for 100% Host CPU on Idling Guests
Posted: 30. May 2009, 21:52
by Lockheed
How about the elephant in the room that sits there since years? Yes, that's right. I am talking about the CPU usage of idling guests.
There is a simple but hardly elegant workarouond for it but why can't it just be dealt with bu the dev team?
Here's the description and workaround I'm talking about:
Re: VirtualBox High CPU Usage
| Edit: TerryE: Discussion nothing to do with 2.2.4 Release, so split to separate topic. Replaced link with one to specific post |
Re: Discuss VirtualBox 2.2.4 Release
Posted: 30. May 2009, 22:07
by Perryg
Hummm, Not sure what their problem is. I have a Ubuntu 8.04 LAMP running and 9.04 client seamless running 3 different Web apps in 3 different screens on my Vista and it idles at between 3% to 8% Host machine is running email and Web access as well all 24/7. I did notice an issue a few versions back though so maybe that is what you are talking about. By the way if you enable USB and 3D effects that will eat a lot of processor time. USB will eat it just having it turned on and no device selected. Maybe that will help you .
Re: Discuss VirtualBox 2.2.4 Release
Posted: 30. May 2009, 23:21
by Lockheed
I only used 2.2.2 and this newest release so the point of old version is albeit missed.
As for 3D and USB taking cpu - how would you explain that once I run second VM without any system, the CPU usage on the first VM goes down from 95-100% to 3-8%? There is definitely something else going on.
Re: Discuss VirtualBox 2.2.4 Release
Posted: 30. May 2009, 23:38
by Perryg
Lockheed wrote:how would you explain that once I run second VM without any system,
Could you explain this a little better for me? Do you mean just create a VM and not install an OS in it? Or create it install OS and run it without other services?
Re: Discuss VirtualBox 2.2.4 Release
Posted: 30. May 2009, 23:54
by Lockheed
You don't even need an OS in the VM. Just set up a new VM and boot to "no bootable medium found! System Halted" and it will still do the job"
That's what I'm talking about. I never tried running a dummy (decoy

) VM with system on it cause that did the trick It is exactly as described in the last few posts of the thread I linked.
I have exactly the same problems runnig VirtualBox on Ubuntu 9.04 x64 and Windows 7 x64. Guests systems are XP, 2003 and Vista.
Re: Discuss VirtualBox 2.2.4 Release
Posted: 31. May 2009, 03:03
by Perryg
Wow. I have Ubuntu on my laptop and run several VMs on it but I do not have this problem. I wonder if it is a reporting error due to it being on 64 bit system. Well makes no difference. Have you or anyone else that you know posted a bug report on this? That is the only way that it is going to get fixed. You can find the link at the bottom of my post. You will need to setup an account there though it is not the same system.
Re: Workaround for 100% Host CPU on Idling Guests
Posted: 31. May 2009, 04:46
by TerryE
I moved this off to a separate post because this is really nothing to do with the 2.2.4 release. (The OP is using 2.2.2!)
Lockhead,
As Perryg says, if you have a repeatable example here then the best thing that you can do is to use the public
Bugtracker to raise a ticket on this issue. You will first need to register for a
wiki user account (this is different to a forum account sorry) and then you can logon to the wiki and raise the ticket.
What the dev team need is hard details, preferably enough for them to recreate the test cases. You say you have
- Hosts: Ubuntu 9.04 x64 and Windows 7 x64.
- Guests VMs: XP, 2003 and Vista.
and imply that you see the same issue in all 6 combinations, which implies that you have done 12 timing tests. If you have then post the hard details including attachments for the relevant VBox.logs. Thank-you
Re: Workaround for 100% Host CPU on Idling Guests
Posted: 31. May 2009, 11:04
by Lockheed
I am surprised you are not aware of this. I use VirtualBox since less than a month but I have been finding repots of this error dating 3-4 years back.
I will post it in the bugtracker as soon as I figure out where vbox logs are.
PS
I AM using 2.2.4.
Re: Workaround for 100% Host CPU on Idling Guests
Posted: 31. May 2009, 14:04
by TerryE
In my case, my "production" VMs are all Linux appliances using a VM guest tuned kernel. I just don't use Windows VMs that much, though I do have one XP guest which doesn't show these issues, BTW.
They each take <3% CPU when idling so I just don't see this issue. I wonder, are you using non-SMP kernels in your Windows VMs as recommended?
Re: Workaround for 100% Host CPU on Idling Guests
Posted: 31. May 2009, 17:53
by Lockheed
TerryE wrote:In my case, my "production" VMs are all Linux appliances using a VM guest tuned kernel. I just don't use Windows VMs that much, though I do have one XP guest which doesn't show these issues, BTW.
I have to use Windows as Office 2003 and Photoshop CS4 will not install on Wine, and there is no Linux replacement for TheBat! nor Miranda.
I wonder, are you using non-SMP kernels in your Windows VMs as recommended?
I have no idea how to check/change it.
Re: Workaround for 100% Host CPU on Idling Guests
Posted: 31. May 2009, 19:03
by Lockheed
I did some testing and I found something interesting. If I turn off Miranda IM, then VirtualBox CPU usage goes down to normal levels (>10%) but once I start is again, then it jumps again to 70%-100% even when idling. I suppose this might be related to some ports/network protocols Miranda is using because when I use it in Host windows os, it uses 1-5% CPU max.
But that's not all! If I run another "dummy" VM (just like I explained before) CPU usage goes down to normal levels even if VM guest is running Miranda!
For all measurements I am using "top" command in the console.
Re: Workaround for 100% Host CPU on Idling Guests
Posted: 2. Jun 2009, 16:26
by lowbot
I noticed this too on windows xp host and ubuntu guest. My workaround is to kill the rdpclip.exe process and/or disable clipboard sharing. Its buggy if you use RDP to connect to the host OS.
Re: Workaround for 100% Host CPU on Idling Guests
Posted: 13. Jun 2009, 11:58
by Mereth
I have this issue when i install SQLServer 2008 in a Win2003 Guest (WinXP Host).
Stating a dummy VM in the background fix the problem too.
When the SQL2008 service is started, the log file show a PIT modification :
before : PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
after : PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
Re: Workaround for 100% Host CPU on Idling Guests
Posted: 13. Jun 2009, 15:18
by TerryE
What do you mean by PIT modification?
Re: Workaround for 100% Host CPU on Idling Guests
Posted: 13. Jun 2009, 18:11
by Mereth
I mean the value of the PIT (emulated by a Intel 8253 it seems) is different in the Guest if the SQLServer service is started or not, and for information, I have a E8500@4Ghz.
SQLServer service up : "PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)" => 2% cpu usage on Host if 0% on Guest
SQLServer service down : "PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)" => 20% cpu usage on Host even if 0% on Guest
I don't know if it is related to this bug, because when i launch a dummy VM in background, the PIT still change when i start or stop the service, but there is no more strange cpu usage on the host.