View previous topic :: View next topic |
Author |
Message |
giocitta Tux's lil' helper
Joined: 11 Dec 2013 Posts: 79 Location: Località Cheirasca, 21 -15066 Gavi (AL)
|
Posted: Thu Mar 23, 2017 9:59 am Post subject: distcc - how to use? |
|
|
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 |
|
|
massimo Veteran
Joined: 22 Jun 2003 Posts: 1226
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Thu Mar 23, 2017 10:37 am Post subject: |
|
|
giocitta,
A few things. The client does not need to run distccd.
On the client, two settings are important
which you have. This tells portage to use distcc.
The content of
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 |
|
|
giocitta Tux's lil' helper
Joined: 11 Dec 2013 Posts: 79 Location: Località Cheirasca, 21 -15066 Gavi (AL)
|
Posted: Thu Mar 23, 2017 3:17 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Thu Mar 23, 2017 6:17 pm Post subject: |
|
|
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 |
|
|
giocitta Tux's lil' helper
Joined: 11 Dec 2013 Posts: 79 Location: Località Cheirasca, 21 -15066 Gavi (AL)
|
Posted: Thu Mar 23, 2017 6:36 pm Post subject: |
|
|
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 |
|
|
|
|
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
|
|