[bitbake-devel] [PATCH 2/2] runqueue: Introduce load balanced task spawning

Alexander Kanavin alex.kanavin at gmail.com
Tue Aug 14 09:18:36 UTC 2018


2018-08-14 11:05 GMT+02:00 Andreas Müller <schnitzeltony at gmail.com>:
>> I wonder if you've experimented with the opposite approach, ie
>> spawning fewer tasks when CPU load is very high? If a single
>> do_compile task can fully load all CPUs, not running other tasks in
>> parallel with it (especially another do_compile) might give some
>> benefit?
>>
>> Dynamically boosting and dynamically lowering BB_NUMBER_THREADS based
>> on overall CPU load both seem like logical things to do.
>
> I think the patch does this of you interpret parameters differently.
> So if you use BB_NUMBER_THREADS = 10 currently and want to go down to
> 2 in case heavy load set
>
> BB_NUMBER_THREADS = 2
> BB_NUMBER_THREADS_LOW_CPU = 10

Right, then that's quite useful! Is it also possible to detect the low
RAM situation?

Perhaps it's better to rename the parameters to BB_NUMBER_THREADS_MIN
and BB_NUMBER_THREADS_MAX? Then bitbake would run tasks within the
range, with the aim of keeping the CPU loaded, but not overloaded.
There could even be reasonable defaults: number of cores/threads for
MAX, and 2 for MIN.

Alex



More information about the bitbake-devel mailing list