Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Tunable Kernel Parameters: HP-UX Release 11i > n

nkthread(5)

Tunable Kernel Parameters
» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

nkthread — limits the number of threads allowed to run simultaneously

VALUES

Failsafe

499

Default

(((nproc*7)/4)+16) or 499

Allowed values

50 - 250,000

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 to run simultaneously, and lowering it will restrict the number of threads that can run simultaneously.

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. The default value of this is extremely low, and so you may want it to be larger than the default.

Restrictions on Changing

Changes to this tunable take effect at the next reboot.

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?

There is a slight increase in memory usage (about 100 bytes per kthreads structure) whether or not the structure is used.

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?

ncallout should be strictly greater than nkthread. The default formula of ncallout will ensure this.

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.

AUTHOR

nkthread was developed by HP.

SEE ALSO

ncallout(5).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000-2002 Hewlett-Packard Development Company, L.P.