From owner-freebsd-questions@FreeBSD.ORG Mon May 15 10:23:41 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 CED6E16A4EE for ; Mon, 15 May 2006 10:23:41 +0000 (UTC) (envelope-from richard@firebadger.net) Received: from mail.firebadger.net (82-69-4-157.dsl.in-addr.zen.co.uk [82.69.4.157]) by mx1.FreeBSD.org (Postfix) with SMTP id 4249343D73 for ; Mon, 15 May 2006 10:23:33 +0000 (GMT) (envelope-from richard@firebadger.net) Received: (qmail 47384 invoked by uid 1011); 15 May 2006 10:26:47 -0000 Received: from 192.168.1.10 by brian.firebadger.net (envelope-from , uid 1009) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.1/1449. spamassassin: 3.1.1. perlscan: 1.25-st-qms. Clear:RC:0(192.168.1.10):SA:0(-4.4/5.0):. Processed in 0.926588 secs); 15 May 2006 10:26:47 -0000 X-Spam-Status: No, hits=-4.4 required=5.0 X-Antivirus-FIREBADGER-Mail-From: richard@firebadger.net via brian.firebadger.net X-Antivirus-FIREBADGER: 1.25-st-qms (Clear:RC:0(192.168.1.10):SA:0(-4.4/5.0):. Processed in 0.926588 secs Process 47376) Received: from unknown (HELO ?192.168.1.10?) (richard@firebadger.net@192.168.1.10) by mail.firebadger.net with SMTP; 15 May 2006 10:26:45 -0000 Message-ID: <4468569B.6060706@firebadger.net> Date: Mon, 15 May 2006 11:23:23 +0100 From: Richard Collyer User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <200605151112.33416.work@ashleymoran.me.uk> In-Reply-To: <200605151112.33416.work@ashleymoran.me.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 10:23:42 -0000 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. > > Just as a side line... does anybody know the best -j value to build world on a > 4-core box? The way I understand it is that 1 core would do this... compile .... read disk .... compile .... read disk ... compile It wont be reading when it is compiling and cant compile when its reading so if you do -j 2 even on a single core machine it could do: compile .... read disk .... complile .... read disk ... compile read disk .... complile .... read disk ... compile .... read disk Which means neither the CPU or the disks are idle resulting in faster performance. Cheers Richard