delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/08/28/04:36:37

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB08F386F47D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1598603758;
bh=DkYeKKyqr8m4QK7PzwgpZfXt9FMeI0+Cf18Gw/9xt5Q=;
h=Date:From:To:Subject:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
Reply-To:From;
b=FzWHajIAKIu5oXzlSH3jHgkU1d/jbMIfZNyEb9b2PXiaKYhkueEps6x453fdhOmMI
5+VBPy471GE05/ZJBuz+LBn89u0o8CDxa9hhVMF5U2iW7oKbkzjPEc1yhtC8yNsSL/
fzlJipwpalESlkS+VBzjEAAHprM9OYQzj50svax8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 67C85386F433
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=cygwin.com
Authentication-Results: sourceware.org;
spf=fail smtp.mailfrom=corinna-cygwin AT cygwin DOT com
Date: Fri, 28 Aug 2020 10:35:51 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Sv: Limit for number of child processes
Message-ID: <20200828083551.GF3272@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <000401d67ba0$8b1f33b0$a15d9b10$@gmail.com>
<20200826175724 DOT GQ3272 AT calimero DOT vinschen DOT de>
<000701d67c6c$10bcf720$3236e560$@gmail.com>
<6d698a32-06bb-a47b-58e6-ceeecca722c9 AT cornell DOT edu>
MIME-Version: 1.0
In-Reply-To: <6d698a32-06bb-a47b-58e6-ceeecca722c9@cornell.edu>
X-Provags-ID: V03:K1:1R38VzyC8XW4oiyqklcNvbizoBBM+t/Pz3F/IMV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KpbpNuhe5sqcSb9Un2SMUKVj6H1pmeWT/f6U9EcXAHu3wEjXP3Y+xgFSjcAk3bH26
R9lQGGYY4DFqfUCgCSbQ==
X-Spam-Status: No, score=-99.8 required=5.0 tests=BAYES_00,
GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On Aug 27 21:42, Ken Brown via Cygwin wrote:
> On 8/27/2020 8:17 AM, Kristian Ivarsson via Cygwin wrote:
> > Hi Corinna
> > 
> > > > Dear cygwin folks
> > > > 
> > > > It seems like there's a limit of the number of possible child
> > > > processes defined to 256 with 'NPROCS' in //winsup/cygwin/child_info.h
> > > > used in 'cprocs' in //winsup/cygwin/sigproc.cc
> > > > 
> > > > 256 is quite few possible children in an enterprise environment and
> > > > perhaps the limit should be limited by the physical resources or
> > > possibly Windows ?
> > > 
> > > The info has to be kept available in the process itself so we need this
> > > array of NPROCS * sizeof (pinfo).
> > > 
> > > Of course, there's no reason to use a static array, the code could just as
> > > well use a dynamically allocated array or a linked list.  It's just not
> > > the way it is right now and would need a patch or rewrite.
> > > 
> > > As for the static array, sizeof pinfo is 64, so the current size of the
> > > array is just 16K.  We could easily bump it to 64K with NPROCS raised to
> > > 1024 for the next Cygwin release, at least on 64 bit.
> > > I don't think we should raise this limit for 32 bit Cygwin, which is kind
> > > of EOL anyway, given the massive restrictions.
> > 
> > I don't know the exact purpose of this and how the cprocs is used, but I'd
> > prefer something totally dynamic 7 days out of 7 or otherwise another limit
> > would just bite you in the ass some other day instead ;-)
> > 
> > A linked list could be used if you wanna optimize (dynamic) memory usage but
> > an (amortized) array would probably provide faster linear search but I guess
> > simplicity of the code and external functionality is the most important
> > demands for this choice
> 
> Any change here (aside from just increasing NPROCS) would have to be done
> with care to avoid a performance hit.  I looked at the history of changes to
> sigproc.cc, and I found commit 4ce15a49 in 2001 in which a static array
> something like cprocs was replaced by a dynamically allocated buffer in
> order to save DLL space.  This was reverted 3 days later (commit e2ea684e)
> because of performance issues.

Yup, that's one of the problems to keep in mind.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019