[yocto] [feature request] avoid getting the server stuck because of high "-j" value

Alexander Kanavin alexander.kanavin at linux.intel.com
Fri Aug 4 04:54:22 PDT 2017


On 08/04/2017 01:58 PM, Gianfranco Costamagna wrote:

> recently I found a really nice make feature, that tunes at runtime the number of parallel
> 
> execution jobs, according to the current system load [1].
> 
> 
> I think such a feature would be really nice on server were multiple yocto builds are run in parallel,
> 
> and when people forgets to put the correct number of parallel build jobs.
> 
> 
> E.g., a number around CPU+1 is nice, but sometimes CPU*2 gives better results.
> 
> Unfortunately if somebody else starts a build in parallel, that CPU*2 locks really hard the server, specially
> 
> when building qt-based projects (e.g. qtbase, qtwebengine).

If the cause of the slowdown with qt stuff is that RAM is fully 
utilized, and swap has to be taken into use, does checking load average 
help with that? My understanding is that it does not. You simply have to 
introduce per-recipe limits:

PARALLEL_MAKE_pn-qtwebengine  = "-j 8"


Also, many projects are moving away from makefiles towards ninja build 
system, which does not have support for -l at all.


Alex



More information about the yocto mailing list