[distcc] How to involve the localhost too?

Martin Pool mbp at samba.org
Thu Oct 24 01:20:01 GMT 2002


On 22 Oct 2002, Alexander.Farber at nokia.com wrote:

> THE TESTS:
> 
> 1) just bolinux47 (2 Xeons x 2.4 GHz, 2 GB RAM) alone
> 
> gmake -j4
> 
> 2758.920u 530.290s 52:27.22 104.5%      0+0k 0+0io 5109641pf+0w
> 2) master: bolinux47 (2 Xeons x 2.4 GHz, 2 GB RAM)  
> 	 + bolinux11 (1 Xeon 1.7 GHz, 512 MB RAM)
> 
> gmake -j4 CC:="distcc tcc"
> 
> 2364.220u 578.200s 1:04:12.25 76.3%     0+0k 0+0io 7328091pf+0w
> 3) master: bolinux47 (2 Xeons x 2.4 GHz, 2 GB RAM) 
> 	 + bolinux11 (1 Xeon 1.7 GHz, 512 MB RAM)
>          + bolinux54 (1 Xeon 1.7 GHz, 256 MB RAM)
> 
> gmake -j8 CC:="distcc tcc"  	(zipped logfile attached)
> 
> 2219.740u 616.770s 37:46.94 125.1%      0+0k 0+0io 5508460pf+0w
> 4) master: bolinux47 (2 Xeons x 2.4 GHz, 2 GB RAM) 
> 	 + bolinux11 (1 Xeon 1.7 GHz, 512 MB RAM)
>          + bolinux54 (1 Xeon 1.7 GHz, 256 MB RAM)
> 
> gmake -j8 CC:="distcc tcc" C++:="distcc tcpp"
> 
> 2254.010u 614.740s 38:25.19 124.4%      0+0k 0+0io 5526475pf+0w
> 5) master: bolinux47 (2 Xeons x 2.4 GHz, 2 GB RAM) 
> 	 + bolinux11 (1 Xeon 1.7 GHz, 512 MB RAM)
>          + bolinux54 (1 Xeon 1.7 GHz, 256 MB RAM)
>          + boccm03 (2 Xeons x 2.4 GHz, 2 GB RAM) 
> 
> gmake -j16 CC:="distcc tcc" C++:="distcc tcpp"
> 
> 2196.920u 672.730s 29:41.13 161.1%      0+0k 0+0io 5528266pf+0w

What actual DISTCC_HOSTS were you using for these cases?  Did ordering
make a difference?  Depending on your Makefile, it might.

The best would probably be

 DISTCC_HOSTS='boccm03 bolinux54 bolinux11 localhost'

i.e. fastest machine first, and localhost last.  Don't list the local
machine's name, say "localhost", otherwise it will try to make a tcp
connection to it.  (That is possibly not a very obvious setup.)

> Also I have one QUESTION: would it be possible to utilize
> distcc for generating *.d files, with something like:
> 
> 	gmake -j8 CPP:="distcc gcc -E"

distcc always runs the preprocessor locally, which is why it doesn't
need to worry about header files being the same on all machines.  So
you could say that and it would work fine, but it would not be any
faster.

In addition, running cpp is really cheap compared to running the
compiler itself, so even if it was distributed, it might be
uneconomical.

> PS: One gotcha: first I used 
> 
>          gmake CC="distcc tcc" C++="distcc tcpp"

That is interesting.  

This may be why people often call it $(CXX) not $(C++).

> 
>     but gmake hadn't really overriden the C++
>     variable (it probably thought, I mean C+ +=). 

>     So you have to use C++:="distcc tcpp" or 
>     maybe: env "C++=distcc tcpp" gmake

As the GNU Make manual says, settings in the environment are
overridden by settings in the Makefile.  So if your makefile says 

  C++ = tcpp

then setting it in the environment will not help.

-- 
Martin 



More information about the distcc mailing list