1826397 Members
3558 Online
109692 Solutions
New Discussion

CPU Bottleneck

 
surya_3
Occasional Contributor

CPU Bottleneck

I have one N-Class server with 4 CPUs 3 CPUs are always idle and 1 CPU is having %CPU more than 96%.

Can any one give some suggestions ...

surya
5 REPLIES 5
MANOJ SRIVASTAVA
Honored Contributor

Re: CPU Bottleneck

Hi


Possibly the application that you are running is a 32 bit one , typically that will not be mutlithreaded and ti will grab one cpu only , so you will find that one of the cpus's will be high where as the others are low , incase you have multithreaded app then you can posibly distribute the load etc.


Manoj Srivastava
Bill Hassell
Honored Contributor

Re: CPU Bottleneck

If you are only running one program (and it is not multi-threaded) then only one CPU will ever be used. If you run a second or third copy of the program (assuming it makes sense to do so) then the other copies will run in the other CPUs. Without special design in the program (called threading), there is no way to spread out the processing to multiple CPUs.


Bill Hassell, sysadmin
Michael Tully
Honored Contributor

Re: CPU Bottleneck

Seems to me you have either a runaway process (a process that has lost it's parent) or a single program that is not very efficient.
My guess is that it is the former, and maybe needs to be killed. If you are unsure what it is paste a copy of your 'top' output. An easy way is to do a 'top -f'
Anyone for a Mutiny ?
Timo Ruiter
Advisor

Re: CPU Bottleneck

Hi Surya,

In the output of top you should see the CPU number each process runs on, and, since there are many processes running by default, you should see all CPU-numbers in the output.
If not, something is seriously wrong: one or more CPU's are not functioning...

Regards,
Timo
Confucius say: he who runs through forrest in straight line will hit tree
Todd Larchuk
Advisor

Re: CPU Bottleneck

You can think about the CPUs as if they were automobiles. If you own 4 automobiles and you need to drive to work, how many automobiles will be busy and how many will be idle? One will be busy and 3 will be idle. If you and your spouse both drive to work, then 2 will be busy and 2 will be idle. If you have children that drive, then you might be able to get up to all 4 busy. You can consider the children as child processes or as threads of the one family process.

In any case, only one person can drive one automobile at a time. It is the same with processes (or kernel level threads) and CPUs.