LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-03-2011, 03:30 PM   #1
portia
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 112

Rep: Reputation: 20
multiple jobs on a multicore processor


I've got an intel i7 920 CPU. It has 4 cores, but thanks to hyper threading technology each core could run 2 threads so in /proc/cpuinfo it shows "8 processors".

Now my questions are:

1. what would be the optimal -j flag when compiling programs on my CPU. I've come across -j7. Why 7?


2. Where and what would I put this flag to make it permanent (eg. .bashrc?)?

Gracias
 
Old 05-03-2011, 03:37 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
1) 7 in order to use all but one of the "cores", leaving a core free for other tasks to use. Another common suggestion would be to use 9 (cores + 1), and let the scheduler take care of everything.

2) Yep, you can put 'export MAKEFLAGS="-j5"' in your ~/.bashrc, that's one way to do it.
 
1 members found this post helpful.
Old 05-03-2011, 03:46 PM   #3
portia
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 112

Original Poster
Rep: Reputation: 20
Thanks a lot for your explanation.
 
Old 05-03-2011, 03:59 PM   #4
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
I prefer cores+3 myself to achieve saturation. Only really relevant with large numbers of small jobs. With small numbers of large jobs it just won't matter once you're at your core count.
 
Old 05-03-2011, 04:49 PM   #5
portia
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 112

Original Poster
Rep: Reputation: 20
I included the -j7 option, the problem is that when I was compiling wine the computer froze and then rebooted. I remember it happening some time ago when I added the -j7 flag to a slackbuild so I believe this is the direct reason for the crash. What does that mean? Do I need to lower the j number?
 
Old 05-03-2011, 04:55 PM   #6
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
The only time I've had a machine reboot during a compile was because the thing was overheating under the load due to poor cooling.
 
Old 05-03-2011, 06:04 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
The -j7 produces a heavy load while compiling. Since the i7 920 is a CPU with a thermal design power of 130W two things come two my mind that would cause a freeze and/or reboot.

1. The system overheats. This would more likely cause a shutdown then a freeze or reboot. Before shutting the system down the thermal protection should clock the CPU down and only as a last resort should power of the system.
2. The power supply is either wrong dimensioned or faulty.

So to find the error I would recommend to check your cooling system and have a look at the temperatures at heavy load. If the temperatures are OK check if the system will freeze/reboot when generating a heavy load other then compiling. If so, test the system with a different PSU.
 
Old 05-03-2011, 06:30 PM   #8
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,669

Rep: Reputation: 1367Reputation: 1367Reputation: 1367Reputation: 1367Reputation: 1367Reputation: 1367Reputation: 1367Reputation: 1367Reputation: 1367Reputation: 1367
Quote:
Originally Posted by portia View Post
I included the -j7 option, the problem is that when I was compiling wine the computer froze and then rebooted. I remember it happening some time ago when I added the -j7 flag to a slackbuild so I believe this is the direct reason for the crash. What does that mean? Do I need to lower the j number?
You could test your system stability with Prime95.
http://www.mersenne.org/freesoft/

This program will stress your system hard, so if your having stability problems you will find out pretty quick,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Get the Most Out of Your Multicore Processor LXer Syndicated Linux News 0 09-11-2009 08:40 PM
Under moderate load in a multicore system of 13 processors one processor gets 100% us praveen24 Linux - Kernel 7 09-03-2009 04:21 AM
multiple print jobs jeepster81 Linux - Software 2 02-27-2008 08:03 AM
Run all OS processes on one core in multicore processor tryon16 Linux - Kernel 6 10-02-2007 05:13 PM
LXer: ARM MPCore Multicore Processor Enables Next-Generation Triple-Play Gateway to the Home LXer Syndicated Linux News 0 10-23-2006 05:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration