LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-24-2008, 03:49 AM   #1
pellicle
Member
 
Registered: Jul 2008
Location: Finland
Distribution: RHEL4
Posts: 139

Rep: Reputation: 15
Linux seems not to be using my second CPU


Folks


I'm using looking in the system monitor I see both CPUs but nothing seems to make the #2 do anything. Is there something I need to enable on this to allow that to be made use of or is this just how it goes?

uname -r gives --> 2.6.9-22.ELsmp

processor is :AMD ATHLON 64 X2 4600+
 
Old 07-24-2008, 04:53 AM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Hi
How did you get to the conclusion that only 1 core/cpu seems to be used? Did you run multiple concurrent loops?
So, if you issue a "cat /proc/cpuinfo" you only see 1 core/cpu or do you see 2?
Greetings.
 
Old 07-24-2008, 06:36 AM   #3
pellicle
Member
 
Registered: Jul 2008
Location: Finland
Distribution: RHEL4
Posts: 139

Original Poster
Rep: Reputation: 15
Hi

Quote:
Originally Posted by Pearlseattle View Post
Hi
How did you get to the conclusion that only 1 core/cpu seems to be used?
just by looking at the graphic "System Monitor" while putting some 'load' on the server.

Quote:
Originally Posted by Pearlseattle View Post
Hi
Did you run multiple concurrent loops?
nope, just a serious app.

Quote:
Originally Posted by Pearlseattle View Post
So, if you issue a "cat /proc/cpuinfo" you only see 1 core/cpu or do you see 2?
I see two:
Code:
# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 67
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
stepping        : 3
cpu MHz         : 2400.655
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext lm 3dnowext 3dnow pni
bogomips        : 4751.36

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 67
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
stepping        : 3
cpu MHz         : 2400.655
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext lm 3dnowext 3dnow pni
bogomips        : 4980.73
but wait, apparently I'm blind! There IS movement on the other line (and both the CPU percents change too).

(blush)

Thanks anyway
 
Old 07-24-2008, 06:39 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
When you say the system monitor, what do you mean (ksysguard, top, gnome system monitor or something else)? And if you mean top, did you have it in the correct mode?

I note that you have quite an old kernel, which probably shouldn't be a problem, but you never know...

Did you have a reasonable level of loading, say pushing up the loading beyond 50% on the one core that you are using?

But, in general, you should be using both cores. You have an SMP kernel, which should be a good start.

I'm not sure about Cool 'n Quiet (the AMD power saving mechanism - I've got more experience with Intel), but you would expect both cores to be used even at a low level. However, if the throughput requirements can be met with one core still in a power saving state, it may be more economical to do that, so you may have to get beyond a certain level of loading to bring the second core into life.
 
Old 07-24-2008, 06:59 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by pellicle View Post
nope, just a serious app.
May not be sufficient to drive both CPUs - single-threaded maybe.
Quote:
but wait, apparently I'm blind! There IS movement on the other line (and both the CPU percents change too).
As suggested, try some loopers - something as simple as several of something like "while true; do a=1; done" in the background. Easily setup, easily cancelled, proves the point. I use similar when I need to drive a subset of the CPUs on test machines.
 
Old 07-24-2008, 08:54 AM   #6
santana
Member
 
Registered: Sep 2004
Distribution: FC, ubuntu, OpenSuse
Posts: 112

Rep: Reputation: 16
Hi,

The linux scheduler is notorious for scheduling as much as it can to a single core. Even with multi threaded apps the threads get bounced around and often end up on a single core, leaving your others completely vacant. I have seen this after parallelizing a few simple algorithms with OpenMP and rather than a speed up I got a slow down. Why? Because of something which is known as "thread cpu affinity", it tells the scheduler which cpu/core the thread is bound to (if any). If a thread is not bound to any cpu, then the scheduler is free to move the thread around as *it* sees fit.

There have been a number of recent discussions on this topic on various hpc lists. Check this thread out
http://www-unix.mcs.anl.gov/web-mail.../msg00053.html
Long story short, taskset and numactl are command line apps that give you control over the cpu and memory affinity.
 
Old 07-24-2008, 05:00 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Interesting. Last time I looked at (a small piece of) the scheduler, it was at pains to attempt to redispatch on the same processor - cache/TLB concerns. I wouldn't expect to see them "bouncing around" significantly unless that processor went busy with something else, and the ready task(s) got dispatched on another engine. But I play with "multi-process" not (hugely) "multi-threaded". If I need to constrain workloads I use cpusets (now containers/cgroups) - but that is the opposite requirement to the OP here.
@santana, what kernel (i.e. scheduler code) are you using ?. Ingo has asserted the CFS he shipped a little while back (2.6.20 ???) resolves many ailments of old. Was aimed in large part at the desktop latency problems, but seems to have general benefit.
 
Old 07-25-2008, 02:45 AM   #8
pellicle
Member
 
Registered: Jul 2008
Location: Finland
Distribution: RHEL4
Posts: 139

Original Poster
Rep: Reputation: 15
Santana

real interesting ... thanks :-)

Quote:
Originally Posted by santana View Post
Hi,

The linux scheduler is notorious for scheduling as much as it can to a single core. .. Why? Because of something which is known as "thread cpu affinity", ... There have been a number of recent discussions on this topic on various hpc lists. Check this thread out
http://www-unix.mcs.anl.gov/web-mail.../msg00053.html
by 'serious apps' I was meaning running Oracle 10g on it and getting it to sort some tables (with no indexes) from different logins.

but as I mentioned it's working I was just not reading the graphs right.

by "system monitor" I mean the Gnome app that comes with system tools.

Thanks everyone for some very handy infomations
 
  


Reply



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
CPU binding - How to modify the CPU affinity mask? Thaidog Linux - General 1 03-15-2008 05:54 PM
CPU Overheat Warning when opening terminal (CPU is not overheating) Virtuality Linux - Newbie 4 05-30-2007 04:10 AM
How to find CPU Cache ? (apart from dmesg|grep CPU) Dark Carnival Linux - Hardware 3 12-22-2005 07:10 PM
please help guys, wrong cpu speed shown with a regular non-mobile cpu !! : ( maku Linux - Hardware 1 01-02-2005 02:03 PM
Will A RISK CPU Run Linux, HP PA-RISK 8500 CPU IBNETMAN79 General 0 03-08-2002 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:09 PM.

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