1847336 Members
2426 Online
110264 Solutions
New Discussion

CPU HOG

 
SOLVED
Go to solution
joe_91
Super Advisor

CPU HOG

Hi There:

We are testing a script which would occupy 100% CPU. Now on a 2 processor box if i run six instances of this script it does not occupy 100% but only 50-60% (top output), but on a 6 processor machine six instances would occupy 99.9% on all CPU?(top would show first six as 99%) Can someone say why?

Thanks
Joe.
4 REPLIES 4
Sajid_1
Honored Contributor

Re: CPU HOG

hello,

'top' command will not display the CPU usage properly all the time unless it is well patched. Did you install the latest top cumulative patches? Another option is to check the CPU usage with GlancePlus.

HTH
learn unix ..
Victor_5
Trusted Contributor

Re: CPU HOG

According to the docA5243216, here is the info fyi...


Top pulls the current system status from /dev/kmem and provides
enough detail to perhaps isolate a problem. Top is fine to use
as a diagnostic tool.

Glance pulls some of its data from /dev/kmem, but additionally,
a special kernel interface was written to retrieve performance
information from the time the daemon has been running.

So one can't really compare the values between the two, since
data is not coming from the same source. Glance shows what is
happening over the time the midaemon has been running, rather
than what the system shows at the moment. It also shows more
detail on a per-process basis than top.

So is top dependable? Yes, for what it was designed to do--
provide a quick look at the major CPU users. But no one tool
provides all the performance data. You can cross check the data
with that seen in Glance, but not number to mumber, but rather
does glance show the same processes as the highest CPU users.
Jeff Schussele
Honored Contributor

Re: CPU HOG

Hi Joe,

Top is notoriously unreliable on CPU usage.
I'd use glance or gpm. You can drill down to individual CPU usage.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Martin Johnson
Honored Contributor
Solution

Re: CPU HOG

When you have a lot of processes trying to use CPU, you increase system overhead. The scheduler has to work hard to give everybody their fair share of CPU. Unfortunately, the scheduler has to use the scare CPU resources to do this. Hence, the individual processes get less CPU.

HTH
Marty