summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/dev-manual-start.xml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/dev-manual/dev-manual-start.xml')
-rw-r--r--documentation/dev-manual/dev-manual-start.xml160
1 files changed, 0 insertions, 160 deletions
diff --git a/documentation/dev-manual/dev-manual-start.xml b/documentation/dev-manual/dev-manual-start.xml
index 201cbe7340..d8726b4857 100644
--- a/documentation/dev-manual/dev-manual-start.xml
+++ b/documentation/dev-manual/dev-manual-start.xml
@@ -1080,166 +1080,6 @@
1080 </section> 1080 </section>
1081</section> 1081</section>
1082 1082
1083<section id='speeding-up-the-build'>
1084 <title>Speeding Up the Build</title>
1085
1086 <para>
1087 Build time can be an issue.
1088 By default, the build system uses simple controls to try and maximize
1089 build efficiency.
1090 In general, the default settings for all the following variables
1091 result in the most efficient build times when dealing with single
1092 socket systems (i.e. a single CPU).
1093 If you have multiple CPUs, you might try increasing the default
1094 values to gain more speed.
1095 See the descriptions in the glossary for each variable for more
1096 information:
1097 <itemizedlist>
1098 <listitem><para>
1099 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename>:</ulink>
1100 The maximum number of threads BitBake simultaneously executes.
1101 </para></listitem>
1102 <listitem><para>
1103 <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS'><filename>BB_NUMBER_PARSE_THREADS</filename>:</ulink>
1104 The number of threads BitBake uses during parsing.
1105 </para></listitem>
1106 <listitem><para>
1107 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename>:</ulink>
1108 Extra options passed to the <filename>make</filename> command
1109 during the
1110 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
1111 task in order to specify parallel compilation on the
1112 local build host.
1113 </para></listitem>
1114 <listitem><para>
1115 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename>:</ulink>
1116 Extra options passed to the <filename>make</filename> command
1117 during the
1118 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
1119 task in order to specify parallel installation on the
1120 local build host.
1121 </para></listitem>
1122 </itemizedlist>
1123 As mentioned, these variables all scale to the number of processor
1124 cores available on the build system.
1125 For single socket systems, this auto-scaling ensures that the build
1126 system fundamentally takes advantage of potential parallel operations
1127 during the build based on the build machine's capabilities.
1128 </para>
1129
1130 <para>
1131 Following are additional factors that can affect build speed:
1132 <itemizedlist>
1133 <listitem><para>
1134 File system type:
1135 The file system type that the build is being performed on can
1136 also influence performance.
1137 Using <filename>ext4</filename> is recommended as compared
1138 to <filename>ext2</filename> and <filename>ext3</filename>
1139 due to <filename>ext4</filename> improved features
1140 such as extents.
1141 </para></listitem>
1142 <listitem><para>
1143 Disabling the updating of access time using
1144 <filename>noatime</filename>:
1145 The <filename>noatime</filename> mount option prevents the
1146 build system from updating file and directory access times.
1147 </para></listitem>
1148 <listitem><para>
1149 Setting a longer commit:
1150 Using the "commit=" mount option increases the interval
1151 in seconds between disk cache writes.
1152 Changing this interval from the five second default to
1153 something longer increases the risk of data loss but decreases
1154 the need to write to the disk, thus increasing the build
1155 performance.
1156 </para></listitem>
1157 <listitem><para>
1158 Choosing the packaging backend:
1159 Of the available packaging backends, IPK is the fastest.
1160 Additionally, selecting a singular packaging backend also
1161 helps.
1162 </para></listitem>
1163 <listitem><para>
1164 Using <filename>tmpfs</filename> for
1165 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
1166 as a temporary file system:
1167 While this can help speed up the build, the benefits are
1168 limited due to the compiler using
1169 <filename>-pipe</filename>.
1170 The build system goes to some lengths to avoid
1171 <filename>sync()</filename> calls into the
1172 file system on the principle that if there was a significant
1173 failure, the
1174 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
1175 contents could easily be rebuilt.
1176 </para></listitem>
1177 <listitem><para>
1178 Inheriting the
1179 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-rm-work'><filename>rm_work</filename></ulink>
1180 class:
1181 Inheriting this class has shown to speed up builds due to
1182 significantly lower amounts of data stored in the data
1183 cache as well as on disk.
1184 Inheriting this class also makes cleanup of
1185 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
1186 faster, at the expense of being easily able to dive into the
1187 source code.
1188 File system maintainers have recommended that the fastest way
1189 to clean up large numbers of files is to reformat partitions
1190 rather than delete files due to the linear nature of
1191 partitions.
1192 This, of course, assumes you structure the disk partitions and
1193 file systems in a way that this is practical.
1194 </para></listitem>
1195 </itemizedlist>
1196 Aside from the previous list, you should keep some trade offs in
1197 mind that can help you speed up the build:
1198 <itemizedlist>
1199 <listitem><para>
1200 Remove items from
1201 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
1202 that you might not need.
1203 </para></listitem>
1204 <listitem><para>
1205 Exclude debug symbols and other debug information:
1206 If you do not need these symbols and other debug information,
1207 disabling the <filename>*-dbg</filename> package generation
1208 can speed up the build.
1209 You can disable this generation by setting the
1210 <ulink url='&YOCTO_DOCS_REF_URL;#var-INHIBIT_PACKAGE_DEBUG_SPLIT'><filename>INHIBIT_PACKAGE_DEBUG_SPLIT</filename></ulink>
1211 variable to "1".
1212 </para></listitem>
1213 <listitem><para>
1214 Disable static library generation for recipes derived from
1215 <filename>autoconf</filename> or <filename>libtool</filename>:
1216 Following is an example showing how to disable static
1217 libraries and still provide an override to handle exceptions:
1218 <literallayout class='monospaced'>
1219 STATICLIBCONF = "--disable-static"
1220 STATICLIBCONF_sqlite3-native = ""
1221 EXTRA_OECONF += "${STATICLIBCONF}"
1222 </literallayout>
1223 <note><title>Notes</title>
1224 <itemizedlist>
1225 <listitem><para>
1226 Some recipes need static libraries in order to work
1227 correctly (e.g. <filename>pseudo-native</filename>
1228 needs <filename>sqlite3-native</filename>).
1229 Overrides, as in the previous example, account for
1230 these kinds of exceptions.
1231 </para></listitem>
1232 <listitem><para>
1233 Some packages have packaging code that assumes the
1234 presence of the static libraries.
1235 If so, you might need to exclude them as well.
1236 </para></listitem>
1237 </itemizedlist>
1238 </note>
1239 </para></listitem>
1240 </itemizedlist>
1241 </para>
1242</section>
1243</chapter> 1083</chapter>
1244<!-- 1084<!--
1245vim: expandtab tw=80 ts=4 1085vim: expandtab tw=80 ts=4