LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Only one core of dual core processor are working (https://www.linuxquestions.org/questions/linux-newbie-8/only-one-core-of-dual-core-processor-are-working-868454/)

Inkit 03-14-2011 06:57 AM

Only one core of dual core processor are working
 
Hello everyone,
I recently read in a forum that by default the Linux kernel only activates one of two cores in a dual core processor. Searching online gave one option to find out and that was the mpstat command. I therefore ran the command and got the following output.

$ mpstat -P ALL
Linux 2.6.35-22-generic (inkit) Monday 14 March 2011 _i686_ (1 CPU)

05:15:24 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
05:15:24 IST all 26.87 0.23 7.93 0.38 0.00 0.04 0.00 0.00 64.56
05:15:24 IST 0 26.87 0.23 7.93 0.38 0.00 0.04 0.00 0.00 64.56

As the result says, it shows only 1 cpu. I was wondering what I could do to activate both cores in my machine, and whether doing so was going to cause me any problems. I would be very grateful for any advise in this regard.

stress_junkie 03-14-2011 07:03 AM

What hardware are you using? (CPU brand and model)

Did you install Linux in a virtual machine or directly on the bare computer?

Inkit 03-14-2011 07:30 AM

Hi Stress junkit,
My computer is an assembled one, but I've posted the output for cat /proc/cpuinfo below. I run linux mint 10 that I have installed after removing windows XP. I've had this same computer for nearly 5 yrs and know that it is an intel dual core processor. I removed windows just a month back because I had a dual boot with linux for the past one year and never used windows. I have however checked under "my computer" and have seen it listed as a dual core in windows.

inkit@inkit ~ $ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) D CPU 2.66GHz
stepping : 7
cpu MHz : 2660.653
cache size : 1024 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
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 mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc up pebs bts pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
bogomips : 5321.30
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual

Soadyheid 03-14-2011 09:17 AM

/proc/cpuinfo is only showing a single core.
What do you get if you run
Code:

uname -a
It should show your Linux kernel version and, if the kernel supports multiple processors/cores, "SMP" (Symetric Multi Processing) though I'd expect this to be default in most Distros these days. :confused: If you don't have an SMP kernel, you'll only use one CPU core.

Play Bonny! :hattip:

Inkit 03-14-2011 06:17 PM

It says SMP kernel. In any case the version is 2.6.35-22 generic Ubuntu

stress_junkie 03-14-2011 08:23 PM

I think I would check the motherboard settings just to see if it supports dual core CPUs.

Inkit 03-14-2011 10:14 PM

Could you give me any guidance on how exactly I could do that.

syg00 03-15-2011 12:17 AM

"cat /proc/cmdline"

stress_junkie 03-15-2011 06:10 AM

Quote:

Originally Posted by Inkit (Post 4291017)
Could you give me any guidance on how exactly I could do that.

I thought since you built the computer that you would have some idea of what parts went into making the computer. You could look at the box in which the motherboard was shipped from the factory or you could look at the user manual that came with the motherboard. If you don't have the box in which the motherboard was shipped from the factory and if you don't have the motherboard user guide then you can open the computer and find the manufacturer and model of the motherboard. Then look that up on the Internet to find the features. My thinking is that a Pentium D might fit the socket of a motherboard that is designed for single core Pentiums. I don't know if this is possible because I always checked these types of features before I paired a motherboard with a CPU. The motherboard documentation would say whether it supports dual core Pentium D CPUs.

The exact steps involved in checking the BIOS CMOS settings is something that you should know about if you build computers. Generally you press the delete key or the F2 key on the keyboard while the motherboard's splash image is showing when you first turn on the power. Details for your motherboard may differ. You should be able to find exact instructions in the documentation for your motherboard.

If the motherboard documentation states that it is intended to work with Pentium D processors then I would look at the BIOS CMOS settings to see if there are features that can be enabled or disabled regarding multiple CPUs or something similar. It is possible that some feature may be listed under a similar name such as hyperthreading even though hyperthreading is different than multicore CPUs.

Inkit 03-15-2011 07:23 AM

Thanks for the detailed explaination stress_Junkit, I guess I wasn't clear in my post. What I had meant when I said that it was assembled is that it was not a branded one. In India very few of us actually build out own computers, we go to a dealer who sells computer parts and have him assemble it for us. That way we have a warranty for the entire computer, and if something conks off we just take the whole thing back to him. The only advantage of this is that you can pick and choose what you want, and you don't pay extra for the brand. That is what I did too.
I do know what the different parts of a computer are, but that's about the limit of my hardware knowledge. I'm actually quite a newbie myself, and although I've been using computers for more than 10 yrs now, it's only in the past year after I installed Linux that I started taking an interest in the internal working of my computer. Until then it was just an appliance to me. This is one of the main reasons for me to stick with Linux because I've learned more about my machine in the past one year than I did in my entire life before that.
To come back to my problem my mother board is a mercury PI865D7 V2.0. I tried hunting around to see if this mother board will support a dual core, but could not find any answers. I don't know if I'm not using the right keywords, but that's my result.
With regards to checking my bios settings, I know I should have done that first, but in the same forum where I read that linux was not supporting the second core, I read that enabling the second core caused all sorts of problems with the comp. Of course he solved it by disabling it once again, but I thought I'd ask before I tried something that could have consequences that I don't know anything about.
I'm not worried much about tinkering around with software, I can always reinstall. I am afraid of screwing my system up permanently though, especially since I really have no issues with it at all as of now. It's just that I have a bee in my bonnet about this, and want to know, that's all. I really appreciate your help, and hope you'll squash this bee for me.

Inkit 03-15-2011 07:26 AM

Hi SygOO, I ran your command and got the following output.

inkit@inkit ~ $ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-2.6.35-22-generic root=UUID=473195e1-c268-46c8-b1e4-cc17aa65aa0d ro quiet splash
inkit@inkit ~ $

Donno what it means though.

syg00 03-15-2011 07:57 AM

That's what gets passed to the kernel from the boot-loader - I wanted to see if you had any option that might limit the SMP capability. Nothing there of concern.
If Windows supports 2 processors, Linux should.

Have a look at the dmesg for any messages of interest.

Soadyheid 03-15-2011 11:09 AM

Quote:

In any case the version is 2.6.35-22 generic Ubuntu
Hhmm... I think it should say 2.6.35-22 SMP rather than generic to support multi processors. Can you paste EXACTLY what you get when you run
Code:

uname -a
?

Play Bonny! :hattip:

stress_junkie 03-15-2011 05:03 PM

Quote:

Originally Posted by Soadyheid (Post 4291606)
I think it should say 2.6.35-22 SMP rather than generic to support multi processors.

I would have thought so too but I'm running an Ubuntu generic kernel and I know that I have dual core support.
Code:

$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-2.6.32-29-generic-pae root=UUID=df265f1e-c396-428a-be8b-82eb4939bf68 ro quiet splash

In fact the uname -a is where the SMP shows up on my machine.
Code:

$ uname -a
Linux f14 2.6.32-29-generic-pae #58-Ubuntu SMP Fri Feb 11 19:15:25 UTC 2011 i686 GNU/Linux

Good call Soadyheid.

Soadyheid 03-15-2011 07:20 PM

Woah! Stress_Junkie!

Mine says
Quote:

$ uname -a
Linux Big-Max 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux
Which is pretty much the same as yours. It DOES say "generic" in there however. :)
Code:

cat /proc/cpuinfo
in my case gives:
Quote:

$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 43
model name : AMD Athlon(tm) 64 X2 Dual Core Processor 3800+

Bla, Bla, Bla...

bogomips : 4021.06
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

processor : 1
vendor_id : AuthenticAMD
cpu family : 15
model : 43
model name : AMD Athlon(tm) 64 X2 Dual Core Processor 3800+

Bla, Bla, Bla...

bogomips : 4020.86
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp
Which indicates Two CPUs where the OP's doesn't. :confused:

Play Bonny! :hattip:


All times are GMT -5. The time now is 12:18 AM.