Re: [yocto] Limiting Yocto Memory Usage
Ulrich Ölmann <[email protected]> Thu, 16 Jul 2026 10:22:43 +0200
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <[email protected]> |
Hey Luis, On Fri, Jul 10 2026 at 15:26 -0600, "Luis Merayo via lists.yoctoproject.org= " <[email protected]> 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=3DCPUWeight=3D<YOUR_CPUWEIGHT> \ --property=3DIOWeight=3D<YOUR_IOWEIGHT> \ --property=3DMemoryHigh=3D<YOUR_MEMORYHIGH> \ --property=3DOOMPolicy=3Dkill \ --unit=3D"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 app= licable law. If you are not the intended > recipient, do not read, copy, or forward this email message or any attach= ments, delete this email message and any > attachments immediately. > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > Links: You receive all messages sent to this group. > View/Reply Online (#66637): https://lists.yoctoproject.org/g/yocto/messag= e/66637 > Mute This Topic: https://lists.yoctoproject.org/mt/120213825/3618626 > Group Owner: [email protected] > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [u.oelmann@peng= utronix.de] > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --=20 Pengutronix e.K. | Ulrich =C3=96lmann = | 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 |