SUMMARY: CHILD_MAX & osf/1 v3.0

From: <haymanR_at_icefog.uacn.alaska.edu>
Date: Fri, 23 Jun 1995 07:46:37 -0800

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

From: Jon Reeves <reeves_at_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_at_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_at_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_at_icefog.alaska.edu
Received on Fri Jun 23 1995 - 18:28:29 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT