Script: Get CPU Topology and Core Counts

This script returns how CPU resources are presented to SQL Server, including NUMA nodes, CPU counts, and scheduler distribution. It helps confirm whether the instance is seeing the hardware as expected and whether CPU layout aligns with licensing, performance, and workload design.

This is typically checked during performance investigations, new server validation, and post-migration reviews.


The Script


Example Output

The first result set shows how CPUs are grouped into NUMA nodes and how many schedulers are available per node. The second result set provides scheduler-level detail, allowing you to confirm CPU distribution and online status.

This makes it easy to spot uneven NUMA layouts, offline schedulers, or unexpected CPU visibility.

SQL Server query showing CPU topology, NUMA nodes, and scheduler distribution

Notes

  • Useful for validating CPU visibility after provisioning or VM changes
  • Helps confirm NUMA alignment and scheduler distribution
  • Important when assessing performance issues or licensing constraints
  • Common baseline check before tuning parallelism settings

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *