1833965 Members
1851 Online
110063 Solutions
New Discussion

Re: maxuprc

 
SOLVED
Go to solution
Charlie Rubeor
Frequent Advisor

maxuprc

Two quick questions concerning maxuprc.

What is the best way to determine if I am bumping up against this limit? The user processes are receiving the "No more processes" and Fork errors, but I would sleep easier if I could verify that maxuprc is the problem.

If it is the problem, what are the possible problems with changing maxuprc from 75 to 150? The value of nproc is 12020 and "sar -v" shows only 1200 or so processes.
10 REPLIES 10
Steven E. Protter
Exalted Contributor
Solution

Re: maxuprc

When you have a problem do a ps -ef | grep | wc -l

This number will be your maxuprc or one or two higher than your setting. I don't know why you can exceed it, but don't worry about that.

IF this is the case bump up maxuprc

This is the maximum number of processes allowed for any single user. Large applications with lots of sessions sometimes force us to raise this from the default which is 75 for HP-UX 11i v1.

Let me know if you need help modifying the kernel parameter.

This will require a system boot to implement.

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
Pete Randall
Outstanding Contributor

Re: maxuprc

You can tell if you're bumping up against nproc by checking Glance's System Tables Report. If nproc is not an issue, then it's got to be maxuprc.

Raising maxuproc will have minimal impact on your system - you probably won't notice anything other than happier users.


Pete

Pete
Robert Dukes
Advisor

Re: maxuprc

Charlie,

What a coincidence you raise this about the kernel parameter maxuprc, I was just about to post an thread asking exactly the same question!

Just an additional items to your question, I need to potentially increase maxuprc to 500, will this have any other impact on the OS ?

Thanks in advance for any help on this.
Pete Randall
Outstanding Contributor

Re: maxuprc

Robert,

Even a value of 500 will be virtually un-noticeable. It just takes a bit more memory to hold the additional table space in the kernel.


Pete

Pete
Kim_18
Advisor

Re: maxuprc

Increasing to 500 should not hurt your system. Ours is at 4395 because we run so many oracle instances.
Steve Steel
Honored Contributor

Re: maxuprc

Hi


maxuprc or nproc are the problem

If you have single usernames like oracle using a lot of processes then maxuprc

If you have a lot of users using a few processes then nproc

run this

ps -ef > /tmp/countproc
/usr/sbin/kmtune -q nproc
/usr/sbin/kmtune -q maxuprc
echo Total processes $(cat /tmp/countproc|tail -n +2|wc -l)
for usrs in $(who|cut -f1 -d" "|sort -u)
do
echo $usrs"| processes "$(grep -c $usrs /tmp/countproc)
done
/bin/rm /tmp/countproc

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Bill Hassell
Honored Contributor

Re: maxuprc

maxuprc has no impact on the kernel since it is a limit, not a table size. You can change it to ten thousand if you want. It's purpose is to prevent experimental (a nice word for bad code) programs and scripts from starting thousands of processes and filling up the process table (nproc) so that even root cannot login.

NOTE: maxuprc applies to each user no matter how many times they login. If maxuprc is 30 and one user decides to login a dozen times with an average of 3 processes per login, then the 12th login will fail because this user already owns 30 processes. But don';t forget that Oracle, java or other specialized applications run under a single user so maxuprc may need to be 500 or even 2000 depending on how many porcesses are running at the same time owned by a single user. For a given user (that is having a problem), just run ps -u as in:

ps -u user123

and you'll see all the processes for that user. To see the hierarchy of who started who:

UNIX95= ps -Hfu user12


Bill Hassell, sysadmin
Charlie Rubeor
Frequent Advisor

Re: maxuprc

Does changing maxuprc require a kernel rebuild? I know that changing nproc (via maxusers) requires a reboot, but I thought that maxuprc did not.

I was using ps -u | wc -l to monitor the number of processes per user. If a user logins multiple times, do they get multiple maxuprcs?
Charlie Rubeor
Frequent Advisor

Re: maxuprc

Bill

That's impressive, answering the questions before I posted them!

Many thanks.
Charlie Rubeor
Frequent Advisor

Re: maxuprc

I changed maxuprc from 75 to 200, with no negative impact on current users.