Bug 2528

Summary: A bitbake build should automatically use all cores.
Product: [Build System, Metadata & Runtime] BitBake Reporter: Randy MacLeod <randy.macleod>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Low CC: evadeflow, poky.bs.watcher, poky.watcher, sgw, srifenbark
Version: 1.3   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard: 21 March 2014: Reset documentation flag to "Done"
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Randy MacLeod 2012-06-01 14:41:08 UTC
bitbake or rather poky requires that the user specify the number of jobs and the number of packages to build in parallel. The default should be determined automatically. Furthermore if the user specifies too many jobs and tasks, the oom-killer can be invoked. There should be a mechanism to automate fairly optimal builds. 

On some smaller systems, we've seen the oom-killer run even with packages = 4, jobs =4 for example. In that case it was the qemu package that was always killed. We were able to use the make option: -l [load], --load-average[=load]
     Specifies that no new jobs (commands) should be started 
     if there are others jobs running and the load average is 
     at least load (a floating-point number). 
to get a fast but controlled build. Perhaps bitbake should also monitor the load average to decide is additional packages should be started.
Comment 1 Richard Purdie 2012-10-08 08:15:25 UTC
*** Bug 3246 has been marked as a duplicate of this bug. ***
Comment 3 Scott Rifenbark 2014-03-21 12:37:56 UTC
Hi, 

The documentation portion of this bug is fixed.  Two instances within the manual set were adjusted to reflect the fix.

http://www.yoctoproject.org/docs/1.6/yocto-project-qs/yocto-project-qs.html#building-image

http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-PARALLEL_MAKE

The variable glossary for BB_NUMBER_THREADS had already been changed to reflect the new default.

I am setting the documentation flag to "Done".

Scott