[distcc] Suggestion about host selection

Fergus Henderson fergus at google.com
Thu Jun 19 16:03:11 GMT 2008


On Wed, Jun 18, 2008 at 7:22 AM, <thomas at schuerger.com> wrote:

> Hi,
>
> when given a list of hosts in DISTCC_HOSTS, e.g.
>
> DISTCC_HOSTS="host1/6 host2/2 host3/3"
>
> The documentation states that the hosts are given priority as specified,
> so host1 is the preferred host. I looked at the distcc code and was
> surprised to find that this "list of preference" is interpreted somewhat
> differently than I expected.
>
> Each time distcc looks for an available host (or rather, a slot on an
> available host), it scans the list of slots from left to right and uses
> the first free slot it finds.
>
> The host list above actually means (hostname_slotnumber):
>
> host1_1 host2_1 host3_1 host1_2 host2_2 host3_2 host1_3 host3_3 host1_4
> host1_5 host1_6


Right you are.  Please accept my apologies for misinterpreting your email
the first time around.


> I had expected this:
>
> host1_1 host1_2 host1_3 host1_4 host1_5 host1_6 host2_1 host2_2 host3_1
> host3_2 host3_3
>
> It would be good if there was an option in distcc to change the
> host selection code so that the second interpretation is used.


That does sound like it might be a good idea.

It would be a lot more convincing if you had some benchmark numbers to back
it up.

Do you want to make a patch which changes the host selection code as you
described,
and measure the effect on the speed of your builds?


> And it would be good if this selection would be covered a little more
> detailed in the documentation.
>

That also sounds like a good idea.  As usual, patches welcome :)

Cheers,
  Fergus.
-- 
Fergus Henderson <fergus at google.com>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the distcc mailing list