[distcc] Suggestion about host selection

Nils Klarlund klarlund at google.com
Thu Jun 19 16:17:33 GMT 2008


O
>
>
>>    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.
>>
>> ..

>
> I don't think Thomas has misread the code: I understand he says the same
> thing as you.
> But distcc's man page says: "distcc  prefers hosts towards the start of the
> list, so machines should be listed in descending order of speed."
>
> I understand this statement the same way as Thomas, that is: host0_slot0,
> host0_slot1, host0_slot2, host1_slot0, host1_slot1, ....
> which is not what the actual code does.
>
>
If this was the way it was done, it'll lead to poor utilization of servers
in some situations: the number of concurrent jobs accepted at the servers is
2 greater than their number of CPUs. So, the client would fill the first
server with more jobs than in can handle at the same time before even
considering the second server. (Remember that the slot mechanism on the
client does not take into account which servers other clients have
reserved.)

On the other hand, the statement 'prefers hosts towards the start of the
list' is very much true in the aggregate when you have multiple concurrent
clients using the servers!  Then you should consider using the --randomize
flag, which probably should have been the default setting anyway.

The major omission in the current code, in my opinion, is that randomization
does not take into account the specified host slots.

/Nils
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the distcc mailing list