Bug #64
Improved default for number of build jobs
100%
Description
The current algorithm for setting the number of build jobs is like this:
Physical CPUs * 2 + 2
This would work fine on a dual core machine, but for machines with more cores it will not take full advantage of the processing power available. This is especially true for SPARC T2 machines, where a maximum of 3 jobs would be started, even though the machine could have 64 threads.
The following patch changes the calculation to:
Logical CPUs + 2
which also counts SPARC threads and hyperthreading cores. The +2 is to raise the minimum amount of jobs spawned to 3, and to compensate for IO which the CPU may wait for.
Files
Updated by Jeppe Toustrup over 10 years ago
- File build-jobs.patch build-jobs.patch added
Patch attached
Webrev: http://cr.illumos.org/view/vb1m2ybn/
Updated by Jeppe Toustrup over 10 years ago
I forgot to mention that I have tested this on both X86 and SPARC with correct results.
Updated by Jeppe Toustrup over 10 years ago
- Assignee set to Jeppe Toustrup
- % Done changed from 0 to 100
Approved by Garrett D'Amore.
Included in r13157.