nkthread(5) nkthread(5)
Tunable Kernel Parameters
NAME [Toc] [Back]
nkthread - limits the number of threads allowed to run simultaneously
VALUES [Toc] [Back]
Failsafe
8416
Default [Toc] [Back]
((nproc*2)+16) or 8416
Allowed values [Toc] [Back]
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 [Toc] [Back]
Unless there are heavily threaded applications on the system, the
default formula is adequate if nproc is tuned correctly.
DESCRIPTION [Toc] [Back]
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 calling 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 [Toc] [Back]
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.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: Sep 2004
nkthread(5) nkthread(5)
Tunable Kernel Parameters
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 [Toc] [Back]
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 parameter 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 the kernel software being
installed. For information about optional kernel software that was
factory installed on your system, see HP-UX Release Notes at
http://docs.hp.com.
AUTHOR [Toc] [Back]
nkthread was developed by HP.
SEE ALSO [Toc] [Back]
max_thread_proc(5), nproc(5).
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: Sep 2004 [ Back ] |