Make parallisation (was Re: [fpc-devel] New less verbose compilation of trunk)

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Sat Jan 19 11:54:17 CET 2013


Apologies for reviving an old thread, but I've been reinstalling Debian 
on one of may larger systems and rebuilding FPC on it.

Sven Barth wrote:
> Am 07.03.2012 13:51, schrieb Graeme Geldenhuys:
>> On 7 March 2012 12:27, Marco van de Voort wrote:
>>>
>>> IIRC add  FPMAKEOPT='-T 3'   (3= number of paralel threads)

What version did this start working with- 2.6 or 2.7?

>> I use the following when I recompile a new FPC. Recommendation (on the
>> internet) was to always use a -j value one greater than your number of
>> cores.

That recommendation goes back to "mainframe shops", and is based on the 
premise that CPUs are expensive and it's best to keep them busy. My 
experience (from kernel builds etc.) suggests that there's little if any 
advantage attempting to parallelise beyond the number of CPUs, and 
there's rarely any advantage going beyond 8 since that tends to saturate 
the cache/bus bandwidth.

Using a test that I've run for years on a wide range of systems, and 
noting that these are from Suns which might not scale quite the same as PCs,

Two-CPU system:

Job count: 1
real    1m40.216s
user    0m42.423s
sys     1m4.216s

Job count: 2
real    1m10.183s
user    0m43.903s
sys     0m59.856s

Job count: 3
real    1m9.460s
user    0m44.787s
sys     1m0.524s

Job count: 4
real    1m9.618s
user    0m45.883s
sys     0m59.880s


Twelve-CPU system:

Job count: 1
real    1m39.623s
user    1m8.568s
sys     0m55.355s

Job count: 2
real    0m52.394s
user    1m9.072s
sys     0m58.828s

Job count: 3
real    0m36.387s
user    1m10.608s
sys     0m58.600s

Job count: 4
real    0m28.359s
user    1m11.712s
sys     0m59.476s

Job count: 5
real    0m23.438s
user    1m12.893s
sys     0m58.936s

Job count: 6
real    0m20.338s
user    1m12.825s
sys     0m58.256s

Job count: 7
real    0m18.658s
user    1m13.021s
sys     0m57.944s

Job count: 8
real    0m17.824s
user    1m12.509s
sys     0m58.556s

Job count: 9
real    0m17.210s
user    1m12.593s
sys     0m59.168s

Job count: 10
real    0m16.808s
user    1m12.589s
sys     0m59.764s

Job count: 11
real    0m16.531s
user    1m12.385s
sys     1m0.324s

Job count: 12
real    0m16.599s
user    1m13.093s
sys     0m59.652s

Job count: 13
real    0m16.584s
user    1m13.557s
sys     0m59.536s

Job count: 14
real    0m16.713s
user    1m12.629s
sys     1m0.624s

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-devel mailing list