public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Holger Hoffstätte" <holger@applied-asynchrony.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: "emerge --jobs=1 ..." vs "MAKEOPTS=-j1 emerge ..."
Date: Sun, 21 Jun 2020 12:11:50 +0200	[thread overview]
Message-ID: <c51f207e-d4c3-0d24-a242-74da86d22cca@applied-asynchrony.com> (raw)
In-Reply-To: <24303.11806.371890.563490@tux.local>

On 2020-06-21 11:53, Dr Rainer Woitok wrote:
> Greetings,
> 
> is there any difference between running "emerge --jobs=1 ..."  and runn-
> ing "MAKEOPTS=-j1 emerge ..."?

--jobs=1 starts one package build at a time, possibly using many parallel
processes - depending on MAKEOPTS and how the build works.

MAKEOPTS sets the number of parallel processes within one package build.

They are complementary, and you can combine them. However frequently
a series of packages have dependencies (a before b before c), so starting
multiple --jobs may not have any effect. Or it may, e.g. in the case of
rebuilds or independent packages that often only use one process to build,
e.g. perl modules or something smaller. --jobs can really make a difference
since otherwise you would suffer from portage/script/shell overhead relative
to the actual work being performed.

make offers the -l parameter that constrains the number of processes by
load, and adjusts them accordingly. As an example, with 8 cores you could
use MAKEOPTS="-j8 -l8" to enable inter-ebuild parallelism and a max. load
for one package, then start several --jobs to build independent packages
without waiting for each other.

Hope this helps.

-h


  reply	other threads:[~2020-06-21 10:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-21  9:53 [gentoo-user] "emerge --jobs=1 ..." vs "MAKEOPTS=-j1 emerge ..." Dr Rainer Woitok
2020-06-21 10:11 ` Holger Hoffstätte [this message]
2020-06-21 10:20 ` Rich Freeman

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=c51f207e-d4c3-0d24-a242-74da86d22cca@applied-asynchrony.com \
    --to=holger@applied-asynchrony.com \
    --cc=gentoo-user@lists.gentoo.org \
    /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