The purpose of distcc is to reduce elapsed time to build from a clean directory.
The most important result is elapsed time, measured by
time(1)
on the client machine.
Non-blank, non-comment physical lines of code are measured
using wc -l $(find . -name '*.[ch]')
.
One complete build is run before measurement to attempt to
minimize disk caching effect. make distclean
is
run between builds.
Machines used for testing:
Hewlett-Packard X2000 Linux workstations, 1x1GHz
Pentium IV, 1GB RAM, 1x20GB SCSI, Linux 2.4.18, Debian
GNU/Linux, ext3fs
, Debian's gcc-2.95.4.
anomic, jonquille and nevada are connected by a 10Mbps non-switched Ethernet hub.
Machines may be interactively used during testing but are generally lightly loaded.
The timebuild
script in the source directory (after
0.2) is used to repeatedly build programs for measurement.
More results using cvs head as of Wed May 15 17:44:47 EST 2002
Building samba head, using plain gcc on anomic:
time make:
time DISTCC_HOSTS='localhost jonquille nevada' make -j4
real 4m4.402s
user 3m41.120s
sys 0m13.460s
time make CC=gcc
real 7m15.747s
user 6m40.920s
sys 0m14.460s
Notes: Samba uses lots of header files in every source file, so the preprocessed source is very large, and it is also typically slow to compile on single machines.
Using distcc CVS on 20 May 2002, building glib-2.0.1
(100,911 lines in *.[ch]
).
autoconf-generated configure
scripts run compilations in
series, so represent a worst case for distcc. When
jonquille is the first nominated host, all work
will be done remotely, and the configure
script
runs 4.34s (26%) slower. When localhost is first,
all work is done locally and the overhead of running through
distcc is 0.68s (4%) elapsed time.
Note that using distcc should never make any difference to the results of the configure script, assuming that all the installed compilers behave equivalently.