Operating System - HP-UX
1745786 Members
3949 Online
108722 Solutions
New Discussion юеВ

Spawning more than default thread from a c++ program in hpux parisc

 
rakeshcs123
Advisor

Spawning more than default thread from a c++ program in hpux parisc

Hi,
I am writing a multi threaded program and run it in hpux PARISC 11.23 machine. I see that there is a limitation of spawning 64 threads by default in a process in PARISC but we dont have such limitation in HPUX Itanium where i can even spawn 200 threads from one process without any problem. But when i run the same program compiled on hpux parisc on hpux itanium then i am not able to spawn more than 64 threads (this run under HP ARIES32 emulation).
Can someone help me to understand why is this behavior and how can i overcome this.

Note: I am compiling my program using aCC compiler, so if any compile time flag can help here please do let me know
Thanks for the help in advance.

Regards,
Rakesh
5 REPLIES 5
Horia Chirculescu
Honored Contributor

Re: Spawning more than default thread from a c++ program in hpux parisc

Hello,

PA-RISC processors do not implement symmetric multi-threading (SMT).

You would get get the same number of threads of execution as your number of cores enabled on your PA-RISC server.

So 64 cores, would let you run only 64 threads.

Horia.
Best regards from Romania,
Horia.
rakeshcs123
Advisor

Re: Spawning more than default thread from a c++ program in hpux parisc

Thanks for the reply.
but i see that there is certain flags that allows us to change the number of threads per process in PA-RISC as well. For example
/usr/sbin/kctune -q max_thread_proc
above command tells the maximum number of threads per process allowed.
which i can set to my required number using below command
/usr/sbin/kctune -s max_thread_proc=$REQUIRED_NUMBER_OF_THREADS

but in hpux itanium i already have set this to high value which works for hpux itanium compiled binaries but is not working for hpux parisc compiled binaries

So if someone can shed some light on how to enable more threads per process on for hpux parisc compiled binaries on hpux itanium then that will help me a lot.

Thanks for the help in advance.

Regards,
Rakesh
Laurent Menase
Honored Contributor

Re: Spawning more than default thread from a c++ program in hpux parisc

on PA system kctune max_thread_proc limit the number of thread/process.... it can be more than 64

over ARIES if you have patch PHCO_36445 you have options documented to increase the number of threads

A PA-RISC application can create a maximum of 85 threads under 32-bit
ARIES and 438 threads under 64-bit ARIES with the default values of
ARIES options and the kernel tunable parameters, pa_maxssiz_32bit and
pa_maxssiz_64bit.

Make sure that the kernel tunable parameter max_thread_proc value is
sufficiently large to create the required number of threads.

Increase the value of ARIES option -heap_ssz if your application
requires more number of threads than allowed by default under ARIES.

NOTE: The free memory in AMA is not automatically used for application
stack or ARIES heap. Appropriate ARIES option must be specified to
change the size of particular memory area in AMA.
Dennis Handly
Acclaimed Contributor

Re: Spawning more than default thread from a c++ program in hpux parisc

>I am compiling my program using aCC compiler, so if any compile time flag

There is only -mt.
Any reason you are using Aries rather than recompiling on Integrity?
rakeshcs123
Advisor

Re: Spawning more than default thread from a c++ program in hpux parisc

Thanks everybody for providing input on this.
I was able to create multiple threads after increasing the heap size of the ARIES32 using parameter -heap_ssz in the resource file, which can be done only after increasing the value of kernel tunable parameter pa_maxssiz_32bit.

please go through link http://docs.hp.com/en/B2355-60105/Aries.5.html for more information.

Regards,
Rakesh