Skip to contentSkip to conversation

Add a document on limiting host resources

PATCH Superseded Antonin Godard 1 participant 3 messages Jul 1, 2025

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add a document on limiting host resources

This patch depends on:
https://lore.kernel.org/[email protected]

---
Changes in v2:
- Fix typos and add suggestions from Quentin Schulz (thanks!).
- Add a better section on how to determine what the best pressure for a
given host is.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Antonin Godard (2):
Add a document on limiting host resources ref-manual/variables.rst: make reference to new limiting-resources doc

 documentation/dev-manual/index.rst              |   1 +
 documentation/dev-manual/limiting-resources.rst | 120 ++++++++++++++++++++++++
 documentation/ref-manual/variables.rst          |  32 +++++--
 3 files changed, 146 insertions(+), 7 deletions(-)

---
base-commit: 95691fa4e7d30ee27cb1280df20751bf449538a4
change-id: 20250417-resource-limiting-12fe772af904

Best regards,

Signature · 1 line
Antonin Godard <[email protected]>
#1 lore raw

PATCH v2 1/2 Add a document on limiting host resources

Add a "Limiting the Host Resources Usage" document to share the different techniques that can be used to limit the host resources usage. We do have a document to document how to speed up a build, so this document comes right after.

[YOCTO #15111]

---
 documentation/dev-manual/index.rst              |   1 +
 documentation/dev-manual/limiting-resources.rst | 120 ++++++++++++++++++++++++
 2 files changed, 121 insertions(+)
documentation/dev-manual/index.rst +1 -0
index 63736e0ab..4abfa59e9 100644
@@ -22,6 +22,7 @@ Yocto Project Development Tasks Manual
    building
    multiconfig
    speeding-up-build
+   limiting-resources
    libraries
    prebuilt-libraries
    devtool
documentation/dev-manual/limiting-resources.rst new file +120 -0

120 lines not on this page · raw message

Signature · 1 line
2.50.0
#2 lore raw

PATCH v2 2/2 ref-manual/variables.rst: make reference to new limiting-resources doc

In reply to Antonin Godard

For host resource limiting variables, make a reference to the new "Limiting the Host Resources Usage" document.

---
 documentation/ref-manual/variables.rst | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)
documentation/ref-manual/variables.rst +25 -7
index c56418e2a..d079e4b59 100644
@@ -589,8 +589,12 @@ system and gives an overview of their function and contents.
       See :term:`bitbake:BB_INVALIDCONF` in the BitBake manual.
 
    :term:`BB_LOADFACTOR_MAX`
-      The system load threshold above which BitBake will stop runnig extra
-      tasks.
+      The system load threshold above which :term:`BitBake` will stop running
+      extra tasks.
+
+      For more information on how to limit the resources used during builds, see
+      the :doc:`/dev-manual/limiting-resources` section of the Yocto Project
+      Development Tasks Manual.
 
    :term:`BB_LOGCONFIG`
       See :term:`bitbake:BB_LOGCONFIG` in the BitBake manual.
@@ -649,11 +653,9 @@ system and gives an overview of their function and contents.
       An alternative to using :term:`BB_NUMBER_THREADS` to keep the usage
       of build system resources under control is to use the smarter
       :term:`BB_PRESSURE_MAX_CPU`, :term:`BB_PRESSURE_MAX_IO` or
-      :term:`BB_PRESSURE_MAX_MEMORY` controls. They will prevent BitBake
-      from starting new tasks as long as thresholds are exceeded. Anyway,
-      as with :term:`BB_NUMBER_THREADS`, such controls won't prevent the
-      tasks already being run from using all CPU threads on the system
-      if :term:`PARALLEL_MAKE` is not set to a low value.
+      :term:`BB_PRESSURE_MAX_MEMORY` controls. See the
+      :doc:`/dev-manual/limiting-resources` section of the Yocto Project
+      Development Tasks Manual.
 
    :term:`BB_ORIGENV`
       See :term:`bitbake:BB_ORIGENV` in the BitBake manual.
@@ -664,12 +666,24 @@ system and gives an overview of their function and contents.
    :term:`BB_PRESSURE_MAX_CPU`
       See :term:`bitbake:BB_PRESSURE_MAX_CPU` in the BitBake manual.
 
+      For more information on how to limit the resources used during builds, see
+      the :doc:`/dev-manual/limiting-resources` section of the Yocto Project
+      Development Tasks Manual.
+
    :term:`BB_PRESSURE_MAX_IO`
       See :term:`bitbake:BB_PRESSURE_MAX_IO` in the BitBake manual.
 
+      For more information on how to limit the resources used during builds, see
+      the :doc:`/dev-manual/limiting-resources` section of the Yocto Project
+      Development Tasks Manual.
+
    :term:`BB_PRESSURE_MAX_MEMORY`
       See :term:`bitbake:BB_PRESSURE_MAX_MEMORY` in the BitBake manual.
 
+      For more information on how to limit the resources used during builds, see
+      the :doc:`/dev-manual/limiting-resources` section of the Yocto Project
+      Development Tasks Manual.
+
    :term:`BB_RUNFMT`
       See :term:`bitbake:BB_RUNFMT` in the BitBake manual.
 
@@ -7006,6 +7020,10 @@ system and gives an overview of their function and contents.
       ":ref:`dev-manual/speeding-up-build:speeding up a build`"
       section in the Yocto Project Development Tasks Manual.
 
+      For more information on how to limit the resources used during builds, see
+      the :doc:`/dev-manual/limiting-resources` section of the Yocto Project
+      Development Tasks Manual.
+
    :term:`PARALLEL_MAKEINST`
       Extra options passed to the build tool install command
       (``make install``, ``ninja install`` or more specific ones)
Signature · 1 line
2.50.0