[distcc] Re: multiple CPUs?

Martin Pool mbp at samba.org
Fri Sep 20 14:45:01 GMT 2002

On 20 Sep 2002, Gerhard Kutzelnigg <gerry at kutzelnigg.de> wrote:
> Hi Martin,
> to make distcc distribute more than once to a single volunteer with many CPUs 
> I have put localhost1 localhost2 localhost3 localhost4 in the /etc/hosts as a 
> reference to localhost. In DISTCC_HOSTS I have the above hosts as remote 
> targets, although all on the same machine.
> Is there any other way to tell distcc to distribute jobs to volunteers which 
> have more than one CPU?

As you might know, distcc tries to spread load evenly across machines
in the list.  So if you run make -j6 with three machines, they will
get roughly two jobs each.  In most systems it is not too bad to run
say twice as many compilers as you have CPUs, because they might block
for IO sometimes.

This falls down when you have, say, a quad processor machine and a
single-processor machine.  I plan to address this in a future release
by allowing a limit on the number of concurrent jobs, or on the
maximum load average.  Something like

  distccd --nice 10 --max-proc 4

The client will then just keep feeding jobs out until each of the
machines wants no more.

At the moment the workaround you describe is probably best.  First of
all though, I would just try listing all the machines once -- does
that really do badly?  What configuration do you have?


More information about the distcc mailing list