[distcc] distcc/ccache?? cache management in a distcc environment.

Martin Pool mbp at sourcefrog.net
Fri Jun 3 21:22:17 GMT 2005

On  3 Jun 2005, David Weeks <dkmw at earthlink.net> wrote:
> Hello again.
> Continuing with my earlier question, I now ask how distcc and ccache 
> interact.  I'm assuming at this point that the client/server 
> relationship of distcc solves potential recurssion problems within 
> distcc operations.  In other words, I assume it is the distcc client 
> that distrubutes service requests to distcc daemons, yet the daemons 
> themselves NEVER distrubute service request, delivering to the compiler 
> instead, and routing the compilied binary back to the requesting host.

That's correct.

> So I now wonder about the utilization of ccache.  It seems to me that 
> the originating host ought to first que its compile list to its own 
> ccache, and where there is a miss, perhaps then que the job to a remote 
> host.  When the remote host receives the service request, it too should 
> examine its ccache, and build only when necessary.  Regardless of which 
> host eventually compiles an object, the originating host ALWAYS get's 
> the completed list of objects.

That might be nice, but that's not what's done at the moment.  The
cache is strictly used before distribution.  If you want a shared
cache (which can be a good thing) you should use a network filesystem
to sahre it.

> Is there any state management of ccache 
> at this point?  I don't know how ccache determines freshness, but I'm 
> sure it is some comparision of source code, say a check sum?  Or is it a 
> make function?  I don't know, but would like to.

There is a hash; see the ccache documentation as Jeremy said.


More information about the distcc mailing list