[distcc] Re: Simple autodiscovery of distcc servers

Daniel Kegel dank at kegel.com
Thu Aug 11 16:21:12 GMT 2005


Jeremy Glazman wrote:
> This is a great idea, I have been working on a similar scheme, but the
> problem I encountered is properly setting the -j# flag at compile time. How
> would you let your Makefile's know how many servers are available in this
> dynamic setup?

I won't.  It turns out that always using -j10 works well
for me, no matter how many servers there are, as long
as it's more than five or so.

> Here was my solution: I am running a distcc/ccache farm using samba shares
> for a distributed cache. Samba messages inherently provide info like
> hostname, IP address, etc., and also supports running a script after a
> message is received, so using these features...
> 
> 1) machine boots up, init script tells a machine designated as the hub that
> it is available for compiling (via samba messages)

That's beyond the scope of my idea.  I should have
mentioned that the distcc servers in my scheme
are centrally administered.  How they end up in
DNS with aliases distcc1, distcc2, etc. is up to
the administrator.

> 3) addresses are distributed and stored in the distcc hosts file

That's actually against the spirit of my idea.
In my scheme, there essentially *is* no distcc hosts file
anymore (beyond the initial line --autodiscover-distccN);
it's not needed, since it contains the
entirely predictable contents distcc1, distcc2, distcc3, ...

So our ideas are not very similar after all, but they're
not incompatible.  Users could pick one, or the other, or neither,
as appropriate for their situation.
- Dan


More information about the distcc mailing list