Date: Mon, 08 Jul 2013 21:06:59 -0400 From: Garance A Drosehn <gad@FreeBSD.org> To: Alfred Perlstein <alfred@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r253002 - head Message-ID: <51DB6233.1040003@FreeBSD.org> In-Reply-To: <201307072039.r67KdCdR028908@svn.freebsd.org> References: <201307072039.r67KdCdR028908@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7/7/13 4:39 PM, Alfred Perlstein wrote: > > Log: > Document tip on how to build all kernels quickly. > > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Sun Jul 7 19:58:14 2013 (r253001) > +++ head/Makefile Sun Jul 7 20:39:11 2013 (r253002) > @@ -32,6 +32,12 @@ > # targets - Print a list of supported TARGET/TARGET_ARCH pairs > # for world and kernel targets. > # toolchains - Build a toolchain for all world and kernel targets. > +# > +# "quick" way to test all kernel builds: > +# _jflag=`sysctl -n hw.ncpu` > +# _jflag=$(($_jflag * 2)) > +# [ $_jflag -gt 12 ]&& _jflag=12 > +# make universe -DMAKE_JUST_KERNELS JFLAG=${jflag} > # > # This makefile is simple by design. [...] I think it's probably helpful to point out the -j flag, but I'm not sure I would phrase it as if we're sure that the values here are the ideal ones. I expect the ideal values depend too much on hardware (e.g.: the CPU, type of disk used, and amount of memory on the machine). I did a lot of benchmarks of -j a few years ago on the few machines I owned. In my case, when I averaged the results across my machines, the ideal value was more like ncpu+1, not ncpu*2. It wouldn't surprise me at all if the ideal value has changed since I did that. And it wouldn't surprise me if the ideal value changes again in the next two years, especially when one considers the variety of hardware architectures that FreeBSD runs on. It's good to mention the make command, the -DMAKE_JUST_KERNELS, and that using the JFLAG can speed things up. But I think it should be said that this min(jcpu*2, 12) recommendation works well for some hardware, but that people might need to do their own checking to see what value will work best on their hardware. Put some short and generic recommendation in the makefile, and then point people at a man page or some other documentation for a more detailed explanation. IMO. -- Garance Alistair Drosehn = drosih@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51DB6233.1040003>