Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I dont have the power of 2 (SMP problem)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
MrSlayer
n00b
n00b


Joined: 17 Aug 2002
Posts: 39

PostPosted: Wed Nov 26, 2003 3:03 pm    Post subject: I dont have the power of 2 (SMP problem) Reply with quote

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
View user's profile Send private message
dizzey
n00b
n00b


Joined: 03 Oct 2003
Posts: 40

PostPosted: Wed Nov 26, 2003 3:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
nephros
Advocate
Advocate


Joined: 07 Feb 2003
Posts: 2139
Location: Graz, Austria (Europe - no kangaroos.)

PostPosted: Wed Nov 26, 2003 4:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Wed Nov 26, 2003 4:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
MrSlayer
n00b
n00b


Joined: 17 Aug 2002
Posts: 39

PostPosted: Wed Nov 26, 2003 9:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
BillyBoy
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2003
Posts: 101
Location: USA

PostPosted: Thu Nov 27, 2003 12:03 am    Post subject: Reply with quote

Where do you make the changes to MAKEOPTS? Is that in make.conf?
Back to top
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Thu Nov 27, 2003 1:17 am    Post subject: Reply with quote

Yes, /etc/make.conf. Just uncomment it and set the value.
Back to top
View user's profile Send private message
MrSlayer
n00b
n00b


Joined: 17 Aug 2002
Posts: 39

PostPosted: Thu Nov 27, 2003 1:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
nephros
Advocate
Advocate


Joined: 07 Feb 2003
Posts: 2139
Location: Graz, Austria (Europe - no kangaroos.)

PostPosted: Thu Nov 27, 2003 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
MrSlayer
n00b
n00b


Joined: 17 Aug 2002
Posts: 39

PostPosted: Thu Nov 27, 2003 2:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Thu Nov 27, 2003 2:18 pm    Post subject: Reply with quote

If you have this line set and uncommented in /etc/make conf, most (but _not_ all) apps will build using both cpu's:
Code:

MAKEOPTS="-j4"

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
View user's profile Send private message
MrSlayer
n00b
n00b


Joined: 17 Aug 2002
Posts: 39

PostPosted: Thu Nov 27, 2003 2:38 pm    Post subject: Reply with quote

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 :cry:
Back to top
View user's profile Send private message
MrSlayer
n00b
n00b


Joined: 17 Aug 2002
Posts: 39

PostPosted: Thu Nov 27, 2003 3:17 pm    Post subject: Reply with quote

I can tell why, but its working now. Nothing is changed and it is the same ebuild im compiling.

But atleast its working :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum