RedHat4.4 and CentOS 5 - processor full capacity (100%)

Discussions about using Linux guests in VirtualBox.
RomaNick
Posts: 2
Joined: 15. Jun 2007, 14:23

RedHat4.4 and CentOS 5 - processor full capacity (100%)

Post by RomaNick »

Why?
Host system - Ubuntu 7.04 or CentOS 5.
How this correct?
RomaNick
Posts: 2
Joined: 15. Jun 2007, 14:23

Post by RomaNick »

Any ideas? Please HELP!!!
Guest Linux - CPU idle. Host linux system - CPU load 100%!!!
VirtualBox 1.4.0.
airman99
Posts: 20
Joined: 20. Jun 2007, 01:36

Post by airman99 »

I have nearly the same thing with FreeBSD (guest) running under Gentoo (host). Seems odd that WinXP in graphic mode would have lower CPU utilization than FreeBSD in text mode.

Hopefully somebody will figure this one out.
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Post by stefan.becker »

Why? Because of no Infos.

Nice. What do you think wherefrom people knows your Hardware, the configuration and the guests?
airman99
Posts: 20
Joined: 20. Jun 2007, 01:36

Post by airman99 »

Are you saying that if I actually posted my hardware configuration and detailed information about my system that there's a possibility that you could figure it out? If so, then I will. If not, then your post is meaningless.
malai5
Posts: 26
Joined: 14. May 2007, 11:19
Location: Australia
Contact:

Post by malai5 »

Well, I am not the only one to have this situation.

I run XP SP2 on a Vaio 1.2Ghz laptop. I have only 512MB of ram.
I run Pclinux .93 as guest in VBox with 254MB of virtual ram.
I find that my processor runs almost flat out most of the time when the guest is going.
When I was running Kubuntu 7.04 the processor would run between 60% and 100%.
As my processor is only small, even running flat out does not cause much of a problem, but I would be interested to know why the difference with the distributions.

Cheers

Malai5
The Further You Go, The Less You Know.
www.mam3.com.au
malai5
Posts: 26
Joined: 14. May 2007, 11:19
Location: Australia
Contact:

Post by malai5 »

Hi All

Just me again.
I checked with KDE System Guard instead of the Windows System monitor and found that actually the CPU usage was quite reasonable, averaging about 30 to 40 percent with the odd spike to 80 or 90 percent.
I think that when only one operating system is being accesed at a time there is only one CPU reading, but when two are, as in calling up the system monitor, it gives a reading for that circumstance, not the reading when just operating the guest system, if you get my drift.

Cheers

Malai5
The Further You Go, The Less You Know.
www.mam3.com.au
airman99
Posts: 20
Joined: 20. Jun 2007, 01:36

Post by airman99 »

I just installed Gentoo within VirtualBox 1.4.0 with a fairly lean CPU, rebooted the guest OS, and the Gentoo guest OS now takes up ~90-95% CPU utilization when it is running. Being annoyed that my Debian guest OS runs down about 5%, I recompiled my new Gentoo kernel whilst changing a single setting. Now my Gentoo guest OS utilizes ~5% CPU utilization. It's not scientific yet, as I haven't experimented enough to nail the solution down exactly, but I will repost my results as soon as I can verify that what I changed really did solve the problem.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

To add a bit more juice, it seems that the same problem happens with Windows 98 guest kernels - very slow performance WAY below Windows XP, super slow - unable to work, which is simply against the logic, because Win98 runs fine on a real Pentium 1 systems, and is extremely fast on Pentium 2 systems.

The verdict: there is some performance bug in VirtualBox that causes this strange behavior. (maybe it fallbacks to emulation, instead of Virtualization, when some code is executed ?)

Things to test:
-RedHat based guests
-FreeBSD based guests
-Windows 98 based guests
airman99
Posts: 20
Joined: 20. Jun 2007, 01:36

Post by airman99 »

In my particular case, on the host computer I am running Gentoo with a 2.6.17-gentoo-r8 kernel, VirtualBox 1.4.0, and the guest is Gentoo with a 2.6.20-gentoo-r8 kernel. Booting the virtual machine from a Gentoo LiveCD, the host CPU was ~2-5% utilization. After building my own kernel and running it on the guest Gentoo OS, my host CPU utilization was ~95%. Not good. But I knew at that point that the issue must be a setting within my kernel config. I poked around a bit and discovered that changing the "Processor type and features | Timer frequency" (CONFIG_HZ_100, CONFIG_HZ_250, CONFIG_HZ_300, CONFIG_HZ_1000) kernel setting on my guest OS drastically changed the resting host CPU utilization. Here are my results:

CONFIG_HZ_1000=y :: CPU Utilization on host system ~95-100%
CONFIG_HZ_100=y :: CPU Utilization on host system ~2-5%

The 250 and 300 Hz settings caused a host CPU Utilization between the above values.

Therefore, in my particular case, the CONFIG_HZ_xxx(x) setting on my Linux kernel config for the guest system significantly affects the host CPU Utilization. Will have to try this on my FreeBSD kernel to see if my results are the same.

Your results may vary.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

Yes, this is interesting stuff.

Could you try building a "tickless" kernel to test it as well ? please...
airman99
Posts: 20
Joined: 20. Jun 2007, 01:36

Post by airman99 »

"tickless"? In the Linux 2.6 kernel, there are only 4 timer speed options, a timer speed of 100 Hz, 250 Hz, 300 Hz, and 1000 Hz.

I'm currently recompiling my FreeBSD kernel with "options HZ=100" to see if it will drop my FreeBSD CPU Utilization. The default FreeBSD setting is "options HZ=1000".

I have read that a timer speed of 1000 Hz makes for a more responsive machine, important when one is running a GUI. However, in my case, I'm not running a GUI in my VirtualBox guest OSes and would rather have the lesser host CPU Utilization.
airman99
Posts: 20
Joined: 20. Jun 2007, 01:36

Post by airman99 »

OK, I figured out what "tickless" means, basically a timer speed of 0 when the CPU is at idle. The 2.6.21 kernel natively supports this feature, but I'm using a 2.6.20 kernel. When Gentoo releases the 2.6.21 code, I'll try out the tickless feature.
b4truth
Posts: 9
Joined: 22. May 2007, 18:13
Location: India, Auroville
Contact:

Cent OS traps CPU

Post by b4truth »

Intel C2D 2.4 GHZ on mobo Intel 965RY with 2 x 1GB DDR2 ram, 2 x Seagate 160GB sata, DVD writer LITEON
Installed Ubuntu Feisty (host), Guests (Dapper, Fedora 5, CentOs 4.3 and 5, XP)
I split the ram 50/50 between host and guest.
I have the same problem:
After booting and login in:

Fedora 5 CPU activity less than 5%
XP less than 5%
Dapper less than 5 %
Cent OS 4.3 stays on 100%
Cent OS 5 stays on 100%

Guest additions installed. First I thought the VESA graphic driver caused this as it did on other machines but after installing the guest-additions the driver is vbox but the CPU load is the same.
No solution found so far.
airman99
Posts: 20
Joined: 20. Jun 2007, 01:36

Post by airman99 »

Try recompiling your kernel with a slower timer speed.
Post Reply