1830377 Members
2845 Online
110001 Solutions
New Discussion

CPU

 
RajuD
Frequent Advisor

CPU




Dear Gurus,

I have 2 cpu running in the server, please let me know to the load balance the work load for this cpu.

CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 1.65 96.6% 0.0% 0.0% 3.4% 0.0% 0.0% 0.0% 0.0%
1 1.11 14.5% 0.0% 2.0% 83.5% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 1.38 55.6% 0.0% 1.0% 43.4% 0.0% 0.0% 0.0% 0.0%

From the above output cpu 0 is consuming 97% load where as cpu 1 is consuming only 17%, please let me know how to balance the work for the cpu.
“Education is our passport to the future, for tomorrow belongs to those who prepare for it today.”
8 REPLIES 8
Ganesan R
Honored Contributor

Re: CPU

Hi,

I think you may need PRM (Processer Resource Manager) product to assign load balancing.
Best wishes,

Ganesh.
Jeeshan
Honored Contributor

Re: CPU

Cpu load balance ?

If you need to dedicate cpus exclusevly to a process(PID), you can use prset.

man prset

processor sets:

http://h20338.www2.hp.com/hpux11i/cache/324638-0-0-0-121.html
a warrior never quits
Matti_Kurkela
Honored Contributor

Re: CPU

If your server has only one program that generates most of the load, the uneven distribution of load to CPUs usually means that the program is non-threading, i.e. it can run on one CPU at a time only.

Such a program cannot get full benefit from multiple CPUs: of course it gets *some* benefit from the 2nd CPU because the application can fully use one CPU while the OS uses the other for managing I/O and any other housekeeping tasks it needs to run. But adding a 3rd or 4th CPU would probably not give any significant benefit.

If you can run 2 copies of your program on 2 different pieces of data, that would allow you to place a full load on both CPUs.

If your program cannot be used in this way, the only way to fix it would be to re-design and re-write the program to perform several actions in parallel, making it a threaded program.

MK
MK
Dennis Handly
Acclaimed Contributor

Re: CPU

>let me know how to balance the work for the CPU.

Why? Do you think this will wear out the chip? :-)
The only way to balance the load would be to make both at 100% by implementing threads or multiple processes and MK said.
RajuD
Frequent Advisor

Re: CPU

Hi Dannies,

Thanks for the reply, can you please brief in implementing threads, i think that has to take care internally by OS or by application program. please correct me.
“Education is our passport to the future, for tomorrow belongs to those who prepare for it today.”
Dennis Handly
Acclaimed Contributor

Re: CPU

>can you please brief in implementing threads, i think that has to take care internally by application program.

Yes, as MK said, the application must be rewritten, unless you can run multiple instances of it, without them interfering with each other.
RajuD
Frequent Advisor

Re: CPU

Thanks for the input.
“Education is our passport to the future, for tomorrow belongs to those who prepare for it today.”
Jeeshan
Honored Contributor

Re: CPU

before closing the thread, you have to assign points to the replier who gave valuable time for your problem.
a warrior never quits