Improved default for number of build jobs
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.