Skip to main content
Modern AI/ML workloads depend heavily on high-throughput, low-latency communication between nodes. In GPU clusters connected via InfiniBand™, the physical network topology has a direct impact on performance. Topology-aware scheduling (TAS) enables Kubernetes schedulers to optimize workload placement based on how nodes are physically connected within the InfiniBand fabric. With this feature, Nebius AI Cloud exposes InfiniBand topology information as node labels, allowing schedulers to place workloads on nodes that are closer in the network hierarchy. This can improve communication efficiency and provide performance gains for distributed workloads. For more information about Kubernetes scheduling, see the Kubernetes scheduler documentation.

Prerequisites

  1. Create a Managed Service for Kubernetes cluster and attach at least one GPU node group to it.
  2. Install kubectl.
  3. Connect to the cluster by using kubectl.

How to view topology labels in your cluster

View the topology labels on GPU nodes with the following command:
The following labels can be present on GPU nodes: The lower the tier level shared by two nodes, the better the expected communication performance between them. For example, two nodes with the same topology.nebius.com/tier-1 value are expected to be closer to each other than two nodes that only share the same topology.nebius.com/tier-2 value.

Example output

Nodes that share the same value for a label belong to the same topology domain at that level. A topology domain is a group of nodes that are physically close to each other in the network hierarchy and are therefore expected to have faster communication between them. For example, in the sample output:
  • computeinstance-e00f4wsk77x4vsr58s and computeinstance-e00v7g42bam61yqzp3 share the same GPU-CLUSTER-ID and TIER-2 values, which means they belong to the same high-speed network domain and the same wider network locality domain. These nodes have different TIER-1 values, which indicates that they belong to different lower-level locality domains.
  • computeinstance-e00tw5jypq4zvfrsrx belongs to a different GPU cluster and topology hierarchy because all of its topology label values are different.
  • computeinstance-e00nm33x3y9597zzxj does not have topology labels. This usually means that the node is not attached to a GPU cluster, or TAS is not enabled.
The exact physical meaning of each tier depends on the infrastructure configuration and is not guaranteed to match these examples.

How to enable topology-aware scheduling

Kueue is used below as an example scheduler. You can also use other schedulers that support TAS, such as Volcano.

Steps

Install and configure Kueue

  1. Install Kueue.
  2. Enable TAS:
  3. Create a file named kueue-tas.yaml to configure the Kueue resources:
    To get the <node_group_ID>, open your Kubernetes cluster in the web console, go to the Node groups tab and copy the node group ID.
  4. Apply the configuration:
  5. Check that the Kueue resources were created:

Schedule workloads with TAS using Kueue

To request TAS, add a topology annotation to the Pod template of your workload.
  1. Create a file named job-tas.yaml that requests TAS for the workload:
    Replace the following variables:
    • <number_of_replicas>: Number of Pods that are running in parallel.
    • <annotations_string>: Requested topology constraint. See the following table for available values: In Kueue, a podset represents a group of Pods belonging to the same workload (for example, replicas of a Job).
  2. Create the Job:
  3. Check admission status:
    If Kueue does not admit the workload, reduce parallelism, use less restrictive topology constraints or increase available GPU capacity.

InfiniBand and InfiniBand Trade Association are registered trademarks of the InfiniBand Trade Association.