May 16, 2012 8:16 AM
Weird Results with Virtualized CPU monitoring
-
Like (0)
Hi there !!
I just started with some tests with zenoss.
My VM's test run on KVM Hyperviseur related to a Cloudstack Server.
I settle up a simple snmp monitoring for basics check first .
All was good and the graph looked nice but when I tried stressing the cpu (with a stress --cpu 10 --timout 30 for example) and watching locally my CPU % Use (100% for the stressed time) I can only see some 20-30 % use on the zenoss graphs.
I tried stressing more but on the graph, it never reached the 100%.
I tried to figoured out how this monitoring works, and it's just some simple snmp trap ( I dident tried with a SSH monitoring yet )
Did someone already have the same results ?
Ty for your time.
Cheers.
For each measurement, are you measuring within the (K)VM or on the host? Can you post the specific commands you are using to determine CPU usage?
Thanks
hi Daniel,
Thank you for your answer.
I'm directly on the host using a simple top command.
With a physical computer, the graph and the top command results are the same.
I'm gonna have a look at the cloudstack plugin to see if I can monitore host trough that and if the results are more accurate.
Cheers
If you are looking at "top" on the host, then the CPU may in fact be saturated inside the VM. The VM may only have one of your cores and that would explain why it cannot saturate the host's CPU -- it only has "a piece" of it.
Be sure to compare "top" inside the VM and on the host, and also compare "cat /proc/cpuinfo | grep -c ^processor" on the host and inside the VM. This will show you how many cores are inside the VM vs. the host.
The CloudStack ZenPack should make this a bit more clear, I think.
Hi Again !!!
Well I tried some other things to understand how zenoss really monitor the CPU usage.
So my host is a 24 core server.
I took 2 VMs :
One is monitored by snmp.
Other one is monitored via ssh.
I go on the VM, I stress it such as :
stress --cpu 30 --timeout 60
and with a top on the VM, I get a 100% CPU usage . When I look at /proc/stat, I only see numbers raising.
I tried a bash script that use /proc/stat to get the CPU Usage http://colby.id.au/node/39 and it return 100%.
And when I look on my zenoss Graph CPU Usage, I only get around 20 % In Both cases.
I tried to figered out how zenoss buidl those graphs and get those results but can't find it ...
I also tried libvirt zenpack but impossible to make it works.
I keep going further with this.
At the end, when I try a ssCPUiddle on a server on which I'm stressing the CPU, i get the good result via SNMP .I only have something like 3 sec difference. On the graph , if I stress it for a long time , I get the good result. But if stress only for 60 seconds for example, I won't reach the 100% . So it seems to be the delay between the incident and the graph's building that was bringing the wrong results for snmp.
For ssh, when i run manually a cat /proc/stat I get some totally different results compare to the /sbin/cat /proc/stat launched via zenoss through ssh on the remote host. Can't understand why so far.
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||