How is NUMBER_OF_PROCESSORS env variable generated?

I have a couple of HP BL460Cs that are being tested to determine which processor we want to go with when we start upgrading our equipment, and there's a problem with this environment variable on one of them.

The blade is running Windows 7 Enterprise, and the NUMBER_OF_PROCESSORS variable reports 14 processors, but there are two 14 core processors installed in the machine, so we should be seeing double that number. I was able to verify that both processors are installed and detected by the machine via msinfo32 and device manager.

Is there something that could be messing with how the variable is generated? What process does Windows even use to set this number? I know that it can be edited, but it's just reset after reboot, so that doesn't really help. Any insight you guys have would be immensely appreciated.

Update: Decided to rebuild the machine as Windows 2008R2 in order to see if it would change or fix the issue, but it persisted. So, the technically incompatible configuration is likely not the cause.


Solution 1:

Okay... I'm really curious why you want to run Windows 7 on these servers instead of Windows server editions. Can you give more specifics on your environment?

You're using an HP ProLiant BL460c Gen9 server with two very high-end Intel E5-2697v3 14-core CPUs.

While HP manufactured workstation-specific blade servers up until the Gen8 ProLiant line, there's no Gen9 equivalent yet.

At this point, I suspect a few things:

  • Windows 7 Enterprise can support two CPU sockets and 64 logical cores, but you're only seeing one socket's worth of CPUs. I suppose you're expecting to see 28 cores?

  • Is your system fully updated from an OS perspective? If not, please run all OS updates. This is a new CPU released a few weeks ago on a VERY new server platform. I doubt you'll find other people with this combination of OS and hardware right now.

  • Are you up-to-date on system firmware? If not, update it.

  • HP did not intend for this server model to be used with Windows 7, so doing so would kill your ability to run health management agents and the value-add drivers on the hardware.

  • You can potentially use Windows 2008 R2 drivers/firmware for the system, but it's all unsupported.

Solution 2:

As far as I know, $ENV:NUMBER_OF_PROCESSORS is derived from WMI, using: Win32_ComputerSystem.NumberOfLogicalProcessors

To add to the confusion, Win32_ComputerSystem also reports the number of physical CPUs as NumberOfProcessors.

You can use WMIC or PowerShell to assess these values:

Get-WmiObject -Class Win32_ComputerSystem|Select NumberOf*

If your machine shows NumberOfProcessors as just 1, you might either have a hardware issue, or an license activation issue, since only the Enterprise, Professional and Ultimate editions of Windows 7 will recognize more than one physical CPU

Solution 3:

Windows 7 is not a supported operating system to run on that hardware, which is a good enough explanation for me at to why it's not correctly reporting on your installed hardware. The other reasons in Mathias' answer may ultimately be the cause too, but generally speaking, "unsupported configuration" is a good enough explanation for professional systems administration purposes.

As far as Windows systems, only Windows Server OSes 2003 and above are supported on the BL460Cs, and for that matter, on most HP server hardware.