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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Hint to Ada newbies Date: Fri, 10 Feb 2017 10:22:54 +0100 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: vZYCW951TbFitc4GdEwQJg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:33308 Date: 2017-02-10T10:22:54+01:00 List-Id: On 10/02/2017 00:12, Robert A Duff wrote: > Simon Wright writes: > >> I have had to use the power switch to stop a build using -j0! '-j<1 less >> than the number of cores>' does pretty well. > > Which operating system? Windows in my case, when compiling native, cross or under a virtual machine. But there is no need to reset. One should just wait a few minutes and then it would go again. I always change the priority of gprbuild to "below normal" in the task manager (and one of the virtual machine too) in order to prevent locks like that. It is not AdaCore to blame, IMO. A more grave problem is when there are free cores and no free memory. This leads to swapping which may require hours if not days to wait before the OS becomes responsible again. I had this on ARM Linux quite frequently. Maybe this is what Simon had too. P.S. It would be nice to have a smarter kind of -j0 switch: 1. No new instances if memory or CPU use is greater than some limit (e.g. 80%). 2. Spawned instances run on the idle priority. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de