Operating System - HP-UX
1834596 Members
3670 Online
110069 Solutions
New Discussion

Re: Maximum thread limit on HP-UX 10.20

 
SOLVED
Go to solution
David Schumacher
Occasional Contributor

Maximum thread limit on HP-UX 10.20

Is there a defined limit to the number of threads that a single process can create
(using pthread_create())?
3 REPLIES 3
T G Manikandan
Honored Contributor
Solution

Re: Maximum thread limit on HP-UX 10.20

Hello,

Minimum
64
Maximum
30000
Default
64
check the link
http://docs.hp.com//hpux/onlinedocs/os/KCparam.MaxThreadsPerProcess.html
Carsten Krege
Honored Contributor

Re: Maximum thread limit on HP-UX 10.20

The following is from the SAM help pages.

Carsten

max_thread_proc
Specify the maximum number of threads a single process is allowed
to have.
Acceptable Values:

Minimum: 64
Maximum: 30000
Default: 64

Specify integer value. For more information, see Specifying
Parameter Values.
Description
max_thread_proc limits the number of threads a single process is
allowed to create. This protects the system from excessive use of
system resources if a run-away process creates more threads than it
should in normal operation. The value assigned to this parameter is
the limit value assigned to the limit variables PTHREAD_THREADS_MAX
and _SC_THREAD_THREADS_MAX defined in
/usr/include/limits.h.

When a process is broken into multiple threads, certain portions of
the process space are replicated for each thread, requiring
additional memory and other system resources. If a run-away
process creates too many processes, or if a user is attacking the
system by intentionally creating a large number of threads, system
performance can be seriously degraded or other malfunctions can
be introduced.

Selecting a value for max_thread_proc should be based on
evaluating the most complex threaded applications the system will be
running and determine how many threads will be required or created
by such applications under worst-case normal use. The value
should be at least that large but not enough larger that it could
compromise other system needs if something goes wrong.
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Deepak Extross
Honored Contributor

Re: Maximum thread limit on HP-UX 10.20

getconf THREAD_THREADS_MAX