On Sat, Sep 1, 2012 at 8:20 PM, Brian Harring <ferri...@gmail.com> wrote: > On Fri, Aug 31, 2012 at 11:12:44AM -0400, Alexis Ballier wrote: >> On Fri, 31 Aug 2012 15:45:21 +0100 >> Ciaran McCreesh <ciaran.mccre...@googlemail.com> wrote: >> >> > On Fri, 31 Aug 2012 10:21:15 +0200 >> > Ulrich Mueller <u...@gentoo.org> wrote: >> > > Coming back to this old topic [1]. Is there still consensus that we >> > > should have such an EJOBS variable? (It shouldn't be called JOBS >> > > because this name is too generic, see the old discussion.) Then we >> > > could add it to EAPI 5. >> > > >> > > Ulrich >> > > >> > > [1] >> > > <http://archives.gentoo.org/gentoo-dev/msg_750e33f68b16d971dff1f40dd9145e56.xml> >> > >> > If we're doing this, do we tell users to stop setting MAKEOPTS for >> > EAPIs 5 and greater? >> >> How can this work ? I cant think of any simple solution. >> >> > Do we change the name of MAKEOPTS for EAPIs 5 and >> > greater instead? Do we put fancy code in the package mangler to deal >> > with it? >> >> IMHO EAPI-5 compliant PMs should do MAKEOPTS="$MAKEOPTS -j$EJOBS" for >> every EAPI; using EJOBS from ebuilds/eclasses is allowed only in EAPI 5 >> and greater. >> This is retroactive but could be classified 'PM internals' so its fine >> imho. > > This approach is fine imo, although I'd *potentially* look at adding a > magic $PROC_COUNT var that is the # of cpu threads on the system; > either that or defaulting jobs to it. > > I rather dislike requiring users to go jam a 2/4/8 in there when it's > easy to compute. That said, it's minor.
On this point, I use dynamic load-based job counting. I'd be using distcc, too, but I don't have the spare hardware for a second build box right now. For a single box, I target a load average of $PROC_COUNT, with a max jobs in the vicinity of 2x$PROC_COUNT, to prevent I/O hangs from causing job count explosions. (Where I/O hiccups aren't a concern, I've found leaving --jobs open-ended worked fine, but builds always eventually expand to consume available I/O as upstream things get larger) I find this works very well; emerge and make both manage to lurk near the optimum point of keeping the CPU busy without spending too much time in context switches. In a distcc context, I would most likely target a load average of $LOCAL_PROC_COUNT, with a max jobs of (2*$LOCAL_PROC_COUNT+$REMOTE_PROC_COUNT). If ebuilds are try to be more aware of parallel-build contexts, I think it's important they're not limited to static job counts. -- :wq