To unload the c and cpp compilation from a weak (or a single) machine to a (or more) more powerful machine(s) there is the package distcc. On gentoo emerge distcc on all machines involved.

However all machines should use the same gcc x.x.* versions.

There is also a pump mode that should increase speed by factor 3 to 10. It can be used as pump emerge -u world

It contains a daemon distccd that has to be run on both computers and a config file /etc/conf.d/distcc check that the IP addresses involved are not restricted. The daemon gets usually started on system start therefore it is added with rc-update add distccd default and since no reboot has been don it needs now be started manually with rc-config start distccd or the old fashion but transparent way with /etc/init.d/distccd start

On the client /etc/portage/make.conf needs

MAKEOPTS="-j<n> -l<m>"

j<n> is probably already there, now n has to be increased to two times all CPU's (local and remote) involved +1. This might cause a problem on the local machine in case the powerful remote machine is not available therefore set l<n> to

distcc-config --get-hosts reads /etc/distcc/hosts to see the list of machines used. To add hosts do dist-config --set-hosts "" or edit /etc/distcc/hosts. means that also the local host should participate in the compilation.

To monitor what is going on on the text console distccmon-text <n> where n is an optional parameter and is the number of seconds it repeats. For a gui run distccmon-gui

To monitor Portage's distcc usage you can use:

DISTCC_DIR="/var/tmp/portage/.distcc/" distccmon-text <n>

DISTCC_DIR="/var/tmp/portage/.distcc/" distccmon-gui

DISTCC_DIR="" distccmon-gnome

watch -n1 DISTCC_DIR="/var/tmp/portage/.distcc/" distccmon-text

It might happen that both machines require different compilers (different CHOST) https://wiki.gentoo.org/wiki/Distcc, cd /usr/lib/distcc/bin ls -l shows the mapping of the compilers used.

Linurs Servernest startpage