Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MAKEOPTS values
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
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5923

PostPosted: Wed Oct 06, 2010 8:38 pm    Post subject: MAKEOPTS values Reply with quote

The Gentoo handbook says that a general rule-of-thumb for MAKEOPTS is the number of CPUs + 1. So if I have a 6-core Phenom II, I should set MAKEOPTS="-j7", right?
_________________
Gentoo Studio
Gentoo Studio in open beta. Feedback wanted.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9593
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Oct 06, 2010 8:48 pm    Post subject: Reply with quote

Yes, that's the general rule. The goal, however, is to start enough compiles so that you have all your cores working on something but don't cause virtual memory thrashing. Start wih the "general rule" number; then, if you see idle cores, increase the number; if you see thrashing, then decrease it.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5923

PostPosted: Wed Oct 06, 2010 9:25 pm    Post subject: Reply with quote

Thanks, John. 8)
_________________
Gentoo Studio
Gentoo Studio in open beta. Feedback wanted.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6048

PostPosted: Wed Oct 06, 2010 10:27 pm    Post subject: Reply with quote

you better set the job options too.

- the makeopts = number of gcc i can run when building one program
- the jobs = number of programs i'm allow to build at the same time.


So the makeopts = 0 benefits if the make file only have 1 file to build (it's rarely the case, but you'll see it's also rarely the case a makefile "could" run more than 5 gcc at the same time, because many files depend on previous ones build in order to be process

And the jobs = 0 benefits if you have only 1 program to build, and of course max when doing emerge -e world

EMERGE_DEFAULT_OPTS="-j6"
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5923

PostPosted: Thu Oct 07, 2010 12:35 am    Post subject: Reply with quote

EMERGE_DEFAULT_OPTS looks like a nice feature!
_________________
Gentoo Studio
Gentoo Studio in open beta. Feedback wanted.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11533

PostPosted: Thu Oct 07, 2010 2:39 am    Post subject: Reply with quote

krinn wrote:
So the makeopts = 0 benefits if the make file only have 1 file to build (it's rarely the case, but you'll see it's also rarely the case a makefile "could" run more than 5 gcc at the same time, because many files depend on previous ones build in order to be process
This depends heavily on the build system. Some build systems are poorly written and get very little parallelism. Others specify dependencies that allow make a great deal of freedom, and can spin off one gcc per file that needs compilation, even if that means more than a dozen parallel compiler processes.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5923

PostPosted: Thu Oct 07, 2010 1:12 pm    Post subject: Reply with quote

It looks like my new machine has no trouble with parallel compilations. Emerge seems very zippy even with several compiles going on at once.
_________________
Gentoo Studio
Gentoo Studio in open beta. Feedback wanted.
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


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

PostPosted: Thu Oct 07, 2010 5:33 pm    Post subject: Reply with quote

I'm using that setup for almost 2 years now with my Intel QuadCore Q9550:

Code:

MAKEOPTS="-j5 -l5"
EMERGE_DEFAULT_OPTS="--jobs=5 --load-average=5.0 --with-bdeps y"
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5923

PostPosted: Thu Oct 07, 2010 5:40 pm    Post subject: Reply with quote

Can you describe what those args mean?
_________________
Gentoo Studio
Gentoo Studio in open beta. Feedback wanted.
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


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

PostPosted: Thu Oct 07, 2010 7:26 pm    Post subject: Reply with quote

I took that from Zac Medico :P

The only thing that I know, is that when I compile, all my core are working and installing a basic KDE takes only 52 minutes on my box :P

--with-bdeps y is there to make sure that I compile every deps, so when I emerge -auDNv @world, often I have more packages to build and rebuild.

--jobs=5 --load-average=5.0 is equal to my # of core + 1.

-l5 is an option that Zac Medico documented a while ago. It's a make options.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Oct 07, 2010 7:31 pm    Post subject: Reply with quote

audiodef,

On my Phenom II X3, I use -j5 and --jobs=3. It rarely gets to 6 jobs running and 4G RAM in use.
I have /var/tmp/portage in shmfs too

I have my eye on the X6 upgrade but I have to do a BIOS upgrate to get it to work.
_________________
Regards,

NeddySeagoon

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
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Thu Oct 07, 2010 8:24 pm    Post subject: Reply with quote

d2_racing wrote:
I took that from Zac Medico :P
The only thing that I know, is that when I compile, all my core are working and installing a basic KDE takes only 52 minutes on my box :P

8O
Well I admit I took this from my... grand-mother only ! :P
However...
I launch simultaneoulsly my boeuf-bourguignon and my emerge kde-meta and mplayer.
And kde-meta build is achieved before my boeuf-bourguignon !
That is why I can exactly tell with the best precision and exactitude that It takes less than 1 hour for KDE to be built on my only-duo core + j3 only !
Well... I admit that... the music can be finished earlier when Martha Argerich is playing !
A shame ! Is'nt it ?

I can accept that your 4 cores are working but... as a matter of fact... what do they actually do ?
Watching the time they spend ? :twisted:
Or do you get low-power-low-cost ram ?


Last edited by aCOSwt on Thu Oct 07, 2010 9:07 pm; edited 5 times in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5923

PostPosted: Thu Oct 07, 2010 8:29 pm    Post subject: Reply with quote

NeddySeagoon wrote:


I have my eye on the X6 upgrade but I have to do a BIOS upgrade to get it to work.


From what I'm seeing here, totally worth it!
_________________
Gentoo Studio
Gentoo Studio in open beta. Feedback wanted.
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