Hi !
It surprises me that vmware latest build eats up to 50% cpu with an idle vm.
System used: xserve Xeon, centos 5 vm
OSX top -s 10:
Processes: 57 total, 3 running, 54 sleeping... 222 threads 15:33:06
Load Avg: 1.07, 1.23, 1.16 CPU usage: 1.3% user, 10.6% sys, 88.1% idle
SharedLibs: num = 174, resident = 38.7M code, 5.43M data, 12.8M LinkEdit
MemRegions: num = 6150, resident = 80.1M + 17.8M private, 1.08G shared
PhysMem: 495M wired, 1017M active, 487M inactive, 1.95G used, 47.3M free
VM: 4.90G + 119M 1241571(0) pageins, 2222(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
22949 vmware-vmx 43.5% 80:07:28 32 148 2029 14.9M 1.02G 1.05G 1.18G
Processes: 57 total, 3 running, 54 sleeping... 222 threads 15:33:16
Load Avg: 1.14, 1.24, 1.16 CPU usage: 1.2% user, 10.7% sys, 88.1% idle
SharedLibs: num = 174, resident = 38.7M code, 5.43M data, 12.8M LinkEdit
MemRegions: num = 6151, resident = 80.1M + 17.8M private, 1.08G shared
PhysMem: 495M wired, 1017M active, 487M inactive, 1.95G used, 47.3M free
VM: 4.90G + 119M 1241571(0) pageins, 2222(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
22949 vmware-vmx 39.0% 80:07:32 32 148 2029 14.9M 1.02G 1.05G 1.18G
Note the 4 sec REAL cpu usage.
vm top -d 10:
top - 15:35:14 up 7 days, 21:58, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 113 total, 1 running, 112 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.8%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1035352k total, 944036k used, 91316k free, 255520k buffers
Swap: 524280k total, 0k used, 524280k free, 300920k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
364 root 10 -5 0 0 0 S 0 0.0 0:52.64 kjournald
17184 robk 15 0 2192 1044 816 R 0 0.1 0:00.03 top
1 root 15 0 2036 648 552 S 0 0.1 0:01.05 init
top - 15:35:24 up 7 days, 21:58, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 113 total, 1 running, 112 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1035352k total, 944176k used, 91176k free, 255520k buffers
Swap: 524280k total, 0k used, 524280k free, 300920k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17184 robk 15 0 2192 1044 816 R 0 0.1 0:00.04 top
1 root 15 0 2036 648 552 S 0 0.1 0:01.05 init
2 root RT 0 0 0 0 S 0 0.0 0:02.27 migration/0
Parallels most certainly does NOT !
This and not being able to do something with other than 1 snapshot feels a bit limited ..
Cheers!
Message was edited by:
robbedoes
Could this be Centos bug 1680?
http://bugs.centos.org/view.php?id=1680
Linux 2.6 decided to up the in-kernel clock tick from 100 times per second to 1000 times per second. This is particularly taxing in a virtual environment. You can provide your own kernel with a sane HZ (or even a tickless kernel, if you're up for it) and reap the benefits of better performance and lower host CPU load.
Have you given the VM two CPUs? If so, try setting it back to one, at least temporarily.
Hi !
Yup, setting 1 instead of 2 cpu's lowers the idle load to 12.5%.
Yet the vmware pid eats 4 secs of cpu time every 10 secs..... ?
puzzled ?!
I still think it's the fact that CentOS chews up CPU just asking for timer interrupts too often.
Here's a KB article that talks about the problem and how to work around it (for 32-bit VMs, pass the clock=pit option to the kernel at boot, and for 64-bit, use the notsc option):
http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1420
I am experiencing this with fedora core 6 and a much more modern kernel, so I don't think that is the issue. Switching to 1 CPU seems to calm it down a bit, but its still sucking about 20% off each CPU. AT LEAST.
Those experiencing this, have you ever plugged in any USB device at all?
I have plugged in a USB device, yes - but never used it while in linux (only from OSX).
Should we try and disable USB as an experiment?
I'm not sure if disabling USB makes a difference. However, I had an XP virtual machine and I noticed that after plugging a USB device in the VMX file has a line added...
usb.autoConnect.device0 = ""
I shut down the VM, deleted the line, and restarted and CPU usage was low again. However, I'm not sure this line is related at all. If you see the line in your .vmx file it might be worth removing it just to see how you get on.
Obviously, as soon as you plug in and remove a USB device again this line returns.
I am experiencing this with fedora core 6 and a much
more modern kernel, so I don't think that is the
issue. Switching to 1 CPU seems to calm it down a
bit, but its still sucking about 20% off each CPU. AT
LEAST.
I'm not that familiar with how Linux works, but when installing multi-CPU Windows OSes a multiprocessor kernel gets used. I've had problems with VMware (Server) where I had to not only set the VM to use a single processor but to swap out the kernel.
I still think it's the fact that CentOS chews up CPU
just asking for timer interrupts too often.
Here's a KB article that talks about the problem and
how to work around it (for 32-bit VMs, pass the
clock=pit option to the kernel at boot, and for
64-bit, use the notsc option):
http://kb.vmware.com/selfservice/microsites/search.do?
cmd=displayKC&externalId=1420
That article doesn't really work around it - it just makes the clock a bit more accurate, but it doesn't change the CPU utilization. The only real solution is to use a less demanding kernel - tickless is best, but 100HZ is okay. Some distributions ship with 100 Hz; the next version of all distributions will probably be tickless; but you can also install a custom kernel yourself.
More info here: http://www.vmware.com/community/message.jspa?messageID=706649#706649