LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 12-30-2006, 11:15 PM   #1
mattengland
Member
 
Registered: Nov 2004
Location: Chicago, IL USA
Posts: 42

Rep: Reputation: 15
Question Dual-core support: what's required, how to confirm it?


I'm trying to figure out what's needed to get my Linux (Ubuntu Dapper 6.06.1) box to fully leverage the dual-core processor in my new PC, assuming this does not happen by default (??).

I see various references saying that all I need is to install a package like 'linux-686-smp', but that alone does not seem to work from the stock Dapper kernel (2.6.15.x). I also read the dual-core stuff works best and/or is only supported with kernel 2.6.18.x or above. Is this true?

In anticipation of this, I'm building an SMP-option enabled 2.6.18.6 kernel (it's building right now) to see if this works. I'll install the 'linux-686-smp' package as well...I think (I haven't gotten that far yet).

Further, how do I verify that my system is using the dual-core stuff? I also read in some places that the value should read "processor : 1" in /proc/cpuinfo (of which I copy my flavor below). Is this true? If so, then my system below is apparently not "seeing"/using/leveraging the additional "core"/processor.

An aside: I find it quite remarkable that there isn't a decent web resource that summarizes these issues and details how to address them, all in one place. There seems to be no definitive resource that I can find. Quite perplexing. This leads me to suspect that I've read bad info somewhere. But I start this thread to get to the bottom of this.

My machine details as promised; please let me know if you want more:

Machine spec:
http://www.powerspec.com/systems/sys...selection=7121

Code:
mengland@devdesktop1:/scratch$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) D CPU 2.80GHz
stepping        : 7
cpu MHz         : 2800.387
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm
bogomips        : 5606.43

mengland@devdesktop1:/scratch$ uname -a
Linux devdesktop1 2.6.18.6 #1 PREEMPT Thu Dec 28 14:54:21 CST 2006 i686 GNU/Linux
mengland@devdesktop1:/scratch$ cat /etc/issue
Ubuntu 6.06.1 LTS \n \l

mengland@devdesktop1:/scratch$ lspci
0000:00:00.0 Host bridge: ATI Technologies Inc: Unknown device 5a33 (rev 01)
0000:00:02.0 PCI bridge: ATI Technologies Inc RS480 PCI-X Root Port
0000:00:11.0 IDE interface: ATI Technologies Inc ATI 437A Serial ATA Controller (rev 80)
0000:00:12.0 IDE interface: ATI Technologies Inc ATI 4379 Serial ATA Controller (rev 80)
0000:00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)
0000:00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)
0000:00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller (rev 80)
0000:00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 81)
0000:00:14.1 IDE interface: ATI Technologies Inc Standard Dual Channel PCI IDE Controller ATI (rev 80)
0000:00:14.2 0403: ATI Technologies Inc: Unknown device 437b (rev 01)
0000:00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge (rev 80)
0000:00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge (rev 80)
0000:01:00.0 VGA compatible controller: nVidia Corporation: Unknown device 0392 (rev a1)
0000:02:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
0000:02:06.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev c0)
mengland@devdesktop1:/scratch$
Thanks for any help, and Happy New Year!
-Matt
 
Old 12-30-2006, 11:37 PM   #2
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
If you have done a search in this forum, it should provide you information that using smp enabled kernel will find the other core or processor and use it. Since you already select SMP in the kernel config and compiled it. Linux will balance the load with two processors. When using multi-threaded programs, you will see an increase in speed.
 
Old 12-30-2006, 11:54 PM   #3
mattengland
Member
 
Registered: Nov 2004
Location: Chicago, IL USA
Posts: 42

Original Poster
Rep: Reputation: 15
Electro et al,

Thanks much for the quick reply.

First, for admins of this board: my first post is this thread does not accurately reflect what I wrote. I suspect some formatting or data-integrity problems. This is rather disconcerting. But back to our regularly-scheduled program...

The references I've seen thus far--some of which may have been in LQ--recommended only installing the 'linux-686-smp' (or appropriate processor) package. That didn't work, at least on my 2.6.15 kernel.

Having finished the 2.6.18.6 customer kernel build, I now see the 2 processors in /proc/cpuinfo (I'd post the file's contents here if the network interface wasn't broken for the system I reference--because I accidently turned off the ethernet driver in the kernel build).

This supports the minority of references (or the one reference) that talked about requiring 2.6.18.x to have dual-core support. I'm trying to sort out these discrepencies. A little help with pointers in the right direction would be great. I spent a log of time researching this; I'd appreciate more than a "go search the forums" response.

Best regards,
-Matt
 
Old 12-30-2006, 11:55 PM   #4
mattengland
Member
 
Registered: Nov 2004
Location: Chicago, IL USA
Posts: 42

Original Poster
Rep: Reputation: 15
An aside: as of the time of this writing, the content of my original post on this thread now appears to be accurate.

I suspect there was a temporary forum-server problem.

-Matt
 
Old 12-31-2006, 12:44 AM   #5
mattengland
Member
 
Registered: Nov 2004
Location: Chicago, IL USA
Posts: 42

Original Poster
Rep: Reputation: 15
Question

fyi, I started a thread covering the same topic at the Ubuntu forums:

http://ubuntuforums.org/showthread.php?t=328524

-Matt
 
Old 12-31-2006, 05:40 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,801

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
I don't have access to a "core duo" (or ... 2), but the Ubuntu SMP kernel works fine on all previous hardware - up to the 8 way I tested.
Check your BIOS.

I doubt very much that you can "fully leverage the dual-core processor in my new PC" with Dapper. There's the small matter of getting a current gcc and it's use flags for the new chips.
Be happy if you can get get both cores running.
 
Old 12-31-2006, 10:17 AM   #7
mattengland
Member
 
Registered: Nov 2004
Location: Chicago, IL USA
Posts: 42

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by syg00
I don't have access to a "core duo" (or ... 2), but the Ubuntu SMP kernel works fine on all previous hardware - up to the 8 way I tested. Check your BIOS.
What 8 different ways did you test (if that's what you mean)? Can you provide specifics? What things did you test, you did you confirm, them, etc? And which kernel flavor did you test them on?

I also checked my BIOS; I have yet to see any specific reference to dual-core or multiprocessing stuff.

Quote:
I doubt very much that you can "fully leverage the dual-core processor in my new PC" with Dapper.
Exactly why is that? And if I change the kernel I use with the Dapper distribution, or the applications I run on it, might I still be able to leverage dual-core benfits?

Quote:
There's the small matter of getting a current gcc and it's use flags for the new chips.
Do you mean to suggest that no application will benefit from dual-core capability until they are build specifically for a dual-core system with a certain compiler revision, settings, etc? If so, what are these conditions? I am a software developer, I will be building and testing significant system software on these machines I'm administering that, and I'm going to want to leverage their performance appropriately.

I seek specifics.

Alas, I'm skeptical that it takes application-software recompiles to take advantage of the dual-core stuff; if I were a processor designer, I'd specifically want to enable *any* multi-threaded application to benefit, OR at least make the operating system as a whole run faster from a multi-process-system perspective. As a processor manufacturer, I would think this would help me sell more chips.

To this end, I'm also interested in what software benefit from the dual-core stuff. eg, will a singe, multi-threaded process generally run faster on a dual-core machine vs an all-other-things-being-equal, single-processor machine?

Quote:
Be happy if you can get get both cores running.
What exactly does it mean "to get both cores running"? I can see 2 processors in /proc/cpuinfo; does that mean "2 cores are running" and that my software will implicitly benefit?

I will be satifisfied when I get much-more-detailed information and can predict in advance how each environment will behave based upon a solid knowledge of how to control these parameters (in various environments) to achieve better performance. I want to know this far more than just for my single, little machine; I hope to distribute my organization's software across many machines, and I want to know how these things will affect our software's performance in various environments, if at all.

Because, if this dual-core stuff really doesn't make much difference, I will want to know that, too.

However, most of these forum discussions I see thus far are frankly talking a little bit in circles, and I want definite, hard, authoritative facts, and I want them for all Linux 2.6.* kernel systems...assuming the kernel (and not the distribution flavor) is the real issue here?

Thanks again in advance for any help,
-Matt

Last edited by mattengland; 12-31-2006 at 10:22 AM.
 
Old 12-31-2006, 10:53 AM   #8
mattengland
Member
 
Registered: Nov 2004
Location: Chicago, IL USA
Posts: 42

Original Poster
Rep: Reputation: 15
I see a linux-kernel mail list reference here:

http://groups.google.com/group/linux...ac699d4bd714e9

which appears to say that dual-core status is reflected in /proc/cpuinfo. It seems to implicitly state that if one sees more than one proc in /proc/cpuinfo, that one's system is leveraging full dual-core benefit...but I'm not sure.

-Matt
 
Old 12-31-2006, 12:25 PM   #9
mattengland
Member
 
Registered: Nov 2004
Location: Chicago, IL USA
Posts: 42

Original Poster
Rep: Reputation: 15
I have posted similar questions to the moderated, linux-kernel@vger.kernel.org email list. If and when the moderators accept this post, I'll include a web link to it on this LQ thread.

-Matt
 
Old 12-31-2006, 02:40 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,801

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
Quote:
Originally Posted by mattengland
I can see 2 processors in /proc/cpuinfo; does that mean "2 cores are running" and that my software will implicitly benefit?
This contradicts what you posted initially.
Yes - the kernel has recognised both cores and will schedule units of work on them both. Whether individual software benefits is largely dependant on the software itself - if it is multi-threaded it will be able to run 2 threads concurrently (depending on locking issues).
Single threaded software will not benefit directly - however it may benefit indirectly given that there are 2 (or more) processors available for scheduling.

To "fully leverage" (your term) any new features of new hardware requires the compiler to be aware, and the software using those features to be aware. This has always been the case - when MMX was introduced for example.
If you don't use those new features, they can be ignored.
As I said, for multi-core if you write your code multi-threaded, it will use extra processors if they are available.
 
Old 12-31-2006, 04:44 PM   #11
mattengland
Member
 
Registered: Nov 2004
Location: Chicago, IL USA
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00
This contradicts what you posted initially.
I recompiled the 2.6.18.6 kernel with SMP support. I tried to mention that somewhere--sorry if I didn't.

Quote:
Yes - the kernel has recognised both cores and will schedule units of work on them both. Whether individual software benefits is largely dependant on the software itself - if it is multi-threaded it will be able to run 2 threads concurrently (depending on locking issues).
Ok, if it's just a straight threading issue (which includes the software I'm helping make) than it's no sweat--a multi-threaded app will transparently (to the program) run across both "cores"...if that's the way it works. However...

Quote:
To "fully leverage" (your term) any new features of new hardware requires the compiler to be aware, and the software using those features to be aware. This has always been the case - when MMX was introduced for example.
If you don't use those new features, they can be ignored.
As I said, for multi-core if you write your code multi-threaded, it will use extra processors if they are available.
Does this mean that software not compiled specifically for a dual-core system will not run with threads on each core?

And/or does this mean there are features beyond the threads-across-the-cores stuff that won't be leveraged for the 2 dores? If so, does anyone know what these features are?

Hopefully my questions are making sense.

-Matt
 
Old 01-01-2007, 08:17 PM   #12
kajensen
Member
 
Registered: Aug 2003
Location: Palm Springs, CA, U.S.
Distribution: Ubuntu 8.04 LTS (Dell) & 9.04
Posts: 78

Rep: Reputation: 15
Folding At Home: Dual Core

When I used Folding at Home, I could assign one work unit as machine id 1 to one core and another work unit as machine id 2 to the other core.

HOWEVER, I was not getting double the work, as I had believed I would. Each core was allotted 50% of cpu.

Dual core, therefore, is a failure for me.
 
Old 01-01-2007, 10:00 PM   #13
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I suggest using Gentoo. After you install all the programs that you want, include the nptl USE flag to get better performance that uses nptl. Unfortunately, you will have to emerge to do a world compile get the nptl included.

Programs like OpenSDL, Apache, some Java programs, VMware, and many others are designed for SMP systems in mind.

Dual processor or dual core is the same. Use the utility top and toggle SMP mode. The utility ps does not know how to distinguish threads.
 
Old 02-14-2007, 09:33 AM   #14
lg21
LQ Newbie
 
Registered: Feb 2007
Posts: 5

Rep: Reputation: 0
Core Duo - SMP turn on, still 1 core :|

Hello,

# uname -a
Linux ven 2.6.20 #5 SMP PREEMPT Tue Feb 13 22:47:05 CET 2007 i686 GNU/Linux

# cat config-2.6.20|grep SMP
CONFIG_SMP=y
# CONFIG_X86_BIGSMP is not set
CONFIG_SUSPEND_SMP=y
CONFIG_X86_FIND_SMP_CONFIG=y

second core still doesn't work - what else should be enabled? I've put my config on lg21.g33k.pl/config
 
  


Reply

Tags
dualcore, kernel, smp


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PPTP Error: MPPE required, but kernel has no support. lennysokol Linux - Software 2 03-22-2009 02:51 PM
How to confirm the dual-core in Linux. UltraSoul Linux - Hardware 2 01-02-2007 10:55 PM
Does FC5 support Intel D2 (Dual Core) processor prabhatsoni Linux - Hardware 2 09-25-2006 07:39 AM
Kernel Sources required for NFTS support darkblane Linux - Newbie 4 02-15-2005 03:57 AM
Quad-Xeon Mobo required with RedHat 8 support fishsponge Linux - Hardware 0 08-16-2004 08:06 AM


All times are GMT -5. The time now is 02:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration