Changeset a334dd2a for introduction/important
- Timestamp:
- 02/13/2022 06:24:50 PM (2 years ago)
- Branches:
- 11.1, 11.2, 11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 8e305cf
- Parents:
- dfe5714
- git-author:
- Pierre Labastie <pierre.labastie@…> (02/13/2022 06:19:19 PM)
- git-committer:
- Pierre Labastie <pierre.labastie@…> (02/13/2022 06:24:50 PM)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
introduction/important/building-notes.xml
rdfe5714 ra334dd2a 207 207 <screen><userinput>make -j2</userinput></screen> 208 208 209 <para> 210 If you have applied the optional <command>sed</command> when building 211 <application>ninja</application> in LFS, you can use: 212 </para> 213 214 <screen><userinput>export NINJAJOBS=2</userinput></screen> 215 216 <para> 217 when a package uses <command>ninja</command>, or just: 218 </para> 219 220 <screen><userinput>ninja -j2</userinput></screen> 221 222 <para> 223 but for ninja, the default number of jobs is <N>+2, where <N> 224 is the number of processors available, so that using the above commands 225 is rather for limiting the number of jobs (see below for why this could 226 be necessary). 227 </para> 228 209 229 <para>Generally the number of processes should not exceed the number of 210 230 cores supported by the CPU. To list the processors on your … … 212 232 </para> 213 233 214 <para>In some cases, using multiple process ors may result in a 'race'234 <para>In some cases, using multiple processes may result in a 'race' 215 235 condition where the success of the build depends on the order of the 216 236 commands run by the <command>make</command> program. For instance, if an … … 223 243 <para>If this occurs, the best way to proceed is to drop back to a 224 244 single processor build. Adding '-j1' to a make command will override 225 the similar setting in the MAKEFLAGS environment variable.</para> 245 the similar setting in the <envar>MAKEFLAGS</envar> environment 246 variable.</para> 226 247 227 248 <note><para>When running the package tests or the install portion of the … … 231 252 that are difficult to debug.</para></note> 232 253 254 <important> 255 <para> 256 Another problem may occur with modern CPU's, which have a lot of cores. 257 Each job started consumes memory, and if the sum of the needed 258 memory for each job exceeds the available memory, you may encounter 259 either an OOM (Out of Memory) kernel interrupt or intense swapping 260 that will slow the build beyond reasonable limits. 261 </para> 262 263 <para> 264 Some compilations with <command>g++</command> may consume up to 2.5 GB 265 of memory, so to be safe, you should restrict the number of jobs 266 to (Total Memory in GB)/2.5, at least for big packages such as LLVM, 267 WebKitGtk, QtWebEngine, or libreoffice. 268 </para> 269 </important> 233 270 </sect2> 234 271
Note:
See TracChangeset
for help on using the changeset viewer.