Number of CPUs per NUMA node

A word of advice: the script assumes that you have the exact number of CPUs per NUMA node, WHICH MIGHT NOT BE THE CASE IN YOUR SCENARIO:

SELECT COUNT(DISTINCT memory_node_id) AS numnodes,
(
SELECT TOP (1)
(SUM(online_scheduler_count) OVER (PARTITION BY memory_node_id))
FROM sys.dm_os_nodes
ORDER BY (SUM(online_scheduler_count) OVER (PARTITION BY memory_node_id)) DESC
) AS numcores
FROM sys.dm_os_nodes
WHERE node_id <span id="mce_SELREST_start" style="overflow:hidden;line-height:0;">&#65279;</span>&lt; 64;

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.