From owner-freebsd-questions@FreeBSD.ORG Mon May 15 13:00:30 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 758C116A586 for ; Mon, 15 May 2006 13:00:30 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80BDF43D8A for ; Mon, 15 May 2006 13:00:18 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (AUTH: PLAIN wmoran, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Mon, 15 May 2006 09:00:18 -0400 id 00056405.44687B62.00012C55 Date: Mon, 15 May 2006 09:00:18 -0400 From: Bill Moran To: Ashley Moran Message-Id: <20060515090018.4015d7e1.wmoran@collaborativefusion.com> In-Reply-To: <200605151112.33416.work@ashleymoran.me.uk> References: <200605151112.33416.work@ashleymoran.me.uk> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Please explain make -j to my little brain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2006 13:00:30 -0000 On Mon, 15 May 2006 11:12:33 +0100 Ashley Moran wrote: > Hi > > I've read the following snippet out of the handbook hundreds of times and > still don't understand it. I even asked one of the developers I work with > and he was baffled too. > > > It is now possible to specify a -j option to make which will cause it to > > spawn several simultaneous processes. This is most useful on multi-CPU > > machines. However, since much of the compiling process is IO bound rather > > than CPU bound it is also useful on single CPU machines. > > What I want to know is, if compiling is IO bound, and you increase the number > of simultaneous processes compiling your world, where do the extra processes > get data from if the IO bandwidth is all used. > > Have I misunderstood the term IO bound? Please help, I feel like a right > tool. The key to that quote is the placement of the term "much". As in "much of the compiling process" ... not all of it. Generally, while one process is waiting on disk IO, another can be using the CPU. As a result, you can get closer to 100% usage of the machine, which won't happen if you batch the whole thing. > Just as a side line... does anybody know the best -j value to build world on a > 4-core box? I generally quadruple the # of cores, so I'd use -j16. I couldn't tell you authoritatively what is _best_, though. -- Bill Moran Collaborative Fusion Inc.