<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 3, 2020 at 5:26 PM Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2020-04-04 07:57, Joel Sherrill wrote:<br>
> How does rtems-bsp-builder calculate the amount of parallelism to use?<br>
<br>
The option is documented here ...<br>
<br>
<a href="https://docs.rtems.org/branches/master/user/tools/bsp-builder.html#cmdoption-jobs" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/user/tools/bsp-builder.html#cmdoption-jobs</a><br>
<br>
and is ...<br>
<br>
  --jobs<br>
<br>
  The jobs options where the format is build-jobs/make-jobs. The default<br>
  is 1/num-cores where num-cores is the operating system reported number<br>
  of cores.<br></blockquote><div><br></div><div>What's the definition of build job vs make job?</div><div><br></div><div>Is make jobs equivalent to N in make -jN?</div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> I ask because I have realized that I selected jobs=6/12 on a very beefy <br>
> machine with 12 cores and 32 GB RAM. The main test machine I use is 8 <br>
> cores/32 GB RAM. But the slowest ones are old with 4 cores/4 GB RAM. <br>
> They are hitting the swap space. All have SSDs.<br>
> <br>
> Should I drop the --jobs parameter? Will the script select a decent load <br>
> automatically? The machines are essentially dedicated to testing.<br>
<br>
You will need a --jobs option or the machine will not be fully loaded. <br>
You need to find a balance between the number of parallel BSPs that are <br>
built at once and the number of parallel build jobs each BSP makes runs.<br>
<br>
The critical factor is the amount of bootstrap and configure time. This <br>
is a single core task and if you use the default a lot of the build time <br>
the machine is basically idle.<br></blockquote><div><br></div><div>But if you go too high, the number of compiles will swamp a machine </div><div>without a huge amount of memory. So the 4 core/4 GB machines </div><div>probably would be something like --jobs=2/4. if that's two bsp builds</div><div>in parallel with a -j4.</div><div><br></div><div>That generally gives you a 2x factor on processes which is close</div><div>to the old school rule of the -jN number should be between 1.5 and </div><div>2 times the number of cores as long as the RAM and disk subsystem</div><div>could handle it. That tends to overlap IO and computation.</div><div><br></div><div>Maybe the default should be (roundup(cores)/2) instead of 1.</div><div><br></div><div>Temporarily I may have to add a jobs option to my script and hand-tune</div><div>it to the machines I am testing on.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
There is no way I know of to automatically find this balance for all the <br>
different types of host machines.<br>
<br>
Chris<br>
</blockquote></div></div>