How to use all cores on a two sockets machine with Windows Server 2022 ?

Anonymous
2024-03-30T00:05:08+00:00

Hi,

I'm working on a aws instance, with windows server 2022, 2 sockets, 96 cores.

I have an application that create several child processes to process images, ideally 96 applications that will each run on a core.

The problem is that only half of my cpus are used, and when I look in the Task manager, it correspond to NUMA node 0.

I've read that with Windows 10 and Server 2022, processors groups don't exist anymore, and that all cpus should be available.

I've tried to use different Windows API call to set the NUMA group or CPU affinity, but nothing works, even with Task manager I cannot assign an exe on another group.

Is there something to do either in Windows to have all my processes use all cores, or in my c++ code to distribute the child processes on one or the other group?

Thanks

Windows for business Windows Server Performance System performance

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

7 answers

Sort by: Most helpful
  1. Anonymous
    2024-04-01T05:49:15+00:00

    Hello,

    Thank you for posting in Microsoft Community forum.

    Based on the description, I understand your question is related to use all cores on a two sockets machine with Windows Server 2022.

    1. Try below step to set CPU affinity for your child processes

    Open Task Manager, go to the Processes, right-click on the process you want to modify and select Set Affinity, choose the specific cores (logical processors) on which you want the process to run.

    1. You can configure the number of logical processors (threads) that are used during the boot process.

    In System Configuration utility, click Boot, select your boot entry, click Advanced options, under Number of processors, choose the maximum number of logical processors you want to use during boot.

    1. Windows Server 2022 supports hyper-threading, which means that some tasks can run concurrently on a single core. Due to the workload you have, you might not see full load on all logical cores—only on the physical ones.

    Have a nice day. 

    Best Regards,

    Molly

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-04-01T16:33:58+00:00

    Hi,

    thanks for your help. Unfortunately, none of this works.

    1. I can set affinity only for a CPU of a Processor Group (group 0), if I try on the Progessor Group 1, it set CPU of group 0 instead, I cannot have all cpus from both groups, or even the CPU of group 1, only group 0
    2. This is just to reduce the number of processors I want to use, by default it is not selected. And I can only see 48 cpus, not the 96. And if I select 48, when I boot I just have only 1 socket available, and 48 cpus, not 96 anymore.
    3. So would it be a bug of the task manager? Both Task Manager and Process Explorer from sysinternal show that half of cpus are used, and show only 50% of the global CPU load.
    0 comments No comments
  3. Anonymous
    2024-04-03T07:23:51+00:00

    Hello,

    Both Task Manager and Process Explorer display CPU usage information. However, they might not always show the complete picture.

    Task Manager typically shows the average CPU utilization across all cores. If you have multiple processor groups, it might not accurately reflect the load on individual cores within each group.

    Process Explorer provides more detailed information, including per-process CPU usage. It’s a powerful tool for analyzing system performance.

    The discrepancy you’re observing (50% global CPU load) could be due to various factors, it’s not necessarily a bug in Task Manager, but rather a combination of system design, configuration, and reporting limitations. Additionally, ensure that your BIOS settings and drivers are up to date to maximize CPU visibility and performance.

    Best regards,

    Molly

    0 comments No comments
  4. Anonymous
    2024-04-03T12:16:02+00:00

    Here is what I see :

    Image

    Some cpus from there second group have some activity, but my processes are all concentrated on first group. And I don't feel like it is a bug.

    I had a similar issue few weeks ago, and when running as administrator I could see both groups being used. But not anymore, no idea what happened.

    Note that this is an AWS EC2 instance, I don't have access to the BIOS. Maybe it's related to the fact it's a VM ?

    0 comments No comments
  5. Anonymous
    2024-04-05T07:56:09+00:00

    Hello,

    You mentioned that running as an administrator allowed you to see both CPU groups previously. However, this behavior changed. It’s essential to understand why:

    Check permissions: Ensure your current user has the necessary permissions to access CPU group information.

    VM Considerations: Since this is an AWS EC2 instance, it operates as a virtual machine (VM). VMs may have limitations compared to physical machines, such as restricted BIOS access.

    Kernel and Drivers: Verify that your kernel and drivers are up-to-date and compatible with the VM environment.

    Best regards,

    Molly

    0 comments No comments