[CentOS] CPU usage over estimated?

Thu Jun 4 22:23:24 UTC 2009
Les Mikesell <lesmikesell at gmail.com>

Scott Silva wrote:
> on 6-4-2009 2:14 PM Les Mikesell spake the following:
>> Scott Silva wrote:
>>> on 6-4-2009 5:37 AM Theo Band spake the following:
>>>> I have a quad core CPU running Centos5.
>>>>
>>>> When I use top, I see that running processes use 245% instead of 100%.
>>>> If I use gkrellm, I just see one core being used 100%.
>>>>
>>> This one is easy. 4 cpu's, 100% total each, a maximum of 400%.
>>>
>>> Since one core is at 100%, the other 145% is spread across the other 3 cores.
>> Is there any reasonable way to figure out the available CPU capacity 
>> from an SNMP monitoring tool?  (You want to know if the reported >100% 
>> usage is a problem but you don't know anything else about the machine).
>>
> That can be difficult, because a machine in I/O wait can be slower than a
> machine at full CPU utilization. There is nothing technically wrong with a
> machine at 100% cpu. It is just means that the cpu is busy doing useful tasks,
> instead of sitting idle doing nothing.
> Where it is more critical is in a system that has occasional peaks of load. If
> the system is already busy, then these tasks will wait. Unless your system
> idles down and lowers the cpu freq. to save power, it isn't really saving
> anything by being idle. As long as the system gets its work done in a timely
> manner, then it isn't overloaded.

SNMP does a reasonable job of reporting user/system/iowait.  That's not 
so much the question as how to know how many CPU's some machine has so 
you can know whether 400% is all of your capacity. That is, how many 
CPUs it has, since it doesn't scale the percentage against the total for 
you.

-- 
    Les Mikesell
     lesmikesell at gmail.com