Make buildworld failure

Kent Stewart kstewart at owt.com
Wed Aug 20 02:03:45 PDT 2003


On Tuesday 19 August 2003 09:10 pm, Tillman Hodgson wrote:
> On Tue, Aug 19, 2003 at 09:03:11PM -0400, Jud wrote:
> > On Tue, 19 Aug 2003 15:49:38 -0500, Charles Howse
> > <chowse at 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 :-)
>

I have /, /usr/src, and /usr/obj on 3 different HDs/controllers and 
using -j? is still 10-20% slower than not using it.. On my systems, it 
only speeded things up when I had more than 1 cpu.

Kent

-- 
Kent Stewart
Richland, WA

http://users.owt.com/kstewart/index.html



More information about the freebsd-questions mailing list