From: "Ulrich Ölmann" <u.oelmann@pengutronix.de>
To: luis.merayo@ridgerun.com
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] Limiting Yocto Memory Usage
Date: Thu, 16 Jul 2026 10:22:43 +0200 [thread overview]
Message-ID: <6rpl0nny24.fsf@pengutronix.de> (raw)
In-Reply-To: <CAPGGCfrQqFjk68=6_JXCrj3XyxK1inZUNzjx4JZikm0MfhfQFg@mail.gmail.com> (Luis Merayo via lists yoctoproject org's message of "Fri, 10 Jul 2026 15:26:55 -0600")
Hey Luis,
On Fri, Jul 10 2026 at 15:26 -0600, "Luis Merayo via lists.yoctoproject.org" <luis.merayo=ridgerun.com@lists.yoctoproject.org> wrote:
> Hi,
>
> I would like to know if there is a way to limit Bitbake's Memory usage
> to a specific percentage of the available RAM. For example, can the
> Yocto build be limited to use a maximum of 70% of RAM?
if you are doing your Bitbake work on a machine running a systemd based
Linux distribution you could simply do something like
$ systemd-run \
--user \
--scope \
--property=CPUWeight=<YOUR_CPUWEIGHT> \
--property=IOWeight=<YOUR_IOWEIGHT> \
--property=MemoryHigh=<YOUR_MEMORYHIGH> \
--property=OOMPolicy=kill \
--unit="bitbake-run" \
bitbake [...]
to somewhat limit the resources, see systemd.resource-control(5) and
systemd.scope(5) for details regarding the used parameters.
Best regards,
Ulrich
> Could these three variables achieve this?
>
> BB_PRESSURE_MAX_CPU, BB_PRESSURE_MAX_IO , BB_PRESSURE_MAX_MEMORY
>
> I see the range for these variables is from 1 to 1000000, so I would
> like to understand if there is a way to specify their values as a
> function of the available RAM.
>
> Regards,
>
> Luis
>
>
> This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential
> information that may be proprietary, privileged, or copyrighted under applicable law. If you are not the intended
> recipient, do not read, copy, or forward this email message or any attachments, delete this email message and any
> attachments immediately.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#66637): https://lists.yoctoproject.org/g/yocto/message/66637
> Mute This Topic: https://lists.yoctoproject.org/mt/120213825/3618626
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [u.oelmann@pengutronix.de]
> -=-=-=-=-=-=-=-=-=-=-=-
--
Pengutronix e.K. | Ulrich Ölmann |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2026-07-16 8:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 21:26 Limiting Yocto Memory Usage Luis Merayo
2026-07-14 21:33 ` [yocto] " Randy MacLeod
2026-07-16 8:22 ` Ulrich Ölmann [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=6rpl0nny24.fsf@pengutronix.de \
--to=u.oelmann@pengutronix.de \
--cc=luis.merayo@ridgerun.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox