[OE-core] [PATCH] local.conf.sample: Add automatic defaults for BB_NUMBER_THREADS and PARALLEL_MAKE

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Tue Feb 4 18:00:24 UTC 2014


Mark Hatle <mark.hatle-CWA4WttNNZF54TAoqtyWWQ at public.gmane.org> writes:

>>> I've noticed that after 4 threads IO becomes a big bottleneck when
>>> you have things like webkit, qt, asio etc in the buildqueue. Combine
>>> that with issues like every make -j thread taking >2GB ram with asio
>>> and webkit this default seems a bit high. I'd use 0.5*numcpu with a
>>> lower bound of 2.
>>
>> limitting the load mitigates this (high i/o increases it); e.g.
>>
>> PARALLEL_MAKE = "\
>>    ...
>>    -l ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100} \
>> "
>
> FYI, I think this points out the variability in system performance,
> between CPU, RAM and I/o.
>
> As it stands the patch gives my machine the best performance.  So I
> like it as it is.

Point of my posting was not the exact scale (I just copied a piece of
my ~/.bitbake.conf), but using '-l' in addition to '-j'.  Doing heavy
i/o or being low on RAM (which causes swapping) increases the load and
'make' will throttle then.


> No setting is going to make everyone happy but something has to be
> better then defaulting to '1'.

That's true; but not due to performance gain but because it will help to
detect races in the build process.


Enrico



More information about the Openembedded-core mailing list