1

I'm seeing that the environment variable NUMBER_OF_PROCESSORS is incorrect on my newly installed Dell PowerEdge 740xd Gen 14 running Windows Server 2012 R2 Standard.

The machine contains 2 CPUs - Intel Platinum Xeon 8173M. Each CPU contains 28 cores, so 56 total cores but each core is hyperthreaded so there are 112 threads total. I expect to see NUMBER_OF_PROCESSORS=112 but I see NUMBER_OF_PROCESSORS=56 . I can go into Control Panel, System and manually change the value of NUMBER_OF_PROCESSORS, but when the machine is restarted, it goes back to 56.

It's important to note that the various system tools such as msinfo32 and Task Manager report the correct number of processors, cores and threads.

I found a related thread here: How is NUMBER_OF_PROCESSORS env variable generated? and at the bottom, it suggests to turn off Node Interleaving in the BIOS Settings. I found that Node Interleaving was already off on my machine, but I decided to turn it on and the effect was that NUMBER_OF_PROCESSORS changed to 64.

On my older Dell Gen 13 machines running the same os, I do correctly see the NUMBER_OF_PROCESSORS env var set to number_of_cpus x cores_per_cpu x 2 . So this appears to be an issue related to Dell Gen 14.

2
  • Did you disable hyperthreading? Is one processor disabled? Is the system BIOS/firmware up to date? Oct 14, 2020 at 18:00
  • @Michael Hampton - No, no and yes. Note that the other system tools show the correct number of threads. My only issue is with the NUMBER_OF_PROCESSORS env var.
    – sevzas
    Oct 14, 2020 at 18:04

1 Answer 1

3

NUMBER_OF_PROCESSORS cannot indicate more than 64 processors, as that's the plain limit with 64-bit Windows.

Windows uses processor groups to manage more than 64 processors, see https://docs.microsoft.com/de-de/windows/win32/procthread/processor-groups

The NUMBER_OF_PROCESSORS ENV variable is just one way to indicate to software what processing resources are around. With node interleaving disabled, the OS tries to prevent overloading by indicating just physical core. With node interleaving enabled, it tries to indicate SMT threading, but fails for the sheer size. "64" is the hard limit for this "API". The variable is pretty low grade anyway as it's intended for batch scripting and such.

There are more reliable and more detailed ways to find out about the CPU setup, which is what other tools use. You could try with Powershell (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors, possibly that's more precise.

2
  • this seems like a reasonable answer and the link you included is informative. Can you cite any sources that support your assertion that NUMBER_OF_PROCESSORS cannot exceed 64?
    – sevzas
    Oct 16, 2020 at 13:21
  • Check the link - it's (somewhat) indicated by "support for systems that have more than 64 logical processors is based on the concept of a processor group". The Windows kernel wasn't designed to handle more processors than there are bits in a CPU word/register, so MS invented processor groups as a workaround.
    – Zac67
    Oct 16, 2020 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.