From owner-freebsd-ports@FreeBSD.ORG Wed Mar 16 10:57:02 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E67F106564A for ; Wed, 16 Mar 2011 10:57:02 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mx1.freebsd.org (Postfix) with SMTP id EA7F08FC1D for ; Wed, 16 Mar 2011 10:57:00 +0000 (UTC) Received: (qmail invoked by alias); 16 Mar 2011 10:56:59 -0000 Received: from dtmd-4db21a48.pool.mediaWays.net (EHLO [192.168.178.26]) [77.178.26.72] by mail.gmx.net (mp057) with SMTP; 16 Mar 2011 11:56:59 +0100 X-Authenticated: #428038 X-Provags-ID: V01U2FsdGVkX188Qaog1pU8WXQOTRgSFL4SNz7wS1LPJioHbF7mZg dN7uoIJSHqiKj9 Message-ID: <4D80977B.3090801@gmx.de> Date: Wed, 16 Mar 2011 11:56:59 +0100 From: Matthias Andree User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.15) Gecko/20110303 Mnenhy/0.8.3 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <4D7FBC0E.5020302@reiteration.net> <1468BFDD-5E3C-4756-830B-266D0942AED0@mac.com> <4D802299.1020303@reiteration.net> In-Reply-To: <4D802299.1020303@reiteration.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Re: can make -j be used for ports? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2011 10:57:02 -0000 Am 16.03.2011 03:38, schrieb John: > On 15/03/2011 22:35, Eitan Adler wrote: >> No, this is incorrect. The MAKE_JOBS_NUMBER and MAKE_JOBS_SAFE is used >> internally when building a single port. When the OP is asking if he >> can manually specify -j on the command line which would end up >> building multiple ports in parallel. This can not be done (primarily >> because there is no locking done on ports) > > Actually, he has it partially right, at least in the idea I was trying > to convey. I'll explain again, because maybe I wasn't coherent enough > previously: > > I have an amd x2 6000+ with 8GB RAM. It's a wonderful fast desktop. Not > the fastest, but it's fast enough for me. What I want to do is this: > > 1. If I can speed things up, with *ports* as I have a dual cpu, I want > to maybe run j2 or j3. I seek clarification which is logically best, > because some literature says jn, others jn+1 where n is number of cores. > > kern.smp.cpus: 2 on my machine. Is there benefit setting this to 3,4,5? > > I want to know if there is perhaps a conf file or sysctl where I can > specify this *for ports only.* - if not I'm happy to specify on the > command line. It's just that the manual is a tad unclear about this. /etc/make.conf: FORCE_MAKE_JOBS=yes MAKE_JOBS_NUMBER=3 # whatever you find useful. The key is that you need to figure how loaded the CPU is. As long as it is waiting for the disks (which it usually is), you can try to increase the number, but keep an eye on the RAM, you don't want the machine to go swapping in and out (although 8 GibiB are plenty). On an i7-920 with a truckload of RAM I've sometimes even run make -j12 or so (on Linux build jobs though) to actually get the CPU 100% busy. > 2. Where I was being unclear I think is when I was talking about > building the system. I have seen in the literature that -jn when > installing world Breaks Things. This isn't an issue as I run RELEASE and > so only either apply patches or make the system, so easy to specify, > where I can, -j3 except in make installkernel and make installworld. I've also found that "make -j4 -DNOCLEAN buildworld buildkernel" works for me on 8.2. If RELENG_8 occasionally failed, I re-ran without -DNOCLEAN but still with -j4. Looks like most of the issues with parallel building have been shaken out of the world :-) -- Matthias Andree