discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parallel Compilation with gnustep-make


From: David Chisnall
Subject: Re: Parallel Compilation with gnustep-make
Date: Mon, 23 Feb 2009 12:53:11 +0000

On 23 Feb 2009, at 12:48, Fred Kiefer wrote:

I tried your first version, where you had to ask for the parallel build
more verbosely, and even on my single processor machine it appeared to
be about 10% faster. This could have been an error in my measurement,
though.

The general rule of thumb for parallel make is either number of CPUs + 1, or number of CPUs * 1.5, depending on who you ask. In a sequential make, you have a lot of time when the CPU is idle, waiting for I/O, typically at the start and end of each compilation step.

With a parallel make, you want enough floating processes that, when one is waiting for I/O, another can be given CPU time. For GNUstep programs, which are often composed of short, easy-to-compile, sources, you may find -j3 or even -j4 is faster on a single-processor system. Doing a sequential make of EtoileFoundation on my (slow) machine gives these numbers:

real    0m13.089s
user    0m5.777s
sys     0m5.862s

This means that the CPU spent 1.45 seconds, or around 11% of the time, either doing unrelated things (unlikely - nothing else was running) or waiting for I/O during this build. The maximum speed-up I would expect from parallel compilation here is around 10%. With more CPUs, faster CPUs, or slower disks, the speedup will be more.

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]