All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Monsees, Steven C (US)" <steven.monsees@baesystems.us>
To: "yocto@lists.yoctoproject.org" <yocto@lists.yoctoproject.org>,
	"alex.kanavin@gmail.com" <alex.kanavin@gmail.com>
Cc: Khem Raj <raj.khem@gmail.com>
Subject: RE: [yocto] Parallel builds under yocto
Date: Thu, 15 Aug 2024 10:37:22 +0000	[thread overview]
Message-ID: <20240815103728.CCCA0C3DA7F@smtp.lore.kernel.org> (raw)
In-Reply-To: <CANNYZj_DHt0xKAHbantF9_m8DdTMXAouJk0=2t=hFX52Ve67vA@mail.gmail.com>

Thank you for your responses, I am trying to track down a race condition running yocto in a podman container on RHEL 8 systems 20 + cores...

-----Original Message-----
From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On Behalf Of Alexander Kanavin
Sent: Thursday, August 15, 2024 6:25 AM
To: yocto@lists.yoctoproject.org; Monsees, Steven C (US) <steven.monsees@baesystems.us>
Cc: Khem Raj <raj.khem@gmail.com>
Subject: Re: [yocto] Parallel builds under yocto

External Email Alert

This email has been sent from an account outside of the BAE Systems network.

Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros.  For further information on how to spot phishing, access “Cybersecurity OneSpace Page” and report phishing by clicking the button “Report Phishing” on the Outlook toolbar.


On Thu, 15 Aug 2024 at 12:18, Monsees, Steven C (US) via lists.yoctoproject.org <steven.monsees=baesystems.us@lists.yoctoproject.org> wrote:
>
>
> So, to be clear, in this example:
>
> There are 12 cores total on a board ...
> BB_NUMBER_THREADS="8", this tells bitbake to generate 8 tasks
>
> And, these tells do_make/do_install to each generate 2 tasks:
>
> PARALLEL_MAKE="-j 2"
> PARALLEL_MAKEINST="-j 2”
>
> All 12 cores are available to be used yocto build.
>
> Correct ?

No. This merely instructs bitbake to start a maximum of 8 tasks (it can run less if the task dependency graph doesn't allow for more until some task on the critical path completes and 'unlocks' further tasks), and each of those tasks, if it's a make-driven one, will run on a maximum of two cores. So you can end up anywhere from 8*2=16 processes to just one process, and on average you're likely to under-utilize the CPU with these settings, and have your build take longer than it could be.

Please do stick with the defaults, they are picked to maximize CPU utilization at small risk of running out of RAM.

Alex

      reply	other threads:[~2024-08-15 10:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <MADEUP.17EBAE4E6A437742.17352@lists.yoctoproject.org>
2024-08-14 19:24 ` [yocto] Parallel builds under yocto Khem Raj
2024-08-14 19:36   ` Alexander Kanavin
2024-08-15  6:16     ` Mikko Rapeli
2024-08-15 10:18   ` Monsees, Steven C (US)
     [not found]   ` <MADEUP.17EBDF92AD5AE264.10875@lists.yoctoproject.org>
2024-08-15 10:24     ` Alexander Kanavin
2024-08-15 10:37       ` Monsees, Steven C (US) [this message]

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=20240815103728.CCCA0C3DA7F@smtp.lore.kernel.org \
    --to=steven.monsees@baesystems.us \
    --cc=alex.kanavin@gmail.com \
    --cc=raj.khem@gmail.com \
    --cc=yocto@lists.yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.