processor affinity group C#

Viewed 1394

I'm using Windows Server 2016 with 72 cores. I see that there are 2 groups of processors. my .net app will use one or the other groups. I need to be able to force my app to use the Group of my choice. I see a code example below but I am unable to make it work. I might be passing the wrong variables. I want the app to pick group 1 and all the processors then group 2 and all the processors.

my question is how do i force my .net app to use group 1 or group 2? i am not sure if the link below will work.

https://gist.github.com/alexandrnikitin/babfa4781c68f1664d4a81339fe3a0aa

I did try adding this to my config but the app only uses group 0 but i do show all the cores with this code. I know an option is to go to the bios and choose flatten but i'm not sure that is the right way to do things.

   <Thread_UseAllCpuGroups enabled="true"/>  
      <GCCpuGroup enabled="true"/>  
      <gcServer enabled="true"/> 
1 Answers
Related