Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jan 2017 17:59:21 +0100
From:      Jan Bramkamp <crest@rlwinm.de>
To:        freebsd-stable@freebsd.org
Subject:   Re: buildworld build times 10-stable vs. 11-stable
Message-ID:  <deb081a6-b63d-7640-a5cc-1eeca46c94c8@rlwinm.de>
In-Reply-To: <alpine.GSO.2.11.1701151033290.58251@localhost.local>
References:  <alpine.GSO.2.11.1701151033290.58251@localhost.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On 15/01/2017 17:40, Dan Mack wrote:
> I have a system which builds world, kernel, install, boot, installworld,
> reboot several times per week.   I just noticed that my build times
> increased from about (just cherry picking a couple build logs):
>
>   Starting build of FreeBSD SVN [309852]  10.3-STABLE
>   Kernel will be GENERIC
>     building world ...     90:35 0
>
>
>   Starting build of FreeBSD SVN [312099]  11.0-STABLE
>   Kernel will be GENERIC
>     building world ...     146:23 0
>
> before I start bisecting the log files, is there something obvious
> introduced in 11 that I missed that would explain the roughly 50 minute
> difference in my build times?   clang?  additional subsystems?
>
> I'm using the same zpool / disks / memory etc.

If you're compiling often enough for this to be an issue use the new 
bmake meta mode. In meta mode make keeps metadata gathered by the kernel 
and exported to make over filemon(4) around. With this a `make -sj4 
buildworld buildkernel` after a small change (e.g. next patch) takes 
less than 3 minutes on my old SandyBridge dual-core ThinkPad X220 with 
cold file system caches. To enable it run `echo WITH_META_MODE=yes 
 >/etc/src-env.conf`, instruct the kld rc.d script to load filemon with 
`sysrc kld_list+=" filemon"` and use the rc.d script to load the kernel 
module with `service kld start` (or reboot).

The next buildworld and buildkernel will store the metadata in /usr/obj. 
Any builds of similar versions after that will have drastically shorter 
build times.

This optimization is available starting with FreeBSD 11.0.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?deb081a6-b63d-7640-a5cc-1eeca46c94c8>