[distcc] some questions

Martin Pool mbp at samba.org
Mon Sep 30 03:43:00 GMT 2002


On 29 Sep 2002, Amir Tal <tal at whatsup.org.il> wrote:
> hi 
> 
> i was wondering if you can answer some of those questions for me :
> 
> i installed distcc on my home network (4 machines).
> as for now, i am compiling most of the things on my workstation, and running 
> distccd on another server to test performance.
> 
> 1) i noticed that when you start a make proccess, the remote distccd recieves 
> 10-15 connections from my host (which is good) and those proccesses die after 
> a while. this is a long compilation (kdelibs) and after the initial 
> proccesses die, i cannot see any new one's coming in. is this normal ?
> it seems as if after a while (2-3 minuets) distcc stops working and only my 
> local gcc is still compiling.

It sounds like something is wrong.  You'll need to look at the distcc
and inetd log file on the server to find out what's happening.  

If you're running distccd from inetd, then it may be that inetd thinks
that the service is "looping" because of all the rapid connections.
You need to increase the maximum connection rate.  See the inetd
manual.  Alternatively, run distccd with --daemon, rather than from
inetd.

> 2) another machine i want to add to this "cluster" is my firewall. its not a 
> very powerfull one, but it can help speed things up a little more ;)
> are there any knows security issues with distcc ? how stupid will it be to run 
> it on a server that acts as a firewall ?

It depends on your security profile, but it's not completely
unreasonable.  Hopefully your firewall already has iptables and
tcpwrappers protection against connections from the outside world.
Just make sure that nobody else can connect to the distccd port.
> 
> 3) in my machine, i've added to my .bashrc :
> 
> export CC=/usr/local/bin/distcc
> export cc=/usr/local/bin/distcc
> export DISTCC_HOSTS='192.168.0.2 localhost'
> 
> if i want to add another host to DISTCC_HOSTS, what will be the manner that 
> distcc will access the remote servers ? if the entry will be :
> 
> export DISTCC_HOSTS='192.168.0.1 192.168.0.2 localhost', then it will try to 
> distribute the jobs in that order, or is there any other method it uses ?

It will go roughly in that order, but it is not tightly defined.  In
practice after the first few jobs it will be aparently random as
distcc adapts to the speed of each machine.

> also, is this the only way to set prioroty ?

At the moment, yes.

> 4)when starting a compilation, the howto says to use -j8 .
> is this optimal ? anything else i should be using for better
> performance ?

You should use about twice the total number of CPUs available, but it
depends on your network, program being compiled, available memory,
etc.

Experiment with different values.

> all the machines run debian linux, gcc 2.9.5 . (btw - are there any issues 
> about upgrading to 3.2 ?)

2.95 and 3.2 work fine for me on Sid.

-- 
Martin 



More information about the distcc mailing list