Project

General

Profile

Bug #64

Improved default for number of build jobs

Added by Jeppe Toustrup about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Start date:
2010-08-21
Due date:
% Done:

100%

Estimated time:
Difficulty:
Tags:

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

build-jobs.patch (1.01 KB) build-jobs.patch Jeppe Toustrup, 2010-08-21 11:34 AM

History

#2

Updated by Jeppe Toustrup about 9 years ago

I forgot to mention that I have tested this on both X86 and SPARC with correct results.

#3

Updated by Jeppe Toustrup about 9 years ago

  • Assignee set to Jeppe Toustrup
  • % Done changed from 0 to 100

Approved by Garrett D'Amore.
Included in r13157.

#4

Updated by Jeppe Toustrup about 9 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF