SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?)?
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.
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.
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?
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.