nkthread.5 (2010 09)
n
nkthread(5) nkthread(5)
(Tunable Kernel Parameters)
NAME
nkthread - limits the number of threads allowed to run simultaneously
VALUES
Failsafe
8416
Default
((nproc*2)+16)
or 8416
Allowed values
200 - 250,000
nkthread must be greater than nproc + 100
.
nkthread must be greater than max_thread_proc
.
This may be set higher, but more will not be used.
Recommended values
Unless there are heavily threaded applications on the system, the default formula is adequate if
nproc is
tuned correctly.
DESCRIPTION
The
nkthread tunable controls the absolute number of threads allowed on a system at any given time.
Increasing it will allow more threads, and lowering it will restrict the number of threads.
It can be determined that
nkthread is too low when the kthread: table is full message is seen
in the message buffer. The message can be read via dmesg or syslog. This message indicates that an
application was unable to create a thread. Setting nkthread too low can cause application failures due
to an inability to create new threads or fork new processes.
It can be determined how many threads have been used simultaneously prior to the above message by cal-
ling
pstat_dynamic and examining the
psd_numkthreadsallocd. This field indicates the "high
water" mark of the number of threads that have been simultaneously used.
Who Is Expected to Change This Tunable?
Anyone expecting to run large numbers of threads.
Restrictions on Changing
None. This tunable is dynamic.
When Should the Value of This Tunable Be Raised?
This value should be increased, either directly or as a result of tuning
nproc, on most systems that are
running many threads or processes.
What are the Side Effects of Raising the Value?
None.
When Should the Value of This Tunable Be Lowered?
The value should be lowered only to limit the number of threads on the system, or when there is memory
pressure and the value of
nkthread is far above the expected usage.
What are the Side Effects of Lowering the Value?
Increased risk of application failure do to the inability to create new threads or fork new processes.
What Other Tunable Values Should Be Changed at the Same Time?
None.
WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its
meaning changed in future releases of HP-UX.
Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parame-
ter values. After installation, some tunable parameters may no longer be at the default or recommended
values. For information about the effects of installation on tunable values, consult the documentation for
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1