On 29/11/2023 12:06, Peter Humphreey wrote:
The contribution of distcc isn't clear to me yet, as I said before. Sometimes
it's the bee's knees; other times it might just as well not be there. I don't
like mysteries... 🙂

As far as I'm aware, there's no mystery. On a single machine you get the exact same thing ... it's all down to parallelism.

Make asks itself "how many separate tasks can I do at the same time, which won't interfere with each other". In gcc's case, the answer appears to be two. It doesn't matter how much resource is available, make can only make use of two cores.

In other cases, there may be a hundred separate tasks, make fires off a hundred tasks shared amongst all the resource it can find, and sits back and waits.

Think of a hundred compile jobs all running at the same time, but then the linker is invoked, and you can only have the one linker running, after all the compile jobs have finished.

And this is a HARD problem, I haven't seen it recently, but there used to be plenty of threads about hard-to-debug compile failures that went away with -j1. The obvious cause was two compile jobs being set off in parallel, when in reality one depended on the other, and things messed up.

Cheers,
Wol

Reply via email to