Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question about distcc
View unanswered posts
View posts from last 24 hours

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

Joined: 21 Aug 2015
Posts: 127

PostPosted: Mon Apr 29, 2019 4:34 pm    Post subject: Question about distcc Reply with quote

I am planning to go back to Gentoo. I just temporarily moved to Ubuntu, but really, while it is faster to install, it gives me problems I have never had on Gentoo. Anyway, I am planning to use my desktop PC to compile the biggest packages at least (it has an i5-3570k CPU, while my laptop has an i7-8550U - in terms of compilation time, my laptop is probably faster :mrgreen: )
Now, I have been reading the Wiki page on distcc. However, I am not sure how to proceed exactly. Here, it says:
A common strategy is to
  • set the value of N to twice the number of total (local + remote) CPU cores + 1, and
  • set the value of M to the number of local CPU cores

The use of -lM in the MAKEOPTS variable will prevent spawning too many tasks when some of the distcc cluster hosts are unavailable (increasing the amount of simultaneous jobs on the other systems) or when an ebuild is configured to disallow remote builds (such as with gcc). This is accomplished by refusing to start additional jobs when the system load is at or above the value of M.

Suppose I didn't want to use my local machine at all: then, shall I set -l0?

Thank you in advance.
Desktop: i5-3570k - 2x4 GB - Sapphire HD 7950 Dual-X - 500 GB WD Caviar Black - Dell SE2717H 27"
Laptop: HP EliteBook 850 G5 - i7-8550U - 1x16GB - Intel UHD 620 - 512 GB Samsung NVMe SSD
Phone: OnePlus 5T - SD835 - 8 GB - Adreno 540 - 128 GB
Back to top
View user's profile Send private message

Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Mon Apr 29, 2019 4:52 pm    Post subject: Reply with quote

Inevitably there are some compilations which cannot be distributed, then -l option comes into play and restricts local load. Do not include localhost in distcc hosts if you want everything possible distributed.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message

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

PostPosted: Mon Apr 29, 2019 5:05 pm    Post subject: Reply with quote


That wiki page reminds me of the Hitchhikers Guide to the Galaxys entry for Earth - "Mostly harmless".

There are several things to take into account.
The MAKEOPTS on the client sets the number of parallel make jobs that can be in flight an any one time, regardless of where they get compiled.

What you put in /etc/distcc/hosts on the client controls how jobs are distributed to helpers.
If localhost does not appear there, then the client is only used for compiling when jobs either fail on helpers or no helpers are available.
man distcc

Its a good thing to use -l to restrict the CPU load on the client but its not foolproof.

As well as counting cores for setting MAKEOPTS, think about RAM. Large C++ jobs can require 2G RAM per make thread.
If you have a 8 core helper with only 4G RAM, you don't want to send in much more than 3 jobs so it doesn't swap, or worse, fail, so the client has to try the build.

distcc only works for C or C++ programs. Firefox and friends use Rust, so distcc won't help.
A few things, e.g. gcc will not use distcc either.


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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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