From owner-freebsd-current@FreeBSD.ORG Fri May 22 17:43:24 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5908FC0; Fri, 22 May 2015 17:43:24 +0000 (UTC) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4284D1508; Fri, 22 May 2015 17:43:24 +0000 (UTC) Received: by mail.lifanov.com (Postfix, from userid 58) id 761E61CADC0; Fri, 22 May 2015 13:43:23 -0400 (EDT) Received: from [127.0.0.1] (vnat004.nandomedia.com [166.108.31.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id CF5021CAB67; Fri, 22 May 2015 13:43:22 -0400 (EDT) Message-ID: <555F6AB9.1040401@mail.lifanov.com> Date: Fri, 22 May 2015 13:43:21 -0400 From: Nikolai Lifanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Mateusz Guzik , Allan Jude , freebsd-current@freebsd.org Subject: Re: xargs -P0 suport References: <555EA1C0.8010909@freebsd.org> <555F4BB9.1020001@mail.lifanov.com> <555F5A34.3090907@freebsd.org> <20150522172711.GA15102@dft-labs.eu> In-Reply-To: <20150522172711.GA15102@dft-labs.eu> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 17:43:24 -0000 On 05/22/15 13:27, Mateusz Guzik wrote: > On Fri, May 22, 2015 at 12:32:52PM -0400, Allan Jude wrote: >> There is some question about if nargs is a sane value for maxprocs in >> the negative case. 5000 does seem a bit high, and the behaviour can get >> wonky depending on the order you specify -P and -n together on the >> command line. >> >> Any suggestions? >> > > GNU xargs imposes no limit whatsoever, but it also supports reallocating > its process table, while our xargs allocates one upfront and does not > change it. > > I would say reading hard proc resource limit and using that as the limit > would do the job just fine. > GNU xargs uses MAX_INT for this limit. Our xargs performs much worse with it for a reason I haven't investigated. The 5000 number doesn't seem high and I have workflows that do '.... | xargs -n1 -P0 ...' spawning about this many jobs. - Nikolai Lifanov