View previous topic :: View next topic |
Author |
Message |
caaarlos Apprentice
Joined: 27 Apr 2012 Posts: 155
|
Posted: Wed Jan 02, 2013 3:03 pm Post subject: [SOLVELD] improving parallel programming of my system? |
|
|
Hello,
I want to improve my system's parallel programming. How you can see on this picture, my system is too innefective, because my system is 3 cores and 2 cpu's works on low rate and 1 works high rate.
Here you can see my system working "https://www.dropbox.com/s/9f7ak765s16c5zx/Captura_de_tela.png"
Thanks.
Last edited by caaarlos on Sun Jan 06, 2013 9:23 am; edited 1 time in total |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9675 Location: almost Mile High in the USA
|
Posted: Wed Jan 02, 2013 3:40 pm Post subject: |
|
|
What are you asking your computer to do? What are you running?
You'll really need to know how to write software to take advantage of multiple threads. If the software isn't written to take advantage of multiple cores, it will use one core.
Some software just cannot be parallelized. Hence the race to faster CPUs that don't need threading... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
caaarlos Apprentice
Joined: 27 Apr 2012 Posts: 155
|
Posted: Wed Jan 02, 2013 6:02 pm Post subject: |
|
|
Hello,
I used this command "emerge -a dev-db/mysql-workbench".
So the real reason is not my system but is some softwares that does not use parallel programming?
Thanks. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9675 Location: almost Mile High in the USA
|
Posted: Wed Jan 02, 2013 6:19 pm Post subject: |
|
|
Ah...now this is more clear. What you're trying to run is an emerge, or actually compiling a program.
Compiling uses the subprogram "make" which knows how to schedule in parallel.
What you want is to add in your /etc/make.conf
MAKEOPTS='-j4'
This will tell 'make' to run up to 4 tasks at once when it can. This will minimize amount of unused cycles when it's trying to fetch the next thing to build - by running on your 3 processors and a fourth one to fill any gaps.
This will only affect 'make' that's run under portage/emerge. If you have other programs that are singlethreaded you'll need to configure them separately. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
caaarlos Apprentice
Joined: 27 Apr 2012 Posts: 155
|
Posted: Thu Jan 03, 2013 3:28 pm Post subject: |
|
|
Thanks, but I already use MAKEOPTS='-j4' . Is easy to configure on program singlethreaded? |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Jan 03, 2013 3:31 pm Post subject: |
|
|
If you want to make programs in general multithreaded, then you need to rewrite them to use threads. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9675 Location: almost Mile High in the USA
|
Posted: Thu Jan 03, 2013 11:00 pm Post subject: |
|
|
Some ebuilds have upstream tarballs that contain poorly written makefiles, and thus cannot clearly tell what can and cannot be parallellized. It's possible this was the case for some ebuild you have, and to make sure it compiles correctly each time, it was forced singlethread to build properly.
But that's right... the main reason why multithreading isn't prevalent is because nobody wants to rewrite programs to be multithreaded - it's not easy and there are a lot of pitfalls. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
caaarlos Apprentice
Joined: 27 Apr 2012 Posts: 155
|
Posted: Sun Jan 06, 2013 9:23 am Post subject: |
|
|
Now I'm understand it!
Thanks. |
|
Back to top |
|
|
|