General
cancel
Showing results for 
Search instead for 
Did you mean: 

Running a process as root vs non-root... memory and kernel params differences

EEESEC
Frequent Advisor

Running a process as root vs non-root... memory and kernel params differences

Have two general questions regarding HP-UX kernel parameters and memory usage...

First, do some of the kernel params not apply to root or processes owned by root? I recently ran into the "can not fork ... to many processes" error and had to up maxuprc kernel param.  However this doesn't seem to be enforced on root.  Can someone confirm this either way?

Also, does HP-UX handle memory differently for processes owned by root as opposed to having it owned by a non-root account?  I've noticed that running the same process under a normal user account as opposed to root causes more memory utilization... any ideas what would cause that?

 

Thanks.

2 REPLIES
Steven E. Protter
Exalted Contributor

Re: Running a process as root vs non-root... memory and kernel params differences

Shalom,

Memory is handled the same way. Sometimes the application works differently. If the application is started by root, shared memory areas are owned by root. Non root users can't access them. This messes up Oracle pretty good.

Starting an application with root is a security hazard. It permits buffer overflow and other exploits to potentially gain root access. This is serious.

There may be exceptions, but Kernel parameters apply to root same as any other user. Only difference is root can change the kernel parameter on the fly if needed (in most cases. see kctune output).

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
Patrick Wallek
Honored Contributor

Re: Running a process as root vs non-root... memory and kernel params differences

The maxuprc kernel parameter is the maximum number of process per user.  So if usera  started too many process then that user could get the "can not fork" error.  However, if other users have not started the same number of processes then they will not get the error.

 

The other piece of the process usage picture is the nproc kernel parameter.  nproc is the TOTAL number of allowed process system wide.

 

On one the system I have access to, the parameters are:

maxuprc - 75
nproc - 2048

So, any one user can start a max of 75 processes and there can a max of 2048 processes system wide.