View previous topic :: View next topic |
Author |
Message |
MrSlayer n00b
Joined: 17 Aug 2002 Posts: 39
|
Posted: Wed Nov 26, 2003 3:03 pm Post subject: I dont have the power of 2 (SMP problem) |
|
|
Hi.
I got an nice pair of 1200Mhz Athlon MP in my Asus A7M266-D. But my main problem is that i dont have any luck making my system use both CPU's. I got SMP support in the kernel, i can see both CPU's with cat /proc/cpuinfo and i can see the both in top. I have made MAKEOPTS unmark, and i have tried with different values (3-12). But nomather what i do i cant make the both cpu have a load of atleast 80% each. Either is CPU0 running for full power or else CPU1 is.
BTW i using kernel 2.6.0-test9.
Can anyone help me please? |
|
Back to top |
|
|
dizzey n00b
Joined: 03 Oct 2003 Posts: 40
|
Posted: Wed Nov 26, 2003 3:59 pm Post subject: |
|
|
try distributed.net if you dont get full cpu utiliation then something is borked.
otherwise the cpu is seldom the bottleneck so im nut sure if its unormal
top just show snapshots so try distributed and se |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Wed Nov 26, 2003 4:05 pm Post subject: |
|
|
Each process can only run at one CPU at a time. If you want things like setiathome (or any other app) to use both processors, you have to start two processes.
Threaded apps like apache and most multimedia encoders/renderers run several threads to take advantage of two processors. For some you will have to tell them explicitly, like bind. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
ronmon Veteran
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Wed Nov 26, 2003 4:44 pm Post subject: |
|
|
As a long-time SMPer, here's what I've learned. Set your MAKEOPTS at -j3 or -j4. Any more than that won't hurt but it won't help either. I use -j4. When you run 'make' manually, such as when building a kernel, do 'make -j4' to ensure a parallel build if possible. Kernel compiles make full use of the parallel build feature and you should see both cpu's running between 90 and 100% most of the time. This is how I run a kernel build:
Code: |
make -j4 bzImage && make -j4 modules && make modules_install
|
Some apps will not build in parallel, OpenOffice unfortunately being one of them. In such a case, MAKEOPTS are usually forced to -j1 in the ebuild. If you are compiling one of these manually it may fail or it may succeed using just one proc. When the latter happens I usually see about 120-130% combined cpu usage during the build.
Since cpuinfo and top see both procs, I would say that your kernel config is okay. So try emerging a few different packages or just cd into /usr/src/linux and run 'make -j4 bzImage' to see if it's working.
For the record, my current mobo is an A7M266-D with a pair of 'defogged' XP1800+'s.
Screenie |
|
Back to top |
|
|
MrSlayer n00b
Joined: 17 Aug 2002 Posts: 39
|
Posted: Wed Nov 26, 2003 9:16 pm Post subject: |
|
|
Sorry I forgot som vital information.
It is when i compile i cant get my system to use both CPU's. Everytime i try to emerge something only one thread is startet.
If i run 2 seti clients i can ofcourse get the load of 99,9% on each CPU.
So my problem is that i cant use both CPU's when im emerging something. |
|
Back to top |
|
|
BillyBoy Tux's lil' helper
Joined: 26 Nov 2003 Posts: 101 Location: USA
|
Posted: Thu Nov 27, 2003 12:03 am Post subject: |
|
|
Where do you make the changes to MAKEOPTS? Is that in make.conf? |
|
Back to top |
|
|
ronmon Veteran
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Thu Nov 27, 2003 1:17 am Post subject: |
|
|
Yes, /etc/make.conf. Just uncomment it and set the value. |
|
Back to top |
|
|
MrSlayer n00b
Joined: 17 Aug 2002 Posts: 39
|
Posted: Thu Nov 27, 2003 1:59 pm Post subject: |
|
|
I did the "make -j4" for my kernel and instantly (almost then) there was created 4 threads for compiling an both my CPU's where used above 90%, why is it that i just cant make this work on the portage system.
Any ideas? |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Thu Nov 27, 2003 2:15 pm Post subject: |
|
|
MrSlayer wrote: | I did the "make -j4" for my kernel and instantly (almost then) there was created 4 threads for compiling an both my CPU's where used above 90%, why is it that i just cant make this work on the portage system.
Any ideas? |
MAKEOPTS="-j4" should do that, and make sure you have -pipe in your CFLAGS. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
MrSlayer n00b
Joined: 17 Aug 2002 Posts: 39
|
Posted: Thu Nov 27, 2003 2:17 pm Post subject: |
|
|
I have the makeopts="-j4" in my make.conf and pipe is also in.
I have never ever had this problem before. |
|
Back to top |
|
|
ronmon Veteran
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Thu Nov 27, 2003 2:18 pm Post subject: |
|
|
If you have this line set and uncommented in /etc/make conf, most (but _not_ all) apps will build using both cpu's:
If you have determined that parallel builds work when you run make manually, it should be that simple.
I just notice the lower case 'makeopts' in your last post. It is case sensitive you know. |
|
Back to top |
|
|
MrSlayer n00b
Joined: 17 Aug 2002 Posts: 39
|
Posted: Thu Nov 27, 2003 2:38 pm Post subject: |
|
|
I have it in uppercase.
I am aware that not every thing can use both cpu's. But its only when i make an byhand compile with the -j4 option that i can make the build process use both cpus.
So its unfortunatly not just that simple |
|
Back to top |
|
|
MrSlayer n00b
Joined: 17 Aug 2002 Posts: 39
|
Posted: Thu Nov 27, 2003 3:17 pm Post subject: |
|
|
I can tell why, but its working now. Nothing is changed and it is the same ebuild im compiling.
But atleast its working |
|
Back to top |
|
|
|