Date: Thu, 22 Jul 2021 13:57:29 -0700 From: Kevin Oberman <rkoberman@gmail.com> To: "Herbert J. Skuhra" <herbert@gojira.at> Cc: "freebsd-questions@freebsd.org" <questions@freebsd.org> Subject: Re: Clarification Of -jX Argument For buildworld/kernel Message-ID: <CAN6yY1smvFKo9HNS0ZM58MTXxqXfimtNOgTqwzMx_prC0E3SNw@mail.gmail.com> In-Reply-To: <87wnpikbma.wl-herbert@gojira.at> References: <eb8cc5bd-bcd9-39de-ebf9-c75c8ef3dcf0@tundraware.com> <87wnpikbma.wl-herbert@gojira.at>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 22, 2021 at 1:17 AM Herbert J. Skuhra <herbert@gojira.at> wrote: > On Wed, 21 Jul 2021 16:17:11 +0200, Tim Daneliuk wrote: > > > > Is it still advisable to explicitly declare the numer of make processes > > when doing buildworld/buildkernel > > Sure, why not!? > > > or are the defaults best left alone? > > If something breaks try the defaults. > > > I am trying to suss through a 13-STABLE build problem to see if using -j4 > > on a 4 core machine is causing a race condition of some sort... > > Even when you build world/kernel with -j4 there should be an error > message. What is it? If you can't find it build without -j4. If it > still fails post the error here or on the stable mailing list. > > I build world and kernel (stable/13 and main) for amd64, armv7 and > arm64 with -j4 and have no issues. > > -- > Herbert While it may have changed, the defaut was originally to build on one processor, it may have changed, but I don't think so. Several years ago someone did some testing and demonstrated that the best performance was using number of threads + 2, but that was at least 12 years ago and systems topped out at 8 or 16 threads while far more are available today. It is likely that improvements may be seen with higher numbers for very large systems. If you wonder why more prarrallel build that threads is better, on an 8 thread system (like mine), if I set '-j8', only a maximum of 8 threads will attempt to run even though one or more processors may be idle while waiting for I/O. Having couple of added threads available means that this idle time is available for another thread. If you set the value to be equal to the available hardware threads, there won't be one. In the many years since parallel world/kernel builds were introduced, issues have been very rare, though mistakes have occasionally happened. I really would not worry too much about races. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1smvFKo9HNS0ZM58MTXxqXfimtNOgTqwzMx_prC0E3SNw>