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 03-09-2014, 06:22 AM   #16
genss
Member
 
Registered: Nov 2013
Posts: 747

Rep: Reputation: Disabled

Quote:
Originally Posted by Martinus2u View Post
on a side note, with a decent CPU scheduler like BFS it is totally sufficient to say
+1 is for file access, since the cpu has that little part of total time (partially) free
 
Old 03-09-2014, 09:24 AM   #17
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,273

Rep: Reputation: 7695Reputation: 7695Reputation: 7695Reputation: 7695Reputation: 7695Reputation: 7695Reputation: 7695Reputation: 7695Reputation: 7695Reputation: 7695Reputation: 7695
Actually this calculation is not correct. Assuming we have n cores (n > 2) we can do the following:
subtract 1 for the system, 1 for all the user processes together like X, IDE, browsers and others and safely multiply by two the number of remaining cores. This will give you approximately the number of parallel builds (the number to -j flag). You can even use that number as a lower limit and you can increase it, but usually higher values will not give you faster builds - but also it will not slow down anything, therefore it is safe (up to a reasonable limit).
 
Old 03-09-2014, 10:36 AM   #18
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
I have a FX6300 and the limit is -j7 for me, anything above this and using the rest of the system can be painful
 
Old 03-09-2014, 05:01 PM   #19
genss
Member
 
Registered: Nov 2013
Posts: 747

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
Actually this calculation is not correct. Assuming we have n cores (n > 2) we can do the following:
subtract 1 for the system, 1 for all the user processes together like X, IDE, browsers and others and safely multiply by two the number of remaining cores. This will give you approximately the number of parallel builds (the number to -j flag). You can even use that number as a lower limit and you can increase it, but usually higher values will not give you faster builds - but also it will not slow down anything, therefore it is safe (up to a reasonable limit).
couple things
the kernel is threaded by design
if there are 2 processes running on one core, bout will get 50% of it
CFS group scheduling patch that landed a while ago treats a group of processes as one process
so even if you put -j100 the desktop will be responsive (provided you have enough memory to do that)

also there is nice

but yes, putting more then you have cores gives usually no gain
if i remember good, ncores+1 gave me 1% faster compile then ncores
 
Old 03-09-2014, 05:03 PM   #20
genss
Member
 
Registered: Nov 2013
Posts: 747

Rep: Reputation: Disabled
Quote:
Originally Posted by moisespedro View Post
I have a FX6300 and the limit is -j7 for me, anything above this and using the rest of the system can be painful
thats weird
i compiled fine on my old single core
and now i can run things on like 15 threads np

if by painful you mean not snappy as it usually is, try nice
 
  


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
TOP output Cpu(s) and %CPU don't fit on single core AchimRS Linux - General 2 11-03-2011 04:32 PM
why does SCHED_FIFO task on one CPU affects other CPU tasks on a multy core system? reg13 Linux - Kernel 2 07-31-2011 10:48 PM
[SOLVED] SOS: Skim pkg/build for Slackware 13? How do I know if I have scim-lib installed? ShellyCat Slackware 10 07-07-2010 02:34 AM
cpu frequency scaling with Pentium(R) Dual-Core CPU E5200 @ 2.50GHz tramni1980 Slackware 5 08-16-2009 09:29 AM
Intel DG33FB motherboard - cannot run second core on cpu (core 2 duo) rmitev Linux - Enterprise 2 09-28-2007 05:54 AM

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

All times are GMT -5. The time now is 04:20 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