VMware Communities
michael_neale
Contributor
Contributor

linux distro & CPU hogging

Hi All.

I am interested in tips on what people have found works well as a linux distro in fusion. Currently I am trying out Fedora Core 6 (fully updated of course) - it was the only DVD I had lying around.

I am not that happy with it, it chews CPU when idle (switching to 1 CPU make it bearable) but the mouse "feels" slow (and annoying) - performance is OK though (vmware-vmx process takes over 30% CPU in OSX - even though in Linux top only shows <1% usage).

I have also had issues where it can't mound the mac file system shares (of course after VMWare tools has been installed).

I am still pouring through the forums to find tips (I don't seem to be able to turn on paravirtualisation).

I would prefer Fedora lineage - is 7 better? any other tricks I can try? CentOS?

Basically I am looking for something where the mouse feels smooth, and it doesn't chew CPU which I can use for day to day development (no 3d or anything much needed graphically).

It sounds like I am a bit unlucky, and what I am seeing is not the "norm" but any advice or help would be appreciated (this does look promising).

0 Kudos
4 Replies
srlamb
Contributor
Contributor

I'm not sure about the mouse stuff (I don't use X11 within a Linux VM...just run stuff against the host machine's X11.app), but the CPU hogging you're seeing is normal. If other people aren't seeing it on Fedora Core 6, they aren't looking.

The CPU difference between distributions when idle is almost entirely the result of the HZ setting in the kernel, which is basically how many times per second they wake up to see what task to run next. It's a compromise between responsiveness and battery life. RHEL4/CentOS 4 has (if I remember correctly) HZ=100. RHEL5/CentOS 5 has HZ=1000, so it uses about 10X as much CPU/battery life. Fedora Core 6 also. You can easily measure this by running something like

$ fgrep timer /proc/interrupts; sleep 10; fgrep timer /proc/interrupts[/code]

then subtracting the first number from the second.

If you're feeling up to it, you can download and recompile a new kernel on any distribution. In particular, very new kernels support "CONFIG_NO_HZ" / "dynticks" / "tickless", which totally removes this compromise. They wake up when they need to, not at a fixed interval. I've done it, and my Linux VM uses much less CPU time now. There are a few other things that wake up more often than they should (like the VMware Tools 11 times per second...grr), but still the difference is night and day.

Fedora 8 (and likely the next releases of other distributions) will be tickless without having to replace the kernel.

In fact, you can even try running their Fedora 8 development kernel on Fedora Core 6. I haven't tried it myself, but I'd expect it to work.

i386: http://download.fedora.redhat.com/pub/fedora/linux/development/i386/os/Fedora/kernel-2.6.23-0.45.rc0...

x86_64: http://download.fedora.redhat.com/pub/fedora/linux/development/x86_64/os/Fedora/kernel-2.6.23-0.45.r...

0 Kudos
piacentini
Contributor
Contributor

Well, I get 95% idle time when the Linux guest is idle here, with both cpus devoted to it. MBP 2.33/2GB RAM. The distribution I am using in this VM is Kubuntu Feisty. Everything feels very smooth, after installation of tools and enabling of the para-virtualized kernel. However, USB is disconnected for the VM, and this probably accounts for most of the savings in cycles.

0 Kudos
bgertzfield
Commander
Commander

Hi michael_neale,

Your Linux 2.6 kernel was probably compiled with HZ=1000, which is extremely hard on virtualization environments (it asks for 1000 timer interrupts per second).

http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1420 has instructions on how to make this a little less rough on VMware Fusion.

0 Kudos
michael_neale
Contributor
Contributor

Thanks for the helpful replies. Yes it does seem to be set to 1000HZ - which is a pain. Now I have had lots of different advice from different people, I guess I will jsut have to try things out, but things aren't looking that great for me and fedora at the moment Smiley Sad I have wasted a few days on this now. VMWare I hoped would make it easier (I didn't have any hardware hassles at least, but its all moot if its not usable).

0 Kudos