pfSense Gold Subscription

Author Topic: New 2nd CPU not recognised  (Read 3035 times)

0 Members and 1 Guest are viewing this topic.

Offline abrooks

  • Newbie
  • *
  • Posts: 10
    • View Profile
New 2nd CPU not recognised
« on: January 30, 2012, 05:09:55 am »
Hello,

I have pfSense 2.0.1, running fine on a single CPU.  I added a second CPU to the motherboard, which seems to have been detected OK by the BIOS (POST reports 2 CPUs).  However, pfSense doesn't see the second CPU (not in the dashboard, and sysctl reports "hw.ncpu: 1".  Do I need to reinstall pfSense to get it to recognise the 2nd processor?

Many thanks, Adrian

Offline wallabybob

  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
Re: New 2nd CPU not recognised
« Reply #1 on: January 30, 2012, 07:38:47 am »
CPUs? Motherboard?

You have enabled the BIOS to report 2 CPUs in ACPI or MPTABLE?
 

Offline abrooks

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: New 2nd CPU not recognised
« Reply #2 on: January 31, 2012, 02:59:46 am »
Hello,

I'm afraid I can't get access to the server for a couple of days.  It was an Award BIOS, and I did check - there didn't seem to be any options for enabling a second CPU.  But I presumed everything was OK at the BIOS level because on powering up it says 2 x Xeon 3.0 GHz detected.  Hence the question about whether it was necessary to make any change in pfSense itself?

Thanks, Adrian

Offline wallabybob

  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
Re: New 2nd CPU not recognised
« Reply #3 on: January 31, 2012, 04:13:45 am »
But I presumed everything was OK at the BIOS level because on powering up it says 2 x Xeon 3.0 GHz detected. 
That doesn't mean the BIOS tells the OS there are two CPUs. (This information and device configuration is normally passed from BIOS to OS in MPTABLE or ACPI data. Some operating systems don't/didn't support multiple CPUs so, in some cases, the BIOS can be configured to tell the OS about only one CPU.)

Offline abrooks

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: New 2nd CPU not recognised
« Reply #4 on: January 31, 2012, 08:05:18 am »
OK, thanks for your help.  I should be able to get on the console again in the next couple of days, so I'll go through the BIOS again and check exactly what type it is.
Adrian

Offline JoelC707

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: New 2nd CPU not recognised
« Reply #5 on: February 01, 2012, 02:24:17 pm »
If the system BIOS reports two CPUs at POST then it's likely the BIOS has already been enabled for multiple CPU support. Next you need to look at your system kernel. If it was installed with only one CPU and pfsense doesn't recognize the second CPU then it likely has a uniprocessor kernel. You can swap out to a SMP kernel but the ramifications of this I do not know. I see there is a thread on building a custom kernel so it's certainly doable.

Offline abrooks

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: New 2nd CPU not recognised
« Reply #6 on: February 02, 2012, 04:10:35 am »
Hello, thanks for the replies.

I've just looked through all the BIOS and I can't find any option for enabling a second CPU (I did a reset to defaults while I was there, just in case).  And yes, we did install the SMP version.

I'm beginning to think a reinstall is the next best thing to try...

Adrian

Offline wallabybob

  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
Re: New 2nd CPU not recognised
« Reply #7 on: February 02, 2012, 05:41:42 am »
I'm beginning to think a reinstall is the next best thing to try...
What will you do differently on the reinstall?

If the system BIOS reports two CPUs at POST then it's likely the BIOS has already been enabled for multiple CPU support.
That the BIOS recognises two CPUs doesn't mean it will tell the OS there are two CPUs, nor does it mean the OS is listening.

Please post the output of pfSense shell command dmesg - perhaps there will be some clues there about what is going on.

Is ACPI enabled on your system? In the BIOS? In FreeBSD?

Offline abrooks

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: New 2nd CPU not recognised
« Reply #8 on: February 02, 2012, 07:38:03 am »
Well, I was thinking that having the two CPUs present during the actual install might make a difference.

But anyway, you were on the right track with the ACPI.  I disabled this in the BIOS and now I have 'hw.ncpu: 2' and I get the additional column for the CPU number when I do 'top'.  And I see a drop in the CPU load as well, so objective achieved  :)

Many thanks for your help with this, I'm really grateful to have got this cleared up in just a few days.

Adrian

Offline wallabybob

  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
Re: New 2nd CPU not recognised
« Reply #9 on: February 02, 2012, 07:49:57 am »
But anyway, you were on the right track with the ACPI.  I disabled this in the BIOS and now I have 'hw.ncpu: 2'
I would be very surprised if DISABLING ACPI caused the second CPU to be recognised. Did you mean ENABLING ACPI? Or perhaps DISABLING the DISABLE ACPI?

If you really think DISABLING ACPI worked please post the output of pfSense shell command dmesg. Maybe the BIOS reports ACPI the wrong way around.

Offline abrooks

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: New 2nd CPU not recognised
« Reply #10 on: February 02, 2012, 09:08:42 am »
Hello,

The BIOS now shows:

ACPI function  [Disabled]

And the dmesg output:

[2.0.1-RELEASE]/root(4): dmesg | grep acpi
[2.0.1-RELEASE]/root(5): dmesg | grep ACPI
Features=0xbfebfbff<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,HTT,TM,PBE>
ACPI Error: A valid RSDP was not found (20100331/tbxfroot-309)
ACPI Error: A valid RSDP was not found (20100331/tbxfroot-309)
ACPI: Table initialisation failed: AE_NOT_FOUND
ACPI: Try disabling either ACPI or apic support.

Offline JoelC707

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: New 2nd CPU not recognised
« Reply #11 on: February 02, 2012, 10:35:54 am »
If the system BIOS reports two CPUs at POST then it's likely the BIOS has already been enabled for multiple CPU support.
That the BIOS recognises two CPUs doesn't mean it will tell the OS there are two CPUs, nor does it mean the OS is listening.

On that note, what option is there in a modern BIOS for disabling a second CPU? Hyperthreading yes, I have seen and had to enable that many times but a second physical CPU or one with more cores always entailed stepping up to an SMP kernel if not already present. Isn't the SMP kernel the point of the OS listening to the BIOS that there is now more than one CPU? It does seem weird disabling ACPI would make it see it. Maybe ACPI needs to be "refreshed" and disabling it cleared something cached somewhere and now re-enabling it will make the OS see it? It's not infallible after all.

Offline wallabybob

  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
Re: New 2nd CPU not recognised
« Reply #12 on: February 02, 2012, 03:48:31 pm »
On that note, what option is there in a modern BIOS for disabling a second CPU? Hyperthreading yes, I have seen and had to enable that many times but a second physical CPU or one with more cores always entailed stepping up to an SMP kernel if not already present. Isn't the SMP kernel the point of the OS listening to the BIOS that there is now more than one CPU?
ACPI data is one way a BIOS can tell the OS how many CPUs are present. FreeBSD has a boot option to ignore ACPI data.

The BIOS now shows:

ACPI function  [Disabled]
I'm curious how the OS knows about the second CPU. Could you post the unfiltered dmesg output?

What brand and model number motherboard are you using?

Offline JoelC707

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: New 2nd CPU not recognised
« Reply #13 on: February 02, 2012, 04:34:23 pm »
Ahhh OK, makes sense now. Thanks!

Offline abrooks

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: New 2nd CPU not recognised
« Reply #14 on: February 03, 2012, 06:28:19 am »
I attached the dmesg output.  As for the motherboard, I'm not sure, but I have to open up an identical machine later so I will look then.
Adrian

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14932
    • View Profile
Re: New 2nd CPU not recognised
« Reply #15 on: February 03, 2012, 08:36:04 am »
Code: [Select]
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 2 package(s) x 1 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  6
[...]
SMP: AP CPU #1 Launched!

It is seeing and using both CPUs according to that dmesg output. (CPU #1 is the second CPU, after #0...)
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline abrooks

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: New 2nd CPU not recognised
« Reply #16 on: February 03, 2012, 10:21:02 am »
Motherboard: NAMB-6201

Offline wallabybob

  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
Re: New 2nd CPU not recognised
« Reply #17 on: February 03, 2012, 05:19:29 pm »
The dmesg output shows the system saw a BIOS provided MPTABLE which would have informed it of the second CPU.

MPTABLE was the mechanism by which a BIOS informed an MP capable OS of the CPUS, APICs etc. It has pretty much ben superseded by ACPI.

Your observations suggest the BIOS puts two CPUs in the MPTABLE but only one in the ACPI data. Maybe there is a BIOS update to correct the ACPI data.

A quick google suggests the motherboard is an Advantech brand but I didn't turn up anywhere to download manuals, bios etc.

Offline gabi

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: New 2nd CPU not recognised
« Reply #18 on: April 02, 2012, 05:41:26 am »
the latest bios release is 1.40
http://support.advantech.com/support/DownloadSRDetail.aspx?SR_ID=1-22S1SY

1)you don`t have hyper threading enabled
2)ACPI is disabled

with 2 procs operating systems will see 4 cores(each CPU+hyper threading )

L.E:
print screen is from a pfsense on esxi but should be the same on your system
« Last Edit: April 02, 2012, 05:45:06 am by gabi »