Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
distcc - how to use?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
giocitta
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2013
Posts: 79
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Mar 23, 2017 9:59 am    Post subject: distcc - how to use? Reply with quote

Hi all, I'm again here for a (for me!) unsolvable problem, hoping to receive - as always happened in Gentoo's forums - a positive help. Following the Gentoo's wiki "Distcc" I found many dark spots.

In my local network I have two PCs, both starring Gentoo: 192.168.1.102 (the slowest one, Intel i5 Haswell); 192.168.1.110 (the fastest one, Intel i7 Sandybridge). Both have the same gcc; both have in make.conf FEATURES="distcc", and -march=haswell or sandybridge, respectively.
The fastest (192.168.1.110) should be my server, and the slowest my client (whose software I would like to compile through portage's emerge into the fastest).

In both I installed and started distcc. In the client I set MAKEOPTS="-j25 -l4"; in the server I maintained -j9 -l8.
In the server's /etc/config.d/distccd I set DISTCCD_OPTS="--port 3632 --log-level notice --log-file /var/log/distccd.log -N 15 --allow 192.168.1.102".
Checking with "ps -ef | grep distccd", and with "netstat -an | grep 3632", distccd is running, and port 3632 is listening.
Anyhow, when in the client I emerge a package (for example, firefox), its compilation takes place only in the local machine. In the server machine there is no active firewall.

I tried to start iptables to control if port 3632 is accepted, but received this answer: First create some rules then run again!
I tried: "iptables -I INPUT 7 enp5s0 -p tcp -s 192.168.1.102/110 --dport 3632 -j ACCEPT", but I always get as answer: invalid mask.

Should I set into the client "/usr/bin/distcc-config --set-hosts 192.168.1.110" ?
Where is my error? Better, where are my errors? Could someone suggest me the correct procedure?

Many advanced thanks from an half-newbie: Giorgio Cittadini.
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Thu Mar 23, 2017 10:19 am    Post subject: Re: distcc - how to use? Reply with quote

giocitta wrote:

Should I set into the client "/usr/bin/distcc-config --set-hosts 192.168.1.110" ?

Yes, just like it says there https://wiki.gentoo.org/wiki/Distcc#Specifying_participating_hosts .
_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Thu Mar 23, 2017 10:37 am    Post subject: Reply with quote

giocitta,

A few things. The client does not need to run distccd.
On the client, two settings are important

Code:
FEATURES="distcc"
which you have. This tells portage to use distcc.

The content of
Code:
/etc/distcc/hosts

On my weaker system, I have
Code:
192.168.100.20/8,cpp,lzo


I have only one helper. Its at 192.168.100.20 and is allowed to run /8 jobs. The default is /4
I forget what ,cpp does.
lzo says to use compression. This allows distcc pump mode to be used, so that distcc can help out with the ./configure step too.
The default setting of /etc/distcc/hosts is localhost, so distcc works but compile everything locally. Check your setting there.

If localhost is not in this file, it will still be used as a fallback.
Hosts in this file are used in the order that they appear, so if localhost is there at all, it should be at the end of the list.

On the client, you can run
Code:
DISTCC_DIR="/var/tmp/portage/.distcc/" distccmon-text 5
while emerge runs in another terminal, to see what is being built where.
Only compile jobs are distributed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
giocitta
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2013
Posts: 79
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Mar 23, 2017 3:17 pm    Post subject: Reply with quote

To the attention of NeddySeagoon:

Could you explain to me how to translate into my situation
"I have only one helper. Its at 192.168.100.20 and is allowed to run /8 jobs. The default is /4" ?

I also have only one helper. It is at 192.168.1.110, and since it has an i7 CPU, it is normally allowed to run 9 jobs. Should I maintain this value or set 8 cores x2 +1, i.e. 17 ?

Thanks
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Thu Mar 23, 2017 6:17 pm    Post subject: Reply with quote

giocitta,

Try it. See how busy the helper system is.
At 192.168.1.110/17 you may find that the bottleneck is the client or the network. You may not get 17 jobs to the helper at the same time.
Do not let the helper run into using swap.

If you only write 192.168.1.110, that's the same as writing 192.168.1.110/4.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
giocitta
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2013
Posts: 79
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Mar 23, 2017 6:36 pm    Post subject: Reply with quote

Thanks, SeaGoon,

your help has been important. Now everything seems to work. Some packages are fully compiled locally, for example firefox; other packages in mixed form localhost/192.168.1.110.
I think this is normal, and probably it is impossible to exclude at all the client (localhost).
I'm more than satisfied.
Thanks to all Gentoo's helpers!
Giorgio Cittadini
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum