From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.200.36.78 with SMTP id d14mr3984142qtd.79.1486805143175; Sat, 11 Feb 2017 01:25:43 -0800 (PST) X-Received: by 10.157.44.136 with SMTP id p8mr1044193otb.20.1486805143106; Sat, 11 Feb 2017 01:25:43 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!i7no749758qta.1!news-out.google.com!15ni3363itm.0!nntp.google.com!e137no161288itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 11 Feb 2017 01:25:42 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a01:e34:ec05:8e10:e477:c13a:1cf3:2e00; posting-account=21X1fwoAAABfSGdxRzzAXr3Ux_KE3tHr NNTP-Posting-Host: 2a01:e34:ec05:8e10:e477:c13a:1cf3:2e00 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <14f89b0b-0a84-4b0a-b4a5-484679d1c7ca@googlegroups.com> Subject: Re: Hint to Ada newbies From: Hadrien Grasland Injection-Date: Sat, 11 Feb 2017 09:25:43 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:33322 Date: 2017-02-11T01:25:42-08:00 List-Id: Le vendredi 10 f=C3=A9vrier 2017 10:56:53 UTC+1, Simon Wright a =C3=A9crit= =C2=A0: > Robert A Duff writes: >=20 > > Simon Wright writes: > > > >> I have had to use the power switch to stop a build using -j0! '-j<1 le= ss > >> than the number of cores>' does pretty well. > > > > Which operating system? >=20 > macOS (actually a few releases ago, Mavericks maybe). And it's just > possible it was the equivalent switch in Make. There's actually a major difference between gnatmake's -j0 and make's -j sw= itches. gnatmake -j0 means "Try to keep all my CPU cores busy", i.e. use 4 processe= s on a 4-core machine. This is reasonable, as long as you have enough RAM t= o handle it. make -j means "Spawn new processes as soon as you can", i.e. use an unbound= ed amount of processes. Not only is this strategy stupid (your build will a= ctually run slower if too many processes compete for system resources), it = is also the easiest way to get your machine to run out of memory. make -l ("Do not spawn new processes if the CPU load is higher than x") was= an attempt to address this broken design, which fails because it cannot ha= ndle the system load inertia: stating a new process may only increase the C= PU load a couple of seconds later, and this is enough for make to spawn ton= s of build processes in meantime.