Operating System - HP-UX
1834944 Members
2421 Online
110071 Solutions
New Discussion

multiprocessing load balance

 
Pedro Sousa
Honored Contributor

multiprocessing load balance

Hi people.

I have a system L2000, running java 1.3.1, with 2 CPUs.
CPU 0 has always between 2 and 4 times the load of CPU 1.

Do you have any idea that can help me to do some load balancing?

below is the output of top:
System: poru9011 Tue May 14 15:22:42 2002
Load averages: 2.11, 1.80, 2.02
127 processes: 96 sleeping, 31 running
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 4.17 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
1 0.04 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 2.11 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%

Memory: 1391088K (1352704K) real, 5232496K (5171652K) virtual, 239236K free Page# 1/4

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
0 ? 3692 root 152 20 30780K 52224K run 4:43 0.73 0.73 java
1 ? 2928 root 152 20 30780K 49832K run 5:26 0.53 0.53 java
0 ? 4061 root 152 20 43068K 59192K run 0:48 0.51 0.51 java
0 ? 3613 root 152 20 43068K 65568K run 4:53 0.47 0.47 java
0 ? 3748 root 152 20 43068K 62444K run 4:28 0.46 0.46 java
0 ? 6505 root 152 20 43068K 61896K run 2:25 0.45 0.45 java
1 ? 13758 root 152 20 43068K 62140K run 2:20 0.44 0.44 java
0 ? 1235 root 152 20 30780K 49052K run 4:40 0.44 0.44 java
0 ? 3720 root 152 20 30780K 50248K run 5:27 0.43 0.43 java

tia,
Pedro
8 REPLIES 8
Pedro Sousa
Honored Contributor

Re: multiprocessing load balance

I forgot to say that the system is running HPUX 11i
Sandip Ghosh
Honored Contributor

Re: multiprocessing load balance

Have you checked with Glance? I think the application has not been written properly for multi-threading. If it has benn written as mut-threaded operation , it would have shared the load between 2 CPU.

Sandip
Good Luck!!!
harry d brown jr
Honored Contributor

Re: multiprocessing load balance


You don't appear to be using threads for your java, is there a reason for this?

live free or die
harry
Live Free or Die
Pedro Sousa
Honored Contributor

Re: multiprocessing load balance

this system doesn't have a license for glance. And the trial one, has already expired.
John Bolene
Honored Contributor

Re: multiprocessing load balance

Curious, looks pretty balanced with no load.

Both processors are 100% idle.

It takes busy processors before HPUX will do anything with moving processes between processors.

If you are not having any performance problems, there is nothing to balance.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Bill Hassell
Honored Contributor

Re: multiprocessing load balance

HP-UX will assign processes to different processors when there is something to do. Since you have a lot of java programs, this will occur automatically. If the java code is in response to web queries, most likely none of the code will run for more than a few seconds so it will be hard to see two processes running at the same time on different processors.

To prove that HP-UX can indeed assign a busy process to the next available processor, try typing this in two different sessions:

while :
do
:
done

This is an endless loop which will use 100% of one CPU. Start another copy and it will run on the second processor. Use CTRL-C to terminate the shell loop.


Bill Hassell, sysadmin
Pedro Sousa
Honored Contributor

Re: multiprocessing load balance

Sorry guys, I've been out for a while...

Can you still help me ;)?

Harry, I can't tell you the the app is configured to use threads. But it seems to me it does.

John, I'm not having performance problems. though I would like to understand the LOAD diference between the processors.

Bill, good test. it worked fine. so, I assume the balancing is OK.

The main question is:
both CPUs show different LOADs, why?

many thanks for the previous answers.
harry d brown jr
Honored Contributor

Re: multiprocessing load balance


They will always show different loads unless you have two identical applications running, that start at the same time, and perform the same things at the same time.

Now, bing that you originally posted this in MAY, I'd suggest you first bring your system up to date with the latest patch bundles, then let us know what's going on.

BTW, you are not running a threaded java application. If you where, you wouldn't have a gillion java processes running.

live free or die
harry
Live Free or Die