From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id CE15B3852743 for ; Fri, 10 Jun 2022 17:16:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE15B3852743 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 25AHFfG7016799; Fri, 10 Jun 2022 12:15:41 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 25AHFeeB016798; Fri, 10 Jun 2022 12:15:40 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 10 Jun 2022 12:15:40 -0500 From: Segher Boessenkool To: Paul Smith Cc: Fiodar Stryzhniou , gcc-help Subject: Re: Out of memory while building GCC 12.1.0 Message-ID: <20220610171540.GT25951@gate.crashing.org> References: <6af5f478-817e-ecdc-174f-cfd8dd6c0376@mail.ru> <996468e7556a34c30413aaa977e9f26688be8c93.camel@xry111.site> <5dc1d2854640baba900b3889bd0d75bea7187d54.camel@mad-scientist.net> <20220610155608.GS25951@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2022 17:16:42 -0000 On Fri, Jun 10, 2022 at 01:09:30PM -0400, Paul Smith wrote: > On Fri, 2022-06-10 at 10:56 -0500, Segher Boessenkool wrote: > > The load average is only computed every 5s, so if you have a faster > > machine it can bring your system to its knees in that time already, > > by starting thousands of tasks. > > This is no longer true as of GNU make 3.81 (released in 2006). GNU > make artificially adjusts the load average based on the number of jobs > started in the last second, to avoid this issue. I have seen it happen with GNU make 3.82. The newer heuristic is better, sure, but it is still a heuristic based on flawed data, so it can never be perfectly good. > In the next release of GNU make a different method, based on /proc, is > used for Linux specifically which should result in even better behavior > there. Great to hear that! So in a year or ten people can use this safely :-) Segher