PreferredNode of a service not working anymore using WS2022

Klein, Matthias 1 Reputation point
2022-11-25T16:05:19.44+00:00

Hello,

I was using the preferredNode attribute for services (sc preferredNode <ServiceName> #Node) in the past to set the initial Numa node memory and cpu affinity.

Since I switched to Windows Server 2022 (OS Build 20348.1249) the cpu affinity is not working anymore. The underlying executable is always pinned to Node 0.

I double checked the behavior on a WS2019 instance, there it works fine, setting preferredNode to 1 starts the executable with cpu affinity at Node 1.

Anyone facing the same problem and found a solution?

Thanks

Matthias

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,613 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Klein, Matthias 1 Reputation point
    2022-11-28T14:54:39.63+00:00

    Hello Wesley,

    thanks for your reply.
    Unfortunately there are no logs showing the issue.

    I create some screenshots to show you the issue I am facing.

    • How I set the preferredNode for my service

    264846-set-preferrednode.jpg

    • Start service

    264769-start-service.jpg

    • check affinity

    264740-affinity.jpg

    As said... using the same procedure on versions < WS2022 works fine.
    The server has 8 Numa Nodes.

    Any help appreciated.

    Thanks and cheers
    Matthias


  2. Wesley Li-MSFT 4,401 Reputation points Microsoft Vendor
    2022-11-30T08:01:04.527+00:00

    Hello.

    Starting with windows 10 Build 20348, NUMA support has changed, see if this event helps your problem:

    https://learn.microsoft.com/en-us/windows/win32/procthread/numa-support

    0 comments No comments

  3. Klein, Matthias 1 Reputation point
    2022-12-07T09:36:56.473+00:00

    Hello Wesley,

    thanks for your reply. I was already aware about the changes regarding NUMA with this build.
    Unfortunately I am not recoding an application to make use of the new functionalities, I want to use existing tools like start.exe, sc etc. to configure NUMA affinity.
    Is there a way to set the affinity via powershell or command line instead of selecting the process via task manager and setting the affinity manually?

    Thanks and cheers
    Matthias