I was experimenting quite a bit with this in:
https://github.com/shr-project/test-oe-build-time/commits/results e.g.:
https://github.com/shr-project/test-oe-build-time/commit/d5111f4472ac397c0f1197eb6366ac7d2e56453f
https://github.com/shr-project/test-oe-build-time/commit/e97d8fe55fcf848416a8494a90da4ae6418b19fe

but be aware that reasonable BB_PRESSURE_MAX_ values are different for
kirkstone and master, see:
https://lists.openembedded.org/g/bitbake-devel/message/15499
which wasn't merged yet.

And for my system and typical builds BB_PRESSURE_MAX_* isn't able to
prevent OOMK, because pressure is still fine when bitbake is starting
chromium.do_compile and nodejs.do_compile tasks at the same time and OOMK
gets triggered later even when only these 2 tasks are running in parallel
with other tasks not started thanks to BB_PRESSURE_MAX_*.

So I'm setting a bit lower PARALLEL_MAKE for chromium instead as in:
BB_PRESSURE_MAX_CPU = "200000"
BB_NUMBER_THREADS = "8"
BB_NUMBER_PARSE_THREADS = "64"
PARALLEL_MAKE = "-j 70 -l 140"
PARALLEL_MAKE:pn-qtwebengine = "-j 40"
PARALLEL_MAKE:pn-webruntime = "-j 40"

which works well for my system and my typical builds, YMMV for yours.

Regards,

On Wed, Nov 29, 2023 at 10:21 AM Robert P. J. Day <rpj...@crashcourse.ca>
wrote:

>
>   a colleague is using Wind River Linux and is getting occasional OOM
> errors when taking advantage of maximum parallelism, so he took the
> quick way out and dialed things back using BB_NUMBER_THREADS and
> PARALLEL_MAKE.
>
>   however, i am aware of the bitbake variables
> BB_PRESSURE_MAX_{IO,CPU,MEMORY} and was wondering if there is a decent
> writeup on how to use, perhaps, BB_PRESSURE_MAX_MEMORY, to dynamically
> detect imminent OOM and adjust things. that is, how to calculate a
> sane value for that as i haven't yet dug into the values under
> /proc/pressure and how to interpret them?
>
>   i've seen mentions of combining the above with the "memstat"
> command, and other approaches. thoughts?
>
> rday
>
> p.s. is there a docs page that expands on this stuff?
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61773): https://lists.yoctoproject.org/g/yocto/message/61773
Mute This Topic: https://lists.yoctoproject.org/mt/102868689/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to