From owner-freebsd-arch@FreeBSD.ORG Fri Nov 24 07:18:50 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C81C16A403; Fri, 24 Nov 2006 07:18:50 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 037BB43D49; Fri, 24 Nov 2006 07:18:09 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id C20665CED; Fri, 24 Nov 2006 10:18:48 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id A13F85CD8; Fri, 24 Nov 2006 10:18:48 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kAO7J1Iu038265; Fri, 24 Nov 2006 10:19:01 +0300 (MSK) (envelope-from ru) Date: Fri, 24 Nov 2006 10:19:01 +0300 From: Ruslan Ermilov To: Rink Springer Message-ID: <20061124071901.GA38235@rambler-co.ru> References: <20061123232035.GA56985@what-creek.com> <45663D0A.7010508@FreeBSD.org> <20061124070417.GA63991@rink.nu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u3/rZRmxL6MmkK24" Content-Disposition: inline In-Reply-To: <20061124070417.GA63991@rink.nu> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: arch@freebsd.org, Jason Evans , John Birrell Subject: Re: Proposed change to make -j X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Nov 2006 07:18:50 -0000 --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 24, 2006 at 08:04:17AM +0100, Rink Springer wrote: > On Thu, Nov 23, 2006 at 04:30:02PM -0800, Jason Evans wrote: > > John Birrell wrote: > > >Currently 'make -j' reports an error if the number of jobs > > >isn't specified. > > > > > >I'd like to change make(1) to treat -j (without a number) as > > >meaning "set the number of jobs to the number of processors". > > > > > >On sun4v, each processor isn't too powerful and system performance > > >is only decent when you use all the processors - 32 in my case. > > > > > >I've been working on a parallel 'make release' process which > > >would benefit from having -j set by default. At the moment I > > >set MAKEFLAGS=3Dj32 in my environment and this achieves the desired > > >result, but -j would be more general. > >=20 > > For gmake, a bare -j says to not limit the number of simultaneous jobs.= =20 > > I don't think that it's a good idea to use a flag name that already=20 > > has a different (and potentially useful) meaning for gmake. > >=20 > > I have some concern that no matter what number of jobs you decide to ru= n=20 > > simultaneously when your proposed flag is specified (N, N+1, 2N, etc.,= =20 > > where N is the number of CPUs), that choice will not be universally=20 > > useful, since the best choice of argument to -j depends on what 'make'= =20 > > is building. Might it be better to use sysctl(8) in your command line? > >=20 > > make -j `sysctl -n hw.ncpu` >=20 > What about 'make -j0'? This current gives an error message... >=20 That would be an unportable extension which depends on the FreeBSD sysctl (hw.ncpu). What Jason suggested is just fine and UNIXish. Also, on most systems around here where I did testing (UP and SMP), I saw the imrpovement in wall clock time with -j going up to 2xNCPU, but on other systems I only saw it with -j up to NCPU, so there's no one true formula. It's a product of many factors, including properly written makefiles in a build set. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --u3/rZRmxL6MmkK24 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFZpzlqRfpzJluFF4RAvMdAKCcrPwlR62A8kfk+faVO81pkIbOzACeNVHo 0GH0VTHSXo1//Dv5c7/fYew= =RyB7 -----END PGP SIGNATURE----- --u3/rZRmxL6MmkK24--