summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2022-11-08 19:36:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-10 22:12:56 +0000
commit15a8edceadc3a0cdb2d8bf5c33871bac13fcaaa2 (patch)
tree091a71187f65f1041d88c41890a656a54109a007 /documentation
parente39e68053f4bb9bc27114a669bb651ce749d32db (diff)
downloadpoky-15a8edceadc3a0cdb2d8bf5c33871bac13fcaaa2.tar.gz
ref-manual/variables.rst: expand BB_NUMBER_THREADS description
Explain that reducing its value to reduce system load is not sufficient if PARALLEL_MAKE is not reduced as well. (From yocto-docs rev: f4986faa5576ec1c146e606220421a686c4a9b57) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/ref-manual/variables.rst27
1 files changed, 27 insertions, 0 deletions
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 9909622d7a..147679400f 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -530,6 +530,33 @@ system and gives an overview of their function and contents.
530 ":ref:`dev-manual/common-tasks:speeding up a build`" 530 ":ref:`dev-manual/common-tasks:speeding up a build`"
531 section in the Yocto Project Development Tasks Manual. 531 section in the Yocto Project Development Tasks Manual.
532 532
533 On the other hand, if your goal is to limit the amount of system
534 resources consumed by BitBake tasks, setting :term:`BB_NUMBER_THREADS`
535 to a number lower than the number of CPU threads in your machine
536 won't be sufficient. That's because each package will still be built
537 and installed through a number of parallel jobs specified by the
538 :term:`PARALLEL_MAKE` variable, which is by default the number of CPU
539 threads in your system, and is not impacted by the
540 :term:`BB_NUMBER_THREADS` value.
541
542 So, if you set :term:`BB_NUMBER_THREADS` to "1" but don't set
543 :term:`PARALLEL_MAKE`, most of your system resources will be consumed
544 anyway.
545
546 Therefore, if you intend to reduce the load of your build system by
547 setting :term:`BB_NUMBER_THREADS` to a relatively low value compared
548 to the number of CPU threads on your system, you should also set
549 :term:`PARALLEL_MAKE` to a similarly low value.
550
551 An alternative to using :term:`BB_NUMBER_THREADS` to keep the usage
552 of build system resources under control is to use the smarter
553 :term:`BB_PRESSURE_MAX_CPU`, :term:`BB_PRESSURE_MAX_IO` or
554 :term:`BB_PRESSURE_MAX_MEMORY` controls. They will prevent BitBake
555 from starting new tasks as long as thresholds are exceeded. Anyway,
556 as with :term:`BB_NUMBER_THREADS`, such controls won't prevent the
557 tasks already being run from using all CPU threads on the system
558 if :term:`PARALLEL_MAKE` is not set to a low value.
559
533 :term:`BB_SERVER_TIMEOUT` 560 :term:`BB_SERVER_TIMEOUT`
534 Specifies the time (in seconds) after which to unload the BitBake 561 Specifies the time (in seconds) after which to unload the BitBake
535 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how 562 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how