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. Dan
On Sun, Jan 15, 2017 at 10:40:42AM -0600, 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?lldb/clang and related.
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.