// Module included in the following assemblies:
//
// * scalability_and_performance/cnf-numa-aware-scheduling.adoc

:_mod-docs-content-type: CONCEPT
[id="cnf-numa-resource-scheduling-strategies_{context}"]
= NUMA resource scheduling strategies

[role="_abstract"]
To optimize the placement of high-performance workloads, the secondary scheduler uses NUMA-aware scoring strategies to select the most suitable compute nodes. This process assigns workloads based on resource availability while allowing local node managers to handle final resource pinning.

When scheduling high-performance workloads, the secondary scheduler determines which compute node is best suited for the task based on its internal NUMA resource distribution. While the scheduler uses NUMA-level data to score and select a compute node, the actual resource pinning within that node is managed by the local Topology Manager and CPU Manager.

When a high-performance workload is scheduled in a NUMA-aware cluster, the following steps occur:

. *Node filtering*: The scheduler first filters the entire cluster to find a shortlist of _feasible_ nodes. A node is only kept if the node meets all requirements, such as matching labels, respecting taints and tolerations, and, importantly, having sufficient available resources within its specific NUMA zones. If a node cannot satisfy the NUMA affinity of the workload, the node is filtered out at this stage.

. *Node selection*: When a shortlist of suitable nodes is established, the scheduler evaluates them to find the best fit. The scheduler applies a NUMA-aware scoring strategy to rank these candidates based on their resource distribution. The node with the highest score is then selected for the workload.

. *Local Allocation*: When the pod is assigned to a compute node, the node-level components (CPU, memory, device, and topology managers) perform the authoritative allocation of specific CPUs and memory. The scheduler does not influence this final selection.

The following table summarizes the different {product-title} strategies and their outcomes:

.Scoring strategy summary
[cols="2,3,3", options="header"]
|===
|Strategy |Description |Outcome
|`LeastAllocated` |Favors compute nodes that contain NUMA zones with the most available resources. |Distributes workloads across the cluster to nodes with the highest available headroom.
|`MostAllocated` |Favors compute nodes where the requested resources fit into NUMA zones that are already highly utilized.|Consolidates workloads on already utilized nodes, potentially leaving other nodes idle.
|`BalancedAllocation` |Favors compute nodes with the most balanced CPU and memory usage across NUMA zones. |Prevents skewed usage patterns where one resource type, such as CPU, is exhausted while another, such as memory, remains idle.
|===
