1832224 Members
2518 Online
110041 Solutions
New Discussion

Re: CPU not switching

 
SOLVED
Go to solution
V. V. Ravi Kumar_1
Respected Contributor

CPU not switching

hi all,

we have hp-ux 11.00 on L1000 machine. it has 2 processors.

when i observe through glance plus, the processes which are running on TOPEND (middleware) are always using only one CPU. CPU switching is not happennig.

what could be the reason?

suggest me.

thanks in advance
ravi


Never Say No
10 REPLIES 10
Ceesjan van Hattum
Esteemed Contributor

Re: CPU not switching

What does
sar -M 3 | cut -b9-80
tells you ?
--CJ
V. V. Ravi Kumar_1
Respected Contributor

Re: CPU not switching

hi CJ,

this is the output of
sar -M 3 | cut -b9-80

tst B.11.00 U 9000/800 04/24/02

cpu %usr %sys %wio %idle
0 0 0 2 98
1 0 0 3 96
system 0 0 3 97
---------
regds
ravi
Never Say No
Anthony deRito
Respected Contributor

Re: CPU not switching

Run the command:

#sar -M 2 300

while you know there is activity on the system to verify that your observation is correct.
MANOJ SRIVASTAVA
Honored Contributor

Re: CPU not switching

Hi Ravi Kumar

Do a top , that will report the CPU activity , in all the porbability I think your application is a 32 BIT one and is not multithreaded to use the multi CPU loading . So you would see only one cpu under load.



Manoj Srivastava
V. V. Ravi Kumar_1
Respected Contributor

Re: CPU not switching

hi again,

not all the processes are running on one CPU.
Only processes which uses a middleware (TOPEND) are running on one CPU

regds
ravi
Never Say No
Anthony deRito
Respected Contributor

Re: CPU not switching

The kernel does have a tendency to run a process on a single processor for the life of the process however, load balancing almost always overrides this so that throughput can be optimized. There are ways to "force" processor affinity. I do not know how to do this but this link offors some insight:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xad97663ce855d511abcd0090277a778c,00.html

I wonder if TOPEND incorporates this "feature". Have you called the vendor?

Tony

Sridhar Bhaskarla
Honored Contributor

Re: CPU not switching

Hi Ravi,

Is it that this process is always running on one particular CPU? like always on CPU 0?. If that is the case, your vendor may be using mpctl() calls to use processor affinity. Else, it may a single threaded process and no one can help it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Juan Manuel López
Valued Contributor
Solution

Re: CPU not switching

You can try to see if there are all your CPU activated:
Use GSP ( type control B ) to see your CPu situation.
There is an option to activate your CPU.
Maybe this is your problem...

I hope this help you.

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
Steven Hargus
Advisor

Re: CPU not switching

We've seen this issue with a different third-party product (8-way N-class, only one CPU doing all the work). It turns out it's caused by the way threading is handled...

If your application uses DCE threads (enabled on HP-UX 11.0 by loading the package off the application CDs), all the threads are handled as a single process, and thus served by a single CPU.

If your application uses Posix threads, threads are handled within the kernel and are thus able to be scheduled by the kernel scheduler, who can then distribute the threads among the CPUs.

The DCE threads support was supposed to go away at 11.00, but there are so many applications written that still support them, so HP has the package to enable them. Unfortunately, the threads are handled as a subset of the parent user process and, thus, don't go through the kernel scheduler. Whatever CPU the parent process happens to be on is the CPU that gets the entire load of the application.

Unfortunately, the only real fix is to rewrite the application...

pap
Respected Contributor

Re: CPU not switching



This member has assigned points to 5 of 44 responses to his/her questions.


"Winners don't do different things , they do things differently"