tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: CHILD_MAX & osf/1 v3.0
@ 1995-06-23 15:46 haymanR
  0 siblings, 0 replies; only message in thread
From: haymanR @ 1995-06-23 15:46 UTC (permalink / raw)
  To: tru64-unix-managers


CHILD_MAX is different under v3.0 and v3.2, and here's what I found out:

From: Jon Reeves <reeves@zk3.dec.com>

|>I just looked at the logs: it was changed in base level 2 of V3.2 (last
|>Sept. 12).  If you need the actual value in V3.0, do what sysconf now
|>does: call getsysinfo(GSI_MAX_UPROCS); if it fails, then use CHILD_MAX.
|>
|>The value of _POSIX_CHILD_MAX is fixed by the POSIX standard at a
|>constant 6, but you probably already knew that.


From: "Jeffrey C. Ollie" <jeffo@noc.netins.net>

1st response:
|>Put:
|>
|>proc:
|>        max-proc-per-user = 256
|>
|>in /etc/sysconfigtab and reboot.

2nd response:
|>Have you actually tried forking off more than CHILD_MAX processes?  Since the
|>man page says that CHILD_MAX is a *minimum*, you should be able to fork off
|>at least that many processes (possibly more), or at least until you hit the
|>max-proc-per-user limit. 
|>
|>With this test program:
|>
|>#include <stdlib.h>
|>#include <stdio.h>
|>#include <unistd.h>
|>#include <sys/types.h>
|>
|>int main()
|>{
|>  int count;
|>  pid_t pid;
|>
|>  printf("%d\n", sysconf(_SC_CHILD_MAX))
|>
|>  count = 0;
|>  while(1)
|>  {
|>    pid = fork();
|>    if (pid == -1)
|>    {
|>      printf("%d\n", count);
|>      exit(0);
|>    }
|>    if (pid == 0)
|>    {
|>      sleep(5);
|>      exit(0);
|>    }
|>    count = count + 1;
|>  }
|>}
|>
|>and max-proc-per-user = 128, I was able to fork off 125 other processes (2
|>shells and the test program account for the other three) when sysconf
|>reported that _SC_CHILD_MAX was 64.  This is on an OSF/1 3.0 system. 
|>
|>When tried on an OSF/1 3.2A system with max-proc-per-user=64, I was only able
|>to fork off 60 processes (2 shells, nn and the test program make 64). However
|>_SC_CHILD_MAX reported 1024.  It would seem here that the value of the
|>max-proc-per-user parameter is more important than the value of
|>_SC_CHILD_MAX. 


Keith Lewis <keith@mukluk.cc.monash.edu.au>

|>	Create a file called /etc/proc.stanza containing:
|>
|>proc:
|>        max-proc-per-user = 256
|>
|>	Then type `sysconfigdb -f /etc/proc.stanza proc'
|>
|>	Then reboot.


My original posting was:

> Greetings - 
> 
> All of my attempts to raise CHILD_MAX (visible via getconf CHILD_MAX) from
> 64 have been unsuccessful.  I've modified <sys/syslimits.h> altering the 64
> and making it 256, I've modified param.c, I've raised maxuprc in 
> /sys/conf/<SYSNAME>, etc... after each modification attempt I've rebuilt 
> the kernel and moved the new kernel to / and rebooted.  Still 
> getconf CHILD_MAX (and _POSIX_CHILD_MAX) remain unchanged at 64 and 6 
> respectively.  Any other ideas?  Is this a v3.0 limitation?
> 
> TIA  Summary pending responses.


Randy M. Hayman
haymanr@icefog.alaska.edu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-06-23 15:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-06-23 15:46 SUMMARY: CHILD_MAX & osf/1 v3.0 haymanR

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox