Re: speedup build time

From: Cy Schubert <Cy.Schubert_at_cschubert.com>
Date: Mon, 28 Oct 2024 20:31:06 UTC
In message <Zx7fqFzbjuCvZgaw@albert.catwhisker.org>, David Wolfskill writes:
> 
> --ySbbNwu/7EFCexY0
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> On Sun, Oct 27, 2024 at 07:00:17PM -0500, Maku Bex wrote:
> > ...
> > I'm trying to figure out a way to decrease build time of -CURRENT and/or
> > -STABLE but it is not working out that well.=20
> > I've tried the following:
> > *	Tuning /etc/make.conf and /etc/src-env.conf based on their manpages
> > (make.conf(5), make(1), src.conf(5)).
> > *	Removed certain options from GENERIC, which reduced the kernel build
> > time significantly.=20
> >=20
> > Hardware specs:
> > *	I7-10700T 8C/16T @2.0GHz.
> > *	16GB RAM.
> > *	256GB NVMe.
> >=20
> > Currently, 'make buildworld' has been running for 7hrs and counting. Is
> > there anything else I can do to speed up world build?
> > ....
>
> First, some questions -- whether or not you wish to share the answers, I
> believe that answering the questions (if only for yourself) may be
> helpful:
>
> * What (if any) "max_jobs" (make's "-j" parameter) are you using?  For a
>   16T system, I expect I would start with a value of around 28.
>
> * Are you using make's "meta" mode?  I do.
>
> * Can you get more memory for that system?

I haven't found meta mode faster than without. Yes it reduces build time in 
some cases but many other it rebuilds sources I would never have thought it 
should rebuild. Especially llvm. I find meta mode rebuilds clang more often 
than before I used meta mode.

The reason for switching back to meta mode was a kernel patch which caused 
some weird behaviour. After some back & forth with kib@, I had determined 
that there were some old objects not being rebuilt when they should have 
been.

I suppose one could say that meta mode is doing the correct thing by 
rebuilding objects when I feel it shouldn't, because the strange behaviour 
I had encountered a couple of months ago would never have happened had I 
been using meta mode.

Though I can't prove it, my sense is that it does "gratuitously" rebuild 
llvm more often than without. I can't prove this scientifically. Just a 
seat of the pants "assessment."


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e^(i*pi)+1=0