distcc -- "A peer2peer distributed compiler" (Napster for C Programmers)
Copyright (C) 2002 by Martin Pool 

$Header: /data/cvs/distcc/README,v 1.3 2002/05/05 09:21:38 mbp Exp $




distcc is a compiler front end, similar to compilercache and ccache.
It's purpose is not to cache old object files, but rather to
distribute work across several machines on a network.

Unlike parallel build systems (dmake, pvmmake), distcc does not
require all the machines to share a filesystem, or even to have the
same libraries installed.  However, it is specific to C (and C++?)
compilation -- other actions will work normally but cannot be
distributed.

The code assumes GNU gcc, GNU Make and GNU libc, and probably Linux.
On the other hand, it tries not to be architecture-specific.

distcc makes no attempt to be secure, because security or access
control would detract from the high performance that is its reason for
being.  It should be used only on small networks where everybody with
access to the network is trusted to behave reasonably.

At the moment, the daemon can only run from inetd or some similar
program.  You should set it to run as a server on tcp port 4200.  It
can run as any user and should not run as root.

To tell distcc which compile hosts to use, you need to set the
DISTCC_HOSTS environment variable.  At the moment this is just a
space-separated list of hostnames, with the exception that the string
"localhost" (in lowercase) is treated specially.  Repeated hostnames
will make that host proportionally more likely to be chosen.  distcc
should always be called with "make -j", so that compilation can
proceed in parallel across several machines.  You should be generous
in the number of parallel jobs, because the distcc cannot queue
perfectly across all machines.  Using a -j value two or three times
the number of CPUs might work well.

For debugging, you can set the DISTCC_VERBOSE variable; if it's
non-null then you'll see quite a few log messages.

distcc requires these additional packages:

  popt
  tdb

Initial numbers, unfortunately only over a 10Mbps link:

To build rsync on toey alone:
  
real	0m28.286s
user	0m25.500s
sys	0m1.710s

with -j5

real	0m28.483s
user	0m25.840s
sys	0m1.620s

remotely, onto wistful:

real	0m29.550s
user	0m4.460s
sys	0m1.110s

with -j3 onto wistful:

real	0m18.642s
user	0m4.430s
sys	0m1.160s

with -j3 on "wistful wistful wistful localhost"
real	0m19.902s
user	0m9.110s
sys	0m1.490s

with -j6 on "wistful wistful wistful localhost"
real	0m21.701s
user	0m17.820s
sys	0m1.690s

for samba, locally, with no parallelism or ccache:


With the version of Sun Apr 28 23:24:00 EST 2002, building 2.4.18 from
toey onto 3xwistful.

make -j2 with plain gcc:

real	7m52.970s
user	7m6.240s
sys	0m21.350s


make -j6 with 1xlocalhost 3xwistful, plain distcc

real	3m56.004s
user	3m8.030s
sys	0m18.550s

