On Wed, Aug 14, 2024 at 12:15 PM Monsees, Steven C (US) via
lists.yoctoproject.org
<steven.monsees=baesystems...@lists.yoctoproject.org> wrote:
>
> Hello:
>
> I am looking for some clarity with regards too parallel builds under Yocto…
>
> I think I had a false assumption on setting PARALEL_MAKE…
>
> To increase thread usage: You add following to your local.conf inside the 
> build/conf directory. Replace x and y with your wanted configuration.
>
> PARALLEL_MAKE = "-j x"
>
>
>
> BB_NUMBER_THREADS = "y"
>
>
>
> Is the following true ?
>
>
>
> PARALLEL_MAKE defines how many threads should be used/dedicated when using 
> make -j command during do_compile.
>
>

seems correct.

>
> BB_NUMBER_THREADS defines number of threads dedicated for bitbake.

It means how many jobs/tasks can bitbake spawn in parallel, its higher
order than parallel make.

>
>
>
> I set up like so:
>
>
>
> There are 12 cores my board
>
>
>
> Yocto supporters say threads should be 2 times the number of cores, but don’t 
> go above 20…, or just the number cores, also under 20… depending on what you 
> read.
>
>
>
> They also say, increasing PARALLEL_MAKE to higher values, increases your 
> chance for a race condition.
>
>
>
> Is the following true ?
>
>
>
> PARALLEL_MAKE = "-j x"  # For do_compile
>
>
>
> BB_NUMBER_THREADS = "y"  # For bitbake
>
>
>
> PARALLEL_MAKEINST = "-j x"  # For do_install
>
>
>
> If so, does this mean for 12 cores:
>
>
>
> BB_NUMBER_THREADS="8", will this dedicate 8 cores just for bitbake to use ?

No, it will not reserve 8 cores, rather it tells bitbake to launch 8
task executions in parallel
if bitbake deems them not dependent upon each other, e.g. every recipe
has several tasks
during build do_confgure, do_compile, do_install etc. and there are
several recipes in build
queue, then bitbake's task manager can find out non-dependent tasks
and execute them
in parallel, now be aware that in some cases it could be executing 8
tasks which could be
all do_compile tasks for different recipes, in this case your
parallelism will become -j 8*8
systemwide.

>
>
>
> And does this dedicate the remaining 4 for do_compile and do_install ?
>
>
>
> PARALLEL_MAKE="-j 2"
>
> PARALLEL_MAKEINST="-j 2”
>
>
>
> Thank you…
>
>
>
> Steve
>
>
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#63700): https://lists.yoctoproject.org/g/yocto/message/63700
Mute This Topic: https://lists.yoctoproject.org/mt/107901352/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to