1834814 Members
2561 Online
110070 Solutions
New Discussion

Kernel parameter nproc

 
SOLVED
Go to solution
MarkSyder
Honored Contributor

Kernel parameter nproc

Hi everybody.

I'm comparing kernel parameters on two systems to try to make them consistent. I'm checking the parameters that are different on HP's website so I have an idea which is the correct value. The following contradictory statements come from
http://docs.hp.com/en/B3921-90010/nproc.5.html

"nproc must be greater than nkthread + 100"

"nkthread must be strictly greater than nproc"

Which is correct?

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
12 REPLIES 12
Ravi_8
Honored Contributor
Solution

Re: Kernel parameter nproc

Hi,

nproc must be greater than nkthread + 100
never give up
MarkSyder
Honored Contributor

Re: Kernel parameter nproc

Thanks Ravi.

To keep Pete Randall happy, I won't close the thread! But I don't propose to give any more points unless someone has something useful to add.

Mark
The triumph of evil requires only that good men do nothing
harry d brown jr
Honored Contributor

Re: Kernel parameter nproc


Looks like some bad documentation.

nkthread must be > nproc

This is the formula I have (default for 11.11):

nkthread = (((NPROC*7)/4)+16)

live free or die
harry d brown jr
Live Free or Die
Eric Antunes
Honored Contributor

Re: Kernel parameter nproc

Hi Mark,

I have the following formula for nkthread: (((NPROC*7)/4)+16)

Kindest Regards,

Eric Antunes
Each and every day is a good day to learn.
MarkSyder
Honored Contributor

Re: Kernel parameter nproc

I'm glad I kept the thread open!

Before I award any more points, can someone from HP please give a definitive answer?

Mark
The triumph of evil requires only that good men do nothing
Ravi_8
Honored Contributor

Re: Kernel parameter nproc

Hi

sorry mark!!!
I have 75 HP servers, i checked in about 8 servers.
In all servers nkthread value is more than nproc.

nkthread value should be more to handle number of process(nproc) specified
never give up
harry d brown jr
Honored Contributor

Re: Kernel parameter nproc

sam > kernel configuration > configurable parameters > help:

nkthread
Specify the maximum number of threads that all processes combined can run, system-wide, at any given time.
Acceptable Values:

Minimum: 50
Maximum: 4194304
Default: (nproc*2)+16

Specify integer or formula value. For more information, see Specifying Parameter Values.
Description
Processes that use threads for improved performance create multiple copies of certain portions of their process space, which requires memory space for thread storage as
well as processor and system overhead related to managing the threads. On systems running large threaded applications, a large number of threads may be required. The
kernel parameter max_thread_proc limits the number of threads that a single process can create, but there may be other threaded applications on the system that also use
a large number of threads or they may have more modest requirements.

nkthread limits the combined total number of threads that can be running on the system at any given time from all processes on the system. This value protects the system
against being overwhelmed by a large number of threads that exceeds normal, reasonable operation. It protects the system against overload if multiple large applications are
running, and also protects the system from users who might maliciously attempt to sabotage system operation by launching a large number of threaded programs, causing
resources to become unavailable for normal system needs.

The default value allows an average of two threads per process plus an additional system allowance. If you need to use a larger value:

* Determine the total number of threads required by each threaded application on the system; especially any large applications.

* Determine how many and which of these will be running simultaneously at any given time.

* Add these together and combine with a reasonable allowance for other users or processes that might run occasionally using threads (nproc*2 might be a useful
number).

* Select a value for nkthread that is large enough to accommodate the total, but not so large that it compromises system integrity.

On large systems with many threaded applications running simultaneously, some experimentation may be required while using system process-monitoring tools and
programs.

live free or die
harry d brown jr
Live Free or Die
Eric Antunes
Honored Contributor

Re: Kernel parameter nproc

Indeed SAM lets you set nkthread (I didn't try to process the kernel with this situation...) with a lower value than nproc but I think it is not a good procedure to do that since a process can have more than one thread...

Eric Antunes
Each and every day is a good day to learn.
Don Morris_1
Honored Contributor

Re: Kernel parameter nproc

I'm not part of Process Management -- but I do know this... every process on the system *requires* at least one kernel thread. Kernel threads are also consumed for other purposes. Logic clearly dictates that nproc must be less than or equal to (preferably less than) nkthread, or your setting of nproc becomes meaningless (since nproc > nkthread is still realistically limited by nkthread... you won't be able to start a new process without a kernel thread).
MarkSyder
Honored Contributor

Re: Kernel parameter nproc

Hi everybody.

Thanks for the answers. I can't find the SAM help page that Harry referred to, but I did find the same information in Marty Poniatowski's book. Ravi - please excuse the 0 points - that's to compensate for having given you 10 points for what turned out to be an incorrect answer!

I've learnt a lot from this thread - I think the most important thing I've learnt is not to close threads! I've closed a thread for the last time.

No more points on this thread unless someone adds something new and relevant.

Mark
The triumph of evil requires only that good men do nothing
Marlou Everson
Trusted Contributor

Re: Kernel parameter nproc

To find the help for nkthreads in the character-base SAM, you can select/highlight nkthreads in the Kernel Configuration screen. Then do "Help on Context" (F1).

Marlou
MarkSyder
Honored Contributor

Re: Kernel parameter nproc

Hi Marlou.

That answer was worth an extra 10 points!

I've had an email from HP confirming that the document is incorrect and will be corrected on its next release. Admirably prompt service.

Mark
The triumph of evil requires only that good men do nothing