Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
-j make switch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
StrCrssd
n00b
n00b


Joined: 17 Apr 2002
Posts: 68
Location: McAllen, TX USA

PostPosted: Tue May 28, 2002 10:23 pm    Post subject: -j make switch Reply with quote

Where is the setting that allows multiple processors to be used during compiling? This would normally be make -j x where x is (#of processors+1).

I haven't been able to locate a place to put this switch?

--StrCrssd
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Tue May 28, 2002 10:39 pm    Post subject: Reply with quote

look in /etc/make.globals ... MAKEOPTS="-j2" you can probably override it from /etc/make.conf but I haven't tried it. Hope this helps,

Cya lX
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
Curious
Bodhisattva
Bodhisattva


Joined: 13 May 2002
Posts: 395
Location: Sydney, Australia

PostPosted: Wed May 29, 2002 2:53 am    Post subject: Re: -j make switch Reply with quote

StrCrssd wrote:
Where is the setting that allows multiple processors to be used during compiling? This would normally be make -j x where x is (#of processors+1).


Hi... you might be interested, but this doesn't have to necessarily be related to the number of processors you have. The -j switch controls how many compile processes you spawn - so yeah, it's usually best to have 1 per processor, +1 to soak up any spare cycles, but there are circumstances where you might want to run more in parallel, even on a uniprocessor. :-)

Regards,
Curious.
_________________
Are you down with the Hawk?
Back to top
View user's profile Send private message
StrCrssd
n00b
n00b


Joined: 17 Apr 2002
Posts: 68
Location: McAllen, TX USA

PostPosted: Wed May 29, 2002 6:41 am    Post subject: RE: # of processes Reply with quote

Actually I already knew that but needed to get the question posted quickly. :)
Back to top
View user's profile Send private message
lasa
n00b
n00b


Joined: 17 May 2002
Posts: 63
Location: Stockholm, Sweden

PostPosted: Wed May 29, 2002 8:49 am    Post subject: Reply with quote

I entered MAKEOPTS="-j3" in my make.conf on my dual system and I can confirm that it overrides the setting in make.globals.

-lasa-
Back to top
View user's profile Send private message
id10t
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2002
Posts: 100

PostPosted: Wed May 29, 2002 12:52 pm    Post subject: Reply with quote

Don't forget that buliding in parallel breaks some things...

Safer/easier to do

alias make="make -j4"; emerge foo

When you need/want it...
_________________
---
this space for rent
Back to top
View user's profile Send private message
tgnb
Apprentice
Apprentice


Joined: 16 Apr 2002
Posts: 208
Location: New York, NY

PostPosted: Wed May 29, 2002 6:14 pm    Post subject: dual Reply with quote

Actually from what i have read at 2cpu.com -j 16 is supposedly the sweet spot for compiling the kernel (and presumably other things). The number after -j according to them determines the amount of simultaneous threads that get executed. The article can be found here:

http://www.2cpu.com/OSs/Linux/kerneltweak.html

I have also read about -j 16 being the sweet spot elsewhere but i dont remember where.

---

Thanks StrCrssd i'll try out your tip next time.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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