Operating System - HP-UX
1837341 Members
3341 Online
110116 Solutions
New Discussion

Re: exceeding kernel max limit

 
Lai Nee Shyang_1
Frequent Advisor

exceeding kernel max limit

Hi There,

I think I've a rather silly question to ask. I've taken over a system which the previous administrator has configure some of the kernel parms that exceeded the max limit. Eg. nkthread = 57395, max_thread_proc =32768. The max_thread_proc max is 30,000. My question is what will the kernel parms for max_thread_proc be since it has exceeded it's limit?

Cheers

Lai
If it doesn't work, We'll make it work. If it works, We'll make it work better.
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: exceeding kernel max limit

Only silly question is the one you don't ask.

The answer is it depends. If you have some formula link between the two parameters, then it will be calculated when you change the parameter that the other is dependent on.

In a running system, you don't exceed paramters. If max_thread_proc=200 amd some process wants to go to 201, it fails and gets an error.

To check your formulas you can run the kmtune command or use sam kernel configurable parameters to see the formula relationships.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: exceeding kernel max limit

These particular values setup tables inside the kernel. If you need 200 thread processes but have tablespace for 32768, there is a lot of wated space in the kernel. It is always better to keep parameters reasonable (perhaps twice as lare as needed). Where a parameter is a formula *and* very large, it's better to replace the formula with a fixed value. The formulas are just guesses to get started.


Bill Hassell, sysadmin
Lai Nee Shyang_1
Frequent Advisor

Re: exceeding kernel max limit

Hi guys,

The max_thread_proc wasn't specified with a formula. I think the ex-administrator key in the value. I've a HP-UX kernel parms document that says the max value for max_thread_proc is 30000. Since this guy has put it exceedingly big, I'm kind of curious what the value will be in the kernel table, 30000 ?, 32768? or default 64?

Bill, U r right, I doubt I need 32768 for max_thread. I'm runing Iplanet, so far I observe the ns-httpd create abt 90-100 threads. But it is giving me "oserr=233, insufficient resources" problems.
U guys think 200-500 be a good figure ?

Cheers

Lai
If it doesn't work, We'll make it work. If it works, We'll make it work better.
Sridhar Bhaskarla
Honored Contributor

Re: exceeding kernel max limit

Hi Lai,

Answer to your question can only be answered by the vendor or the developer of the application. I believe the default value of 256 should be sufficient in most of the cases.

nkthread can be anything particularly if your 'nproc' usage is high. You can set it to a formula like nproc*3 to be on safer side. If you see messages like "kthread table full", then you would need to increase the parameter.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Bill Hassell
Honored Contributor

Re: exceeding kernel max limit

The oserr=233 message is very misleading. Most likely this is the industry standard errno value, a nomenclature used for decades in the Unix world. errno 233 is:

from /usr/include/sys/errno.h:
define ENOBUFS 233 /* No buffer space available */

from man 2 errno:
[ENOBUFS] No buffer space available. An operation on a socket was not performed because the system lacked sufficient buffer space.

This description won't help you very much because it is very likely a transient condition in the kernel (adding more RAM will not help). It is a networking condition, possibly associated with an accept() call. Proper programming technique would dictate a retry on the connection. Contact your application vendor for a patch.


Bill Hassell, sysadmin
Lai Nee Shyang_1
Frequent Advisor

Re: exceeding kernel max limit

Thanks Bill. I was really confused by this oserr msg. My apps folks point their fingers and toes at OS, claiming it is an OS problem and I had a hard time trying to prove otherwise.

Anyway, Thanks.


Lai
If it doesn't work, We'll make it work. If it works, We'll make it work better.