A question that I get asked very often during my various SQL Server Consulting engagements is on how many NUMA nodes SQL Server is running on. Therefore I want to show you in today‘s blog post a few ways and techniques to find out how many NUMA nodes your SQL Server has.
For a general (deep dive) introduction to NUMA I recommend that you read the NUMA Deep Dive Series from Frank Denneman.
Windows OS Level
First I want to show you a few ways at the Windows OS level how you can find out how many NUMA nodes you have. The easiest way is to use the CPU view of Windows Task Manager. With the default setup Task Manager shows you how many CPU cores you have available.
As you can see from the picture, Windows also reports here the number of CPU sockets that you have available. Normally the number of CPU sockets corresponds to the number of NUMA nodes you have. If you want to be sure you can also change the display settings to the NUMA view.
After changing that the Task Manager shows you how many NUMA nodes you have available – in my case 4 NUMA nodes.
There is also the coreinfo.exe tool from the SysInternals tools which also reports how many NUMA nodes you have in your system. And this tool also tells you the latency times between the individual NUMA nodes.
SQL Server Level
When you don’t have access to the Windows Server itself, you can also use SQL Server to find out how many NUMA nodes you have available on your system. The easiest way is to look into the SQL Server Log, because during the startup phase SQL Server reports how many NUMA nodes were detected.
Alternatively you can also query the DMV sys.dm_os_memory_nodes, where SQL Server reports the available Memory Nodes. For every available NUMA node SQL Server creates one dedicated Memory Node (besides Memory Node ID 64, which is always present for the Dedicated Admin Connection).
Here you can also see that this SQL Server is running on a two-node NUMA system.
Summary
As you have seen in this blog post there are many different ways to find out how many NUMA nodes you have available on your system. Please feel free to leave a comment on how many NUMA nodes you are running SQL Server on.
Thanks for your time,
-Klaus
6 thoughts on “How many NUMA Nodes do I have?”
Can you extend this article to include how many NUMA nodes are in use on a VM physical host? This question is to ensure that a SQL VM with one NUMA node is not actually spread across multiple NUMA nodes on the VM physical host.
Hello Michael,
In that case you have to check your physical host.
-Klaus
Be careful with SQL Server VMs and NUMA: Do not enable CPU hot-plug in VMware vSphere for VMs with NUMA aware software like SQL Server using more than 8 cores in that VM: It will kill vNUMA exposure of physical NUMA topology to your VM.
vNUMA works best when 1 core per socket is chosen. In this case, NUMA topology is automatically exposed to your VM. If you have to define more cores per socket you should align core/socket assignment to your physical server’s topology.
Great Post, Thanks for putting it up !
Hey Klaus
Your way of explaining is extremely simple and fastest to digest.
You are Superb, Fantastic
How about:
select –> physical NUM nodes
memory_node_id
from sys.dm_os_memory_nodes
and
select –> NUMA node to CPU core
parent_node_id, scheduler_id, cpu_id, status, is_online
from sys.dm_os_schedulers