0

I have a client running a system with dual Xeon Platinum 8160 hyperthreaded 24 core CPUs and Windows 10 Pro for Workstations 64 bit. When he runs my app, Environment.ProcessorCount reports there are 32 logical processors available for use by the CLR. The client spent a lot of money on this system and wants my app to utilize all 96 logical processors. No problem! Based on Microsoft's documentation, I've made the following settings to my app.config

  <runtime>
    <Thread_UseAllCpuGroups enabled="true"/>
    <GCCpuGroup enabled="true"/>
    <gcServer enabled="true"/>
  </runtime>

This should allow the CLR and my app access to all the logical processors present on the client's machine. But sadly, Environment.ProcessorCount still reports 32 instead of 96. What am I missing?

I've checked that his system has 2 processor groups of 48 logical processors each. Two NUMA cores which map to the two physical sockets. So if I wasn't truly given access to both processor groups, I could see Environtment.ProcessorCount giving me a result of 48, but I have no idea where it's getting 32 from.

Update

I had this client run Eric Ouellet's SharpTestProcessorThreading app. These were his results:

Client SharpTestProcessorThreading results

So the big question remaining in my mind is why does WMI report 96 global logical processors and Environment.LogicalProcessorCount report 48 Global logical processors? Is the zero bit processor mask on the second NUMA node a problem that could lead to the mismatch in logical processor count?

  • Maybe you need Workstatiom edition instead of Pro. I have read an article that targets the same issue, but I was not able to find it now. – ZorgoZ Oct 18 '19 at 17:45
  • Good point. Just checked with the client and he is already running Pro for Workstations. I'll update the question to reflect that. Thanks! – NateHanson Oct 21 '19 at 16:40
  • There's [this](https://stackoverflow.com/q/26830237/4137916) and that in turn links to [this](https://stackoverflow.com/q/28098082/4137916). Both these questions have a ton of potentially helpful background material. – Jeroen Mostert Oct 21 '19 at 18:46
  • Hat tip to @JeroenMostert! That second link got me looking at my project settings. Visual Studio had set the Prefer 32 Bit option when it created the project. So I turned that off, sent a 64 bit only build to the client and the machine now reports 48 logical cores available to the CLR. So that's one whole processor group. I'm making progress, but I still don't understand why setting Thread_UseAllCpuGroups doesn't give me both groups of 48. Does anyone have any other suggestions? I really appreciate it! – NateHanson Oct 22 '19 at 14:40
  • Things to check: if `Processor.ProcessorAffinity` gives anything (it should be all ones to indicate no affinity), that your configuration is actually applied (put in a deliberate syntax error to verify this), that your Task Manager actually says you have 96 logical processors (and not 48 because someone disabled hyperthreading) and what [this tool](https://github.com/EricOuellet2/SharpTestProcessorThreading) says. – Jeroen Mostert Oct 22 '19 at 14:57
  • Thanks again @JeroenMostert for the great info. I just heard back from the client. I'll post an update to the question up top. – NateHanson Oct 22 '19 at 19:53

0 Answers0