public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Paul Smith <paul@mad-scientist.net>
Cc: Fiodar Stryzhniou <fedor_qd@mail.ru>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Out of memory while building GCC 12.1.0
Date: Fri, 10 Jun 2022 10:56:08 -0500	[thread overview]
Message-ID: <20220610155608.GS25951@gate.crashing.org> (raw)
In-Reply-To: <5dc1d2854640baba900b3889bd0d75bea7187d54.camel@mad-scientist.net>

On Fri, Jun 10, 2022 at 10:42:03AM -0400, Paul Smith wrote:
> On Fri, 2022-06-10 at 15:29 +0300, Fiodar Stryzhniou wrote:
> > Looks like you right. Harcoded to -j6 helps.
> 
> Another way to go is to add the "-l" option.  This is often combined
> with "-j" (no limit) to have your build limited by load rather than by
> job count.
> 
> So if you want the load on your system to be no greater than 2, you can
> say "-j -l2".

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.

Since maximum acceptable loadavg is very system specific as well, you
can just always use -j<N> instead, or -j<N> -l<M>.  Just never use -j
without number after it :-)


Segher

  reply	other threads:[~2022-06-10 15:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 11:55 Fiodar Stryzhniou
2022-06-10 12:14 ` Xi Ruoyao
2022-06-10 12:18   ` Jonathan Wakely
2022-06-10 12:29     ` Fiodar Stryzhniou
2022-06-10 12:42       ` Jonathan Wakely
2022-06-10 15:06         ` Fiodar Stryzhniou
2022-06-10 14:42       ` Paul Smith
2022-06-10 15:56         ` Segher Boessenkool [this message]
2022-06-10 17:04           ` Fiodar Stryzhniou
2022-06-10 17:09           ` Paul Smith
2022-06-10 17:15             ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220610155608.GS25951@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=fedor_qd@mail.ru \
    --cc=gcc-help@gcc.gnu.org \
    --cc=paul@mad-scientist.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).