Speeding up BitBake builds

OpenEmbedded builds usually take lot of time as not everyone has build machines with multiple CPUs (or multi-core CPUs). But how to make them faster and make better use of multiple CPU cores?

Solution is in two BitBake variables:

  1. PARALLEL_MAKE — this is passed to make so setting it to “-j X” is handy (where value of X depends on number of CPU cores)
  2. BB_NUMBER_THREADS — amount of BitBake threads used to run tasks such as do_fetch, do_configure, do_compile etc. Do not set too big value or machine will melt and you will loose control over it ;)

Which values are sane? On Core2Quad I use “-j 4″ and 16 BitBake threads. On dual core Athlon64 I use less threads (only 4) but this machine is also my desktop so I like to be able to work :) Sometimes I have two builds locally running with those settings and it is still usable.

How to check which one are good for you? Run htop on one console and builds on another. If CPU cores are busy and it does not hit swap too often then it is OK.

3 thoughts on “Speeding up BitBake builds

  1. Mani

    Where should I put these configurations to be applied globally? I tried bitbake.conf in bitbake folder but it seems that it is not working.

Comments are closed.

No Trackbacks.