1829586 Members
2031 Online
109992 Solutions
New Discussion

multiprocessing

 
SOLVED
Go to solution
Asad Malik
Frequent Advisor

multiprocessing

Hi
Machine Hp9000, N class 4000, running HP-UX 11.0 has four CPUs. while monitoring performance we have noticed cpu0 is being overloaded(utilization 100% sometimes) while other three processor's utilization stays below 10% all the time. Any suggestions please.

Thanks
17 REPLIES 17
Kofi ARTHIABAH
Honored Contributor

Re: multiprocessing

Does the software you are running lend itself to multiprocessing? ie what are you running?
nothing wrong with me that a few lines of code cannot fix!
Andy Monks
Honored Contributor
Solution

Re: multiprocessing

Sounds like your application does a lot of network things. Try loading the patch PHNE_21433. This fixes problems where networking code only runs on processor 0.
Brian M. Fisher
Honored Contributor

Re: multiprocessing

Unless the running program is multi-threaded the most the process can do is use a total of 100% of a single cpu, it is unable to use 100% of all cpus. Can more processes be started?

Brian
<*(((>< er
Perception IS Reality
Andy Monks
Honored Contributor

Re: multiprocessing

Although Brian is right, unless it's a multithreaded app you can't use more than 100%, a patch will fix the problem of cpu 0 using 100% and the rest are basically idle (assuming your running more than 1 process in total!) which I'm sure you are.
Tim Malnati
Honored Contributor

Re: multiprocessing

Mosts applications are multiuser but not multitheaded. Typically a process that is a heavy cpu user will NOT always appear on the same cpu though. Your thought that something may be wrong is something I would question also. Maybe it's the network patch thing that Andy has mentioned or maybe it's something in the way an N class machine distributes processor load. In any event, if the patch does not correct the situation, I would certainly follow this situation up with a call to the Response Center. Maybe it's normal in this class box, but I doubt it.
Berlene Herren
Honored Contributor

Re: multiprocessing

Have you checked into using APA?


http://docs.hp.com/hpux/pdf/J4240-90005.pdf

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm
CHRIS_ANORUO
Honored Contributor

Re: multiprocessing

Tune CPU performance by using processor affinity, or improve priorities of processes with nice or rtprio.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Asad Malik
Frequent Advisor

Re: multiprocessing

we installed patch PHKL_21532, as recommended by HP but the problem remains.
Jason Luginbuhl
Frequent Advisor

Re: multiprocessing

It sure sounds like you could use a document that explains the multiprocessor environment and/or processor affinity. It looks like your application is coded in a way that makes it run on this one processor. For more information I encourage you to look over the following document which is available on the HP ITRC's Technical Knowledge Base:

UNX1030249 Control on which processor process runs in multi-processor system
"Unfortunately you can't out-program stupidity"
Bill Hassell
Honored Contributor

Re: multiprocessing

If there is just one process consuming 100% CPU (typical for a long numerical problems), then it would be expected that only one processor will be used. Use top to see if a single process is consuming most of the CPU cycles. Starting additional copies of the same program will cause the other CPUs to start using CPU power. Threading is a technique where parts of a single program can be executed at the same time on different processors (if available), but the program must be rewritten to allow for threading (very non-trival task).


Bill Hassell, sysadmin
Andy Monks
Honored Contributor

Re: multiprocessing

Asad,

Load PHNE_21433 like I said earlier. If you read the patch text it's a perfect match for your problem!
Andy Monks
Honored Contributor

Re: multiprocessing

Asad,

And to prove it's networking compile up and run this program. You'll see that you have perfect load balancing.

You MUST compile it with :-

cc +O1 cpuhog.c -o cpuhog

Optimization any higher will take out the loop (it doesn't do much really)
Asad Malik
Frequent Advisor

Re: multiprocessing

As a work-around for now, we found and are using a utility mpctl to move processes
off of CPU 0 and get them floating among CPUs again. It is working as load is being distributed on all 4 cpus.
Andy
we will read about the patch you have suggested and may be that is the answer.
Asad Malik
Frequent Advisor

Re: multiprocessing

As a work-around for now, we found and are using a utility mpctl to move processes
off of CPU 0 and get them floating among CPUs again. It is working as load is being distributed on all 4 cpus.
Andy
we will read about the patch you have suggested and may be that is the answer.
Andy Monks
Honored Contributor

Re: multiprocessing

Asad,

If it is the problem I think it is, then using processor affinity, you will probably either see in glance, that the processes are still moving (but coming back to the processor you tied them too), or your getting messages in dmesg saying things about threads being moved.

Try my test program if you get a chance too.
Asad Malik
Frequent Advisor

Re: multiprocessing

Andy
we have applied patch PHNE_21433 and all 4 cpu's are being utilized and the load is balanced. Thanks.
Andy Monks
Honored Contributor

Re: multiprocessing

Hi Asad,

Thanks for letting me know.