ref-manual: Updates to the "Speeding Up the Build" section

I applied a little more information to this section to help
round out the variable explanations.  Part of the change involved
adding PARALLEL_MAKEINST to the list of scaled variables.
I had left that variable off.  Also added a new trade-off.

(From yocto-docs rev: 3d85d5385c03841c17dd33afb94c110edc12170f)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2015-05-05 09:12:26 -07:00 committed by Richard Purdie
parent e05c636bc8
commit 26f9777c64
1 changed files with 41 additions and 25 deletions

View File

@ -914,42 +914,51 @@
<para> <para>
Build time can be an issue. Build time can be an issue.
By default, the build system uses three simple controls to try and By default, the build system uses simple controls to try and maximize
maximize build efficiency: build efficiency.
In general, the default settings for all the following variables
result in the most efficient build times when dealing with single
socket systems (i.e. a single CPU).
If you have multiple CPUs, you might try increasing the default
values to gain more speed.
See the descriptions in the glossary for each variable for more
information:
<itemizedlist> <itemizedlist>
<listitem><para> <listitem><para>
<link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link> <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename>:</link>
The maximum number of threads BitBake simultaneously executes.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<ulink url='&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS'><filename>BB_NUMBER_PARSE_THREADS</filename></ulink> <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS'><filename>BB_NUMBER_PARSE_THREADS</filename>:</ulink>
The number of threads BitBake uses during parsing.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link> <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename>:</link>
Extra options passed to the <filename>make</filename> command
during the
<link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
task in order to specify parallel compilation on the
local build host.
</para></listitem>
<listitem><para>
<link linkend='var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename>:</link>
Extra options passed to the <filename>make</filename> command
during the
<link linkend='ref-tasks-install'><filename>do_install</filename></link>
task in order to specify parallel installation on the
local build host.
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
These three variables all scale to the number of processor cores As mentioned, these variables all scale to the number of processor
available on the build system. cores available on the build system.
This auto-scaling ensures that the build system fundamentally takes For single socket systems, this auto-scaling ensures that the build
advantage of potential parallel operations during the build system fundamentally takes advantage of potential parallel operations
based on the build machine's capabilities. during the build based on the build machine's capabilities.
</para> </para>
<para> <para>
If you need to achieve even faster builds than what the build system Following are additional factors that can affect build speed:
produces by default, you can consider and implement some of the
following:
<itemizedlist> <itemizedlist>
<listitem><para>
<filename>BB_NUMBER_THREADS</filename>,
<filename>BB_NUMBER_PARSE_THREADS</filename>, and
<filename>PARALLEL_MAKE</filename>:
As previously mentioned, the build system scales the values
for these variables so you should probably not override
these to try to speed up a build.
However, for completeness regarding this list, it is worth
mentioning that you can manually override these variables
by setting them in your <filename>local.conf</filename> file.
</para></listitem>
<listitem><para> <listitem><para>
File system type: File system type:
The file system type that the build is being performed on can The file system type that the build is being performed on can
@ -981,7 +990,9 @@
helps. helps.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
Using <filename>/tmp</filename> as a temporary file system: Using <filename>tmpfs</filename> for
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
as a temporary file system:
While this can help speed up the build, the benefits are While this can help speed up the build, the benefits are
limited due to the compiler using limited due to the compiler using
<filename>-pipe</filename>. <filename>-pipe</filename>.
@ -1013,6 +1024,11 @@
Aside from the previous list, you should keep some trade offs in Aside from the previous list, you should keep some trade offs in
mind that can help you speed up the build: mind that can help you speed up the build:
<itemizedlist> <itemizedlist>
<listitem><para>
Remove items from
<link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
that you might not need.
</para></listitem>
<listitem><para> <listitem><para>
Exclude debug symbols and other debug information: Exclude debug symbols and other debug information:
If you do not need these symbols and other debug information, If you do not need these symbols and other debug information,