I’m often asked on how to identify the number of CPU’s (physical) and NUMA Nodes (logical CPU’s) from SQL Server. Here’s a quick and easy way to obtain such information.

Run the below query on the instance of SQL Server:

1SELECT
2   (cpu_count / hyperthread_ratio) AS Number_of_PhysicalCPUs,
3   CPU_Count AS Number_of_LogicalCPUs
4FROM sys.dm_os_sys_info