[distcc] Suggestion about host selection

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


>
> Where is that flag? Randomized selection sounds good. What about
> using an exponential distribution, which prefers slots towards the
> start of the list? Would be easy to implement.
>

See the disttc(1) of distcc 3.0 or

  http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html

this is one of the patches we've used at Google for some time.

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

OK, that would be something to change then.
>
> It would be fine if one could list a host multiple times (which would
> emulate the behavior I was looking for). This is not possible currently.
>
> The easiest way for a better selection implementation would be to
> first expand the host/slotcount list to a list of host/slotnumber
> pairs and then select
>
> a) linearly from the front
> b) with exponential random distribution
> c) with uniform random distribution
> d) ... what ever else may seem appropriate
>
> I think that simply interpreting the slotnumber as a weight for a uniform
distribution is all what's needed in practice.

To really improve scheduling for smaller installations there's is probably
other more important low-hanging fruit such as the enjoyed-host logic that
disables the selection of a host for a couple of minutes -- whatever the
reason for compilation failure is.

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


More information about the distcc mailing list