Export (0) Print
Expand All

NumaNode Class

The NumaNode object represents the settings for a NUMA node on an instance of SQL Server.

System.Object
  Microsoft.SqlServer.Management.Smo.NumaNode

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public sealed class NumaNode

The NumaNode type exposes the following members.

  NameDescription
Public propertyAffinityMaskGets or sets the affinity type for the NUMA node represented by this NumaNode object.
Public propertyCpusGets a collection of Cpu objects that belong to this NumaNode object.
Public propertyGroupIDGets the GroupID that is assigned to this NUMA node.
Public propertyIDGets the ID of the NUMA node that is represented by this NumaNode object.
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

Access to the NumaNode object is though the AffinityInfo object that is contained in the Server object.

The following example shows how to display all the NUMA nodes on the local instance of SQL Server and the CPUs that belong to each NUMA node.

using System;
using Microsoft.SqlServer.Management.Smo;

namespace samples
{
    class Program
    {
        static void Main(string[] args)
        {
            Server dbServer = new Server("(local)");
            dbServer.Refresh();
            foreach (NumaNode node in dbServer.AffinityInfo.NumaNodes)
            {
                //Display the AffinityMask, GroupID and ID of
                //each NUMA node.
                Console.WriteLine("AffinityMask: {0}\n" +
                                  "GroupID:      {1}\n" +
"ID:           {2}\n",
                    node.AffinityMask.ToString(),
                    node.GroupID, node.ID);
                //Display the ID of each CPU that belongs
                //to this NUMA node.
                Console.Write("CPUS          :");
                foreach(Cpu cpu in node.Cpus)
                    Console.Write("{0} ", cpu.ID);
            }
        }
    }
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft