make -j optimization
Brendan
mailinglist at endosquid.com
Thu Sep 30 13:48:45 EDT 2004
On Thursday 30 September 2004 13:42, David Kramer wrote:
> In GNU make, you can specify a -j <n> option, to run <n> commands
> simultaneously. This is good.
>
> I'm having an argument with a coworker over whether specifying a value for
> <n> greater than the number of the processors in the system actually does
> any good or not. I don't see how it can. In fact, specifying one fewer
> than the number of processors shoudl have almost the same performance as
> specifying the number of processors.
I'm sure other know much more than I do, but with 2 processors, we always used
-j3, because if one thread is waiting for something (input, i/o, whatever)
then the 3rd process comes in and balances it back out.
There are loads of benchmarks on this, so googling might be your best bet.
More information about the Discuss
mailing list