Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] virtualbox gentoo guest 0% CPU, Ubuntu host 50% CPU
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ipic
Apprentice
Apprentice


Joined: 29 Dec 2003
Posts: 215
Location: UK

PostPosted: Sun Oct 26, 2008 1:49 pm    Post subject: [SOLVED] virtualbox gentoo guest 0% CPU, Ubuntu host 50% CPU Reply with quote

I'm running a Gentoo guest ( kernel 2.6.25-gentoo-r8 ) in virtualbox 2.0.4 (the binary release). The host is an Ubunty Hardy installation, running kernel 2.6.24-21-generic.

When the guest is idle (top shows 100% id), the host is showing the virtualbox task taking around 50% of the CPU. It varies from 48 to 51%, but never less.

This is an "old" machine - AMD processor predates the AMD-V features. I am using a previous vmdk image from VMWARE as the virtual disk (write through mode).

I have tried running both headless and from the virtualbox manager. Also tried enabling/disabling IO APIC and PAE/NX in the virtual machine definitions - no change to the CPU load on the host.
There are no messages in the host syslog, or dmesg, that indicate anything is out of the ordinary.
The guest dmesg looks clean, like a normal boot up.

The Gentoo guest has previously been running as a VMWARE VM for many months - I decided to migrate to virtualbox because of general unhappiness with VMWARE's support for newer kernels. Besides this little niggle its a good move - all works fine.

I'm posting in the hope that either someone else has seen this before, or can give me some leads to look at.
Thanks
Regards
Ian


Last edited by ipic on Sun Oct 26, 2008 4:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
ipic
Apprentice
Apprentice


Joined: 29 Dec 2003
Posts: 215
Location: UK

PostPosted: Sun Oct 26, 2008 4:20 pm    Post subject: Reply with quote

I found the culprit.
I had enabled the USB features in the VM configuration.
Disabling them completely reduces the idle CPU load on the host to around 8%, which I can live with.

Seems that the best way for me to solve a problem is to post to the Gentoo forum - usually stumble across a solution an hour or so later :-).

Regards
Ian
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1629

PostPosted: Sat Nov 01, 2008 8:03 am    Post subject: Reply with quote

ipic wrote:
I found the culprit.
I had enabled the USB features in the VM configuration.
Disabling them completely reduces the idle CPU load on the host to around 8%, which I can live with.

Seems that the best way for me to solve a problem is to post to the Gentoo forum - usually stumble across a solution an hour or so later :-).

Regards
Ian


My situation is worse. It shows 95% cpu usage. I will try to disable usb and see what happens.

I use 2.0.2 version. How you installed the 2.0.4 version? I downloaded the files into /usr/portage/distfiles, but when I try to emerge it says no ebuilds. Will be glad to hear your solution to this problem.
Back to top
View user's profile Send private message
ipic
Apprentice
Apprentice


Joined: 29 Dec 2003
Posts: 215
Location: UK

PostPosted: Sat Nov 01, 2008 8:15 am    Post subject: Reply with quote

There are several tickets open on the virtualbox defect tracking site about the CPU issue - its possible one of these may help you. I used this Google search
Code:
site:VirtualBox.org host cpu 50%
for my issue. The site:VirtualBox.org trick should help you find relevant postings. There are several reasons for high CPU usage, depending on the guest OS you are using.

As for installing:
Code:
ian2 ~ # eix virtualbox
* app-emulation/virtualbox-bin
     Available versions:  ~1.6.6!f ~2.0.2!f ~2.0.4!f {additions headless sdk vboxwebsrv}
     Homepage:            http://www.virtualbox.org/
     Description:         Family of powerful x86 virtualization products for enterprise as well as home use


....

[I] app-emulation/virtualbox-ose
     Available versions:  1.6.6 (~)2.0.2 (~)2.0.4 **9999 {additions alsa headless kernel_linux pulseaudio python qt3 qt4 sdk}
     Installed versions:  2.0.4(08:31:48 28/10/08)(additions alsa pulseaudio python qt4 sdk -headless)
     Homepage:            http://www.virtualbox.org/
     Description:         Softwarefamily of powerful x86 virtualization


It is there, but masked. Place an entry in your you /etc/portage/package.keywords for the ebuilds you need and version 2.0.4 should emerge OK. It did for me.

Regards
Ian
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1629

PostPosted: Sun Nov 02, 2008 4:35 pm    Post subject: Reply with quote

ipic wrote:
There are several tickets open on the virtualbox defect tracking site about the CPU issue - its possible one of these may help you. I used this Google search
Code:
site:VirtualBox.org host cpu 50%
for my issue. The site:VirtualBox.org trick should help you find relevant postings. There are several reasons for high CPU usage, depending on the guest OS you are using.

As for installing:
Code:
ian2 ~ # eix virtualbox
* app-emulation/virtualbox-bin
     Available versions:  ~1.6.6!f ~2.0.2!f ~2.0.4!f {additions headless sdk vboxwebsrv}
     Homepage:            http://www.virtualbox.org/
     Description:         Family of powerful x86 virtualization products for enterprise as well as home use


....

[I] app-emulation/virtualbox-ose
     Available versions:  1.6.6 (~)2.0.2 (~)2.0.4 **9999 {additions alsa headless kernel_linux pulseaudio python qt3 qt4 sdk}
     Installed versions:  2.0.4(08:31:48 28/10/08)(additions alsa pulseaudio python qt4 sdk -headless)
     Homepage:            http://www.virtualbox.org/
     Description:         Softwarefamily of powerful x86 virtualization


It is there, but masked. Place an entry in your you /etc/portage/package.keywords for the ebuilds you need and version 2.0.4 should emerge OK. It did for me.

Regards
Ian


Ian, the cpu usage was solved as you suggested. I removed the usb and it decreased dramatically the cpu usage.

The second problem is that with eix it doesn't show me version 2.0.4. maximum masked 2.0.2. Don't know why. I also use the bin version. For some time I suspect that eix and update-eix doesn't work properly. Any ideas why?

Here is what I have:

Code:
 
[D] app-emulation/virtualbox-bin
     Available versions:  1.6.4!f ~1.6.6!f ~2.0.2!f {additions headless sdk vboxwebsrv}
     Installed versions:  2.0.2!f(11:57:37 PM 10/31/2008)(additions sdk -headless -vboxwebsrv)
     Homepage:            http://www.virtualbox.org/
     Description:         Family of powerful x86 virtualization products for enterprise as well as home use

* app-emulation/virtualbox-guest-additions
     Available versions:  (~)1.6.4-r2 (~)1.6.6 (~)2.0.2 {X kernel_linux}
     Homepage:            http://www.virtualbox.org/
     Description:         VirtualBox kernel modules and user-space tools for Linux guests

[D] app-emulation/virtualbox-modules
     Available versions:  1.6.4 ~1.6.6 ~2.0.2 {kernel_linux}
     Installed versions:  2.0.2(10:52:15 PM 10/31/2008)(kernel_linux)
     Homepage:            http://www.virtualbox.org/
     Description:         Kernel Modules for Virtualbox


usually, after emerge, I run
Code:
update-eix
Back to top
View user's profile Send private message
ipic
Apprentice
Apprentice


Joined: 29 Dec 2003
Posts: 215
Location: UK

PostPosted: Sun Nov 02, 2008 4:43 pm    Post subject: Reply with quote

Have you tried running
Code:
eix-sync
This does an emerge --sync and then updates eix as well.
I've been using that for a few years now - no problems.

Since 2.0.4 is in the portage tree, I can't think why you wouldn't be seeing it, unless you haven't done a sync recently.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1629

PostPosted: Sun Nov 02, 2008 6:58 pm    Post subject: Reply with quote

ipic wrote:
Have you tried running
Code:
eix-sync
This does an emerge --sync and then updates eix as well.
I've been using that for a few years now - no problems.

Since 2.0.4 is in the portage tree, I can't think why you wouldn't be seeing it, unless you haven't done a sync recently.


I used once eix-sync. I usually use emerge sync and then update-eix.

I had to sync the system and now 2.0.4 appears. Maybe I will switch to eix-sync. Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum