Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Aug 2003 22:10:38 -0600
From:      Tillman Hodgson <tillman@seekingfire.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Make buildworld failure
Message-ID:  <20030819221038.S2526@seekingfire.com>
In-Reply-To: <oprt6ijlb00cf2rk@fastmail.fm>; from judmarc@fastmail.fm on Tue, Aug 19, 2003 at 09:03:11PM -0400
References:  <001c01c36693$68057680$04fea8c0@moe> <oprt6ijlb00cf2rk@fastmail.fm>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 19, 2003 at 09:03:11PM -0400, Jud wrote:
> On Tue, 19 Aug 2003 15:49:38 -0500, Charles Howse <chowse@charter.net> 
> wrote:
> > Very interesting.
> > On page 490 of "FreeBSD Unleashed" it references the -j4 parameter as a
> > way to speed up the make buildworld process by spawning multiple
> > simultaneous processes.
> >
> > The same thing is referenced in Chapter 20 of the FreeBSD Handbook.
> >
> > Is this now depreciated?
> 
> Whether deprecated or not, many posts to this mailing list have said -j4 
> doesn't speed up "make buildworld" anyway, and that's been my experience.  
> I'm sure it depends on your setup.

To use -j effectively, try putting /usr/obj and /usr/src on different
drives (ideally, on drives dedicated to the task, meaning a third drive
for the OS itself) and testing with `time make buildkernel -jX` (where X
is greater than 1).  You should see a measurable decrease in compile
time even on a single CPU system simply because you can keep both disks
busier.

On the other hand, if you have only a single CPU and a single disk and
one or the other is maxed out it's unlikely that using -j will help (as
you've seen).

Chapter 18 of _Absolute BSD_ (Michael Lucas) has a description of tuning
buildkernel. If you compare the output of `top` with `vmstat 5` while
building without -j on a box with a reasonably fast CPU and a single
disk you'll probably see that the CPU is idle for some percentage of the
time, but the number of items under the 'b' column in vmstat is
occassionally above 0. This means that the CPU has cycles available yet
tasks are blocking on disk: classic disk IO bottlenecking.

'Course, as I say all this, building with -j on sparc64 is broken in
-CURRENT at the moment so I'm not using -j for a while. Heh. It's handy
when it works :-)

-T


-- 
"Surely the 4 sysadmins of the apocalypse should be:
 edquota, rm -rf, kill -9, and shutdown."
	- Rob Blake



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030819221038.S2526>