Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dynamic MAKEOPTS with emerge --jobs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Dennis Nedry
n00b
n00b


Joined: 09 Aug 2008
Posts: 7

PostPosted: Sun Apr 05, 2009 8:38 pm    Post subject: Dynamic MAKEOPTS with emerge --jobs Reply with quote

Greetings to all.

I'm just wondering... Is there any way to have a dynamic MAKEOPTS when emerging with --jobs (parallel emerge)?

Basically, I'm on a 8-core machine (2x QC). I find that it is often faster to compile things with MAKEOPTS at -j2 and emerge --jobs 8, which usually pegs the machine at near 100% utilization. Since it's emerging 8 things at once, the time it takes for things to configure prior to make is significantly reduced (I find that configure takes up a good portion of emerge time).

So MAKEOPTS="-j2" and emerge --jobs 8 fully utilizes the machine wonderfully.

The thing is, sometimes emerge --jobs 8 eventually gets to a bridge where ~40 or 50 things need to be emerged, but they all depend on a specific package being present first- so the box will land up compiling one package with MAKEOPTS="-j2", which isn't very efficient.

Is there any way to have emerge dynamically set MAKEOPTS depending on the number of parallel emerges taking place? I would imagine it would be something like a --maxmakeopts=16 emerge arg or something. When combined with --jobs, emerge would automatically divide maxmakeopts/jobs (assuming it's >=1), which would yield your final MAKEOPTS value for said builds (ie, with maxmakeopts at 16, and 4 jobs, each job would be assigned a MAKEOPTS of -j4... With maxmakeopts at 16 and one job, then that job would be assigned MAKEOPTS of -j16).

Does a feature like this exist? Have I missed it somewhere?

-DN
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Mon Apr 06, 2009 2:23 am    Post subject: Reply with quote

If I were you, I'd ignore the emerge --jobs part, and just do makeopts with -j and the load average limiter.
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Apr 06, 2009 3:24 am    Post subject: Reply with quote

In fact, it will be more safe :P
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Mon Apr 06, 2009 4:38 am    Post subject: Reply with quote

Dennis Nedry wrote:
I'm just wondering... Is there any way to have a dynamic MAKEOPTS when emerging with --jobs (parallel emerge)?
Not easily. The hard way involves nontrivial patching.
Dennis Nedry wrote:
Does a feature like this exist?
No.
Dennis Nedry wrote:
Have I missed it somewhere?
Not as a feature announcement.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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