Class NumaTopology
- Namespace
- DotCompute.Backends.CPU.Threading.NUMA
- Assembly
- DotCompute.Backends.CPU.dll
NUMA topology information with advanced features.
public sealed class NumaTopology
- Inheritance
-
NumaTopology
- Inherited Members
Properties
CacheLineSize
Gets the cache line size in bytes.
public int CacheLineSize { get; init; }
Property Value
DistanceMatrix
Gets the NUMA distance matrix (relative latency between nodes).
public IReadOnlyList<IReadOnlyList<int>>? DistanceMatrix { get; init; }
Property Value
IsNumaSystem
Checks if the system is a NUMA system.
public bool IsNumaSystem { get; }
Property Value
NodeCount
Gets the number of NUMA nodes.
public required int NodeCount { get; init; }
Property Value
Nodes
Gets the NUMA nodes.
public required IReadOnlyList<NumaNode> Nodes { get; init; }
Property Value
PageSize
Gets the page size in bytes.
public int PageSize { get; init; }
Property Value
ProcessorCount
Gets the total processor count.
public required int ProcessorCount { get; init; }
Property Value
SupportsMemoryBinding
Gets whether the system supports memory binding to specific nodes.
public bool SupportsMemoryBinding { get; init; }
Property Value
SupportsMemoryPolicy
Gets whether the system supports memory policy configuration.
public bool SupportsMemoryPolicy { get; init; }
Property Value
TotalMemoryBytes
Gets the total memory size across all NUMA nodes in bytes.
public long TotalMemoryBytes { get; }
Property Value
Methods
GetClosestNodes(int)
Gets the closest nodes to a given node, ordered by distance.
public IEnumerable<int> GetClosestNodes(int nodeId)
Parameters
nodeIdintThe reference node ID.
Returns
- IEnumerable<int>
Enumerable of node IDs ordered by proximity.
GetDistance(int, int)
Gets the distance between two NUMA nodes.
public int GetDistance(int fromNode, int toNode)
Parameters
Returns
- int
Distance value (lower is closer).
GetLoadBalanceInfo()
Gets load balancing statistics for all nodes.
public NumaLoadBalanceInfo GetLoadBalanceInfo()
Returns
- NumaLoadBalanceInfo
Load balancing information.
GetNodeForProcessor(int)
Gets the node for a specific processor.
public int GetNodeForProcessor(int processorId)
Parameters
processorIdintThe processor ID.
Returns
- int
The node ID containing the processor.
GetNodesByAvailableMemory()
Gets nodes sorted by available memory.
public IEnumerable<int> GetNodesByAvailableMemory()
Returns
- IEnumerable<int>
Enumerable of node IDs sorted by memory availability.
GetOptimalNodeForProcessors(IEnumerable<int>)
Gets the optimal node for memory allocation based on processor affinity.
public int GetOptimalNodeForProcessors(IEnumerable<int> processorIds)
Parameters
processorIdsIEnumerable<int>Processor IDs to consider.
Returns
- int
Optimal node ID for allocation.
GetProcessorsForNode(int)
Gets processors for a specific node.
public IEnumerable<int> GetProcessorsForNode(int nodeId)
Parameters
nodeIdintThe node ID.
Returns
- IEnumerable<int>
Enumerable of processor IDs in the node.