Hi, I searched the archives and web a little but found many different opinions on stability/usability of using make -j# with buildworld (and buildkernel). So I am asking if it is a good idea to use make -j on production boxes. Thanks, Marek Kozlovsky -- PGP public key: http://dev.null.cz/buki.asc /"\ \ / ASCII Ribbon Campaign X Against HTML & Outlook Mail / \ http://www.thebackrow.net -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20061013/5125af1a/attachment.pgp
On Oct 13, 2006, at 10:31 AM, Buki wrote:> I searched the archives and web a little but found many different > opinions > on stability/usability of using make -j# with buildworld (and > buildkernel).Works for me with -j2 on buildworld. My buildkernel fails since I compile acpi static. But I only build once and NFS mount the src+obj trees on other boxes. no need to do a full build on each box.
At 4:31 PM +0200 10/13/06, Buki wrote:>Hi, > >I searched the archives and web a little but found many different >opinions on stability/usability of using make -j# with buildworld >(and buildkernel). > >So I am asking if it is a good idea to use make -j on production >boxes.It depends on the target. There are no bugs in 'make -j' per se, but a makefile target has to pay attention to some extra details if that specific target is going to work reliably when using '-j'. You are asking about two different targets. It should be safe to use -j on 'make buildworld', and in fact I do that all the time. Most of my systems are dual-CPU or dual-core, and -j makes the buildworld go significantly faster. *Occasionally* that does not work (particularly if you are following the freebsd-current branch), but any problems in that target are fixed as soon as they are noticed. In the past it has not been safe to use -j on 'make buildkernel', so I never do that. You probably wouldn't gain all that much time by using -j on 'make buildkernel' -- or at least not as much time as you'll lose the first time it does not work right. So I'm sure you see plenty of people say "DON'T DO THAT!!" when it comes to -j and 'make buildkernel'. Some work is now being done so that -j can be reliably used on 'make buildkernel', but I don't think that has been completed yet. For now, my own opinion is that you're not going to save enough time with -j on buildkernel to justify the amount of time you'll lose if it does not work. That is my answer for today, but I expect -j for buildkernel will be more reliable as time goes on. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu
Buki wrote:> Hi, > > I searched the archives and web a little but found many different opinions > on stability/usability of using make -j# with buildworld (and buildkernel). > > So I am asking if it is a good idea to use make -j on production boxes. >I use -j2 on all my dual cpu/core boxes, i don't recall ever having a problem with it.
Buki <freebsd@dev.null.cz> writes:> I searched the archives and web a little but found many different opinions > on stability/usability of using make -j# with buildworld (and buildkernel). > > So I am asking if it is a good idea to use make -j on production boxes.In addition to all of the other comments, there is one more point to make clear; although parallel builds work fine, they obscure the output from the different paths of the build. Therefore, if you have trouble with a "-j" buildworld, the first thing you need to do is to run it again without the "-j". This is not because it might work that way, but because the error messages will be much easier to understand.
Le 13/10/2006 ? 16:31:30+0200, Buki a ?crit> Hi, > > I searched the archives and web a little but found many different opinions > on stability/usability of using make -j# with buildworld (and buildkernel). > > So I am asking if it is a good idea to use make -j on production boxes. >On my new server Proliant DL 380 I use make -j 5 for buildworld without any problem (15 minutes for make -j 5 buildworld... :-) ). Regards. -- Albert SHIH Universite de Paris 7 (Denis DIDEROT) U.F.R. de Mathematiques. 7 i?me ?tage, plateau D, bureau 10 Heure local/Local time: Fri Oct 13 22:31:25 CEST 2006
On Friday 13 October 2006 07:31, Buki wrote:> Hi, > > I searched the archives and web a little but found many different > opinions on stability/usability of using make -j# with buildworld > (and buildkernel). > > So I am asking if it is a good idea to use make -j on production > boxes. >I tested buildworlds with different values for -j. On single processors, using a script that basically looked like time make -j? ... yielded fastest builds when I didn't specify a value for -j. On dual cpu's a value around -j8 yielded the fastest build. I am not interested in system and user time. To me the fastest build is the one that produced the smallest wallclock time or elapsed time, which is the 3rd field in the output of time. The fastest build also yielded the highest cpu utilization, which is the 4th field. I figure specifying a value for -j on single cpu system is simply thrashing the cpu by forcing it to save the environment to work on a different section of the build. I also found that mounting /usr/src and /usr/obj on different controller/HDs from the system reduced the build time. I was using ata-133 HDs and a good scsi would be change the results. It is too easy to test in your environment to see what produces the fastest buildworld. I am going to have to upgrade at some point and an AMD X2 should be interesting. Kent -- Kent Stewart Richland, WA http://www.soyandina.com/ "I am Andean project". http://users.owt.com/kstewart/index.html