max_thread_proc
max_thread_proc specifies the maximum number of threads a
single process is allowed to create.
64
30000
64
Specify integer value. For more information, see Specifying Parameter Values.
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.