1846193 Members
3987 Online
110254 Solutions
New Discussion

Kernel Parameter

 
SOLVED
Go to solution
M.sureshkumar
Regular Advisor

Kernel Parameter

Hi,

We are running 2 Database's on one of our HP unix server.
Last two days back,i got the below error.

/etc/profile[31]: The fork function failed. Too many processes already exist.
/etc/profile[48]: The fork function failed. Too many processes already exist.
/etc/profile[83]: The fork function failed. Too many processes already exist.
.profile[11]: The fork function failed. Too many processes already exist.

One month back i had tuned Nfile size from 1227 to 2460.

Pls tell me , which kernel partameter can i tune to solve this?

Regards,
Sureshkumar.






.profile[13]: The fork function failed. Too many processes already exist.

15 REPLIES 15
Fabian Briseño
Esteemed Contributor

Re: Kernel Parameter

Hello.
What does the command (see below)
sar -v 4 4

Return?.
Knowledge is power.
M.sureshkumar
Regular Advisor

Re: Kernel Parameter

Hi

Pls find the Sar output.
10:51:09 text-sz ov proc-sz ov inod-sz ov file-sz ov
10:51:14 N/A N/A 211/452 0 674/674 0 1173/2464 0
10:51:19 N/A N/A 211/452 0 674/674 0 1173/2464 0
10:51:24 N/A N/A 213/452 0 674/674 0 1187/2464 0
10:51:29 N/A N/A 211/452 0 674/674 0 1179/2464 0

Regards,
Sureshkumar.
Fabian Briseño
Esteemed Contributor

Re: Kernel Parameter

Hello Sureshkumar

From that output I can see that the ninode parameter is full

ninode=Max Number of Open Inodes
maxuprc=Max Number of User Processes

Sureshkumar, Incrementing the ninode parameter means rebooting and i dont know if that will solve your problem.

incrementing the maxuprc did not rebbot my server I changed it just a few minutes ago, I have a 11.i unix server. It looks like a few users have to many proceses running so this could be the parameter your looking for, but again im not sure.

Please keep posting the results.
Knowledge is power.
Frank de Vries
Respected Contributor

Re: Kernel Parameter

Run

kmtune -l > xxx
vi xx
/ninode

you should see someting like this
Parameter: ninode
Value: 8192
Default: ((NPROC+16+MAXUSERS)+32+(2*NPTY))
Minimum: -
Module: -


It is better to up the parameter Maxusers,
then all related kernel parameters will be scaled proportionally.

It is often pointless to just increase one parameter alone.

So ninode is related to nproc and maxusers.
When you increase both by at lease half their value, you should be out
of trouble.

Rebuild the kernel and plan a boot.
Look before you leap
Frank de Vries
Respected Contributor

Re: Kernel Parameter

Run

kmtune -l > xxx
vi xx
/ninode

you should see someting like this
Parameter: ninode
Value: 8192
Default: ((NPROC+16+MAXUSERS)+32+(2*NPTY))
Minimum: -
Module: -


It is better to up the parameter Maxusers
and NPROC, then all related kernel parameters will be scaled proportionally.

It is often pointless to just increase one parameter alone.

So ninode is related to nproc and maxusers.
When you increase both by at lease half their value, you should be out
of trouble.

Rebuild the kernel and plan a boot.
Look before you leap
siva0123
Trusted Contributor
Solution

Re: Kernel Parameter

Suresh,
Your System has reached maximum value of nproc. Default value of nproc depends on maxusers and which in turn effect other parameters for hp-ux 11.11

# kmtune |grep -i maxusers

maxusers 32 - 32

nclist 612 - (100+16*MAXUSERS)

nfile 910 - (16*(NPROC+16+MAXUSERS)/10+32+2*(NPTY+NSTRPTY+NSTRTEL))

ninode 476 - ((NPROC+16+MAXUSERS)+32+(2*NPTY))

nproc 276 -

(20+8*MAXUSERS)


maxuprc



These are the parameters which you may need to tune.

Thanks,
siva
M.sureshkumar
Regular Advisor

Re: Kernel Parameter

Hi

What is mean by Dynamic and static in Kmtune output.

Output:

bufpages 0 0 Static N/A Number of Buffer Pages
chanq_hash_locks 256 256 Static N/A Channel Queue Spinlock Pool Size
core_addshmem_read 0 0 Dynamic N/A Boolean; If Set, Include Read-Protected Shared Memory Segments In Application Core File
core_addshmem_write 0 0 Dynamic N/A Boolean; If Set, Include Write-Protected Shared Memory


Regards,
Sureshkumar.
siva0123
Trusted Contributor

Re: Kernel Parameter

Suresh ,


Static means tuning of these parameters requires a reboot to take effect.

Dynamic means tuning those parameters doesnt need a reboot and they take effect immediatley.

Thanks,
siva
Bill Hassell
Honored Contributor

Re: Kernel Parameter

You wrote:

> .profile[11]: The fork function failed. Too many processes already exist.

The value of nproc and/or maxuprc is too low. To determine which parameter needs adjusting, look at syslog (ie, /var/adm/syslog/sysloog.log) to see if there is a message:

proc: table is full

If not, then the limit is maxuprc. This kernel parameter limits the number of processes that a single user can start at the same time. If you have a common login that several people use or a login which start many processes (like oracle), then maxuprc (typically 60 to 80) needs to be raised. maxuprc is dynamic so you can change it immediately with SAM and no reboot is necessary.

> One month back i had tuned Nfile size from 1227 to 2460.

This is not a very big change. At your next opportunity, change nproc to 5000.

Concerning ninode: do not interpret the sar -v output for ninode as a table size. ninode will *always* be reported as full after a few days but it is *NOT* full. Neither sar nor Glance will report the in-use inodes in the table. It simply reports the number of slots that are occupied -- most are reuasable. The formula for ninode is very wrong today and makes ninode far too large. It should only be about 2000. Values more than 5000 simply waste space in the kernel.


Bill Hassell, sysadmin
M.sureshkumar
Regular Advisor

Re: Kernel Parameter

Hi All,

we need to set the kenel parameter "maxuprc" value 3780.current maxuprc value is 446.

When i tried to set "maxuprc" equal to 3780, i got the beloe error.
============================================
Error:
One or more tunable parameter violates an interdependancy rule.
SAM expects the following expression(s)to be true:
maxuprc < (nproc-4)
maxuprc <= (nproc-4)
=============================================

How to set the "maxuprc" valu equal to 3780.
Pls guide me.
Current kernel values:
maxuprc - 446
nproc - 452
maxusers - 54
nfile - 2454

pls find the attached kmtune output.
Regards,
Sureshkumar.
Hein van den Heuvel
Honored Contributor

Re: Kernel Parameter


Well, the error message seems very explicit:

If you want to up maxuprc, then you must first increase NPROC.

Please read all other advice carefully (Frank, Siva,...)

hth,
Hein.
Patrick Wallek
Honored Contributor

Re: Kernel Parameter

If you want maxuprc to be 3780, then nproc needs to be at least 3784.

Since both parameters are so low, BOTH of them must be adjusted, which will definitely require a reboot.
M.sureshkumar
Regular Advisor

Re: Kernel Parameter

Hi,

If it is possible to change the nproc value dynamically, pls tell me.

Rgds,
Sureshkumar.
Patrick Wallek
Honored Contributor

Re: Kernel Parameter

It depends on your version of HP-UX.

If you are on HP-UX 11.11 (11i v1) or earlier then NO, you can NOT change nproc dynamically. On these versions it is a static parameter which requires that the kernel be rebuilt and the system rebooted. On 11.11 though, once nproc is set, the maxuprc parameter IS dynamic so it does NOT require a reboot to change it, at least as long as you follow the rules (maxuprc < nproc).

Now, if you happen to be on 11.23, then nproc IS a dynamic kernel parameter. So you can change it without having to reboot.

M.sureshkumar
Regular Advisor

Re: Kernel Parameter

Thanks

I will tune first "nproc" and next maxuprc.

Rgds

Sureshkumar.