Kbase 19020: Process Structure in Unix nproc
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  21/09/1999 |
|
Process Structure in Unix nproc
Title: Process Structure in Unix (specially for Solaris)
This Kbase is also valid for more platforms.
This Kbase is related to error:
SYSTEM ERROR: Too many subprocesses, cannot fork. Errno=<number>.
(358) O
KnowledgeBase number: 19020
Creation Date: August 10 1999
Modified Date: September 16 1999
Modified Date: September 21 1999
INTRODUCTION:
Each process has place in a slot in the System Process Table that
maintain a Process Structure.
Process structure ( 900 bytes size) contain all the information the
Kernel needs to manage the process.
The maximum size of SPT is related to physical memory (RAM) in the
system.
During startup the kernel sets the maxuser parameter to the number of
megabytes of memory installed on the system.
WHY YOU NEED TO KNOW THIS:
Knowledge of Unix related to Progress Performance, error 358 and good
Progress parameters definition.
PROCEDURAL APPROACH:
Formula:
max_nprocs = ( 10 + 16 * maxusers )
maxuprc = (max_nprocs - 5)
Where max_nprocs is the maximum number of process systemwide and
maxuprc is the maximum number of process a non-root user can have
occuping a process table slot a any point in time.
Use crash:
Login root
# /etc/crash
dumpfile = /dev/mem, namelist = /dev/ksyms, outfile = stdout
> od -d maxusers (type)
f0274dc4: 0000000189
> od -d max_nprocs (type)
f027126c: 0000003034
> od -d maxuprc (type)
f0270f28: 0000003029
> var (type)
v_buf: 100
v_call: 0
v_proc: 3034
v_nglobpris: 110
v_maxsyspri: 99
v_clist: 0
v_maxup: 3029
v_hbuf: 128
v_hmask: 127
v_pbuf: 0
v_sptmap: 0
v_maxpmem: 0
v_autoup: 30
v_bufhwm: 388
> q (exit)
Use sar:
$ sar -v 1
SunOS solaris1 5.6 Generic sun4m 08/06/99
13:02:27 proc-sz ov inod-sz ov file-sz ov lock-sz
13:02:28 84/3034 0 13166/13212 0 646/646 0 0/0
where 84 (proc-sz) column represent the current number of process and
3034 the maximum number of process.
When max_nprocs is set in /etc/system kernel impose a maximum value
In Solaris 2.4, 2.5, 2.5.1 and 2.6 the maximum value (MAXPID) is 30000
$ cd /usr/include/sys
$ cat param.h |grep MAXPID
#define MAXPID 30000 /* max process id */
dal August 10 1999