Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300740 - Separate distcc and non-distcc MAKEOPTS variables
Summary: Separate distcc and non-distcc MAKEOPTS variables
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 15:55 UTC by Phil Stracchino (Unix Ronin)
Modified: 2013-12-08 09:58 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Stracchino (Unix Ronin) 2010-01-12 15:55:21 UTC
Portage has fairly extensive support for using distcc, including the ability to create ebuilds (such as gcc) that will not use distcc even if enabled.  However, when an ebuild that is set to not use distcc is merged on a system set up for distcc, the MAKEOPTS setting for distcc is still honored, which can  result in a very high system load on a system configured for distcc.  (For example, on my Gentoo hosts, I use MAKEOPTS="-j2" when not using distcc, but MAKEOPTS="-j13" with distcc.)

I propose the addition of a DISTCC_MAKEOPTS variable which, if set, would be used in place of MAKEOPTS when and only when emerging with distcc.  Builds that disable distcc would continue to use MAKEOPTS, and for backward compatibility, MAKEOPTS would be used as a fallback if DISTCC_MAKEOPTS was not set.

Reproducible: Always
Comment 1 Werner M. Mayer 2010-01-17 19:24:52 UTC
  I can confirm this bug and would like to ask the development team to
  add this feature in the next update to distcc, if possible and not too
  of an effort to ask for.
Comment 2 Brett Coady 2010-07-02 13:55:04 UTC
A good workaround for this issue is to have: MAKEOPTS="-j13 -l2"
This ensures the load on the local machine only goes to 2 and if available will use 13 threads.
Comment 3 Phil Stracchino (Unix Ronin) 2010-07-02 16:22:05 UTC
(In reply to comment #2)
> A good workaround for this issue is to have: MAKEOPTS="-j13 -l2"
> This ensures the load on the local machine only goes to 2 and if available will
> use 13 threads.


Excellent point.
Comment 4 Rasmus Thystrup Karstensen 2011-02-09 08:53:13 UTC
> (In reply to comment #2)
> > A good workaround for this issue is to have: MAKEOPTS="-j13 -l2"
> > This ensures the load on the local machine only goes to 2 and if available will
> > use 13 threads.
> 
> 
> Excellent point.
> 

This deserves a note in the gentoo distcc docs.

I still think there is room for improvement in handling of the MAKEOPTS variable. As an alternative to DISTCC_MAKEOPTS portage could determine the -j? value from the entries in /etc/distcc/hosts.

on a side note I miss a RC_NEED variable in make.conf as I prefer not adding distccd to default on my laptop. This could also be used by people keeping portage in a squashfs image
Comment 5 Kalin KOZHUHAROV 2013-12-08 09:58:42 UTC
Excellent info in comment 4! Now testing it...

If that is it, can we probably check a bit the documentation and mark it FIXED.

I just added some info to the Wiki: https://wiki.gentoo.org/wiki/Distcc#Setting_up_Portage_to_use_Distcc