3.2 Orchestration and job scheduling

NCA-AIIO · AI Operations (22% of the exam) · Official objective: “Describe AI cluster orchestration and job scheduling essentials.”

How Kubernetes, Slurm, Run:ai and Base Command Manager hand out GPUs.

Key points

  1. A device plugin is the Kubernetes mechanism that advertises special hardware to the scheduler. With NVIDIA's device plugin deployed, a container requests GPUs with the nvidia.com/gpu resource type. The scheduler then places the pod only on a node with that many free GPUs.

    What NVIDIA says (1)

    “With the daemonset deployed, NVIDIA GPUs can now be requested by a container using the nvidia.com/gpu resource type”

    — NVIDIA device plugin for Kubernetes

  2. Orchestration is the automated placement and management of workloads on shared resources. NVIDIA Run:ai is a GPU orchestration and optimization platform that aims to maximize compute utilization for AI workloads. Administrators define projects, departments and user roles, and Run:ai enforces policies for fair resource distribution.

    What NVIDIA says (2)

    “Allows administrators to define Projects, Departments and user roles, enforcing policies for fair resource distribution.”

    — NVIDIA Run:ai Documentation: Overview

    “NVIDIA Run:ai is a GPU orchestration and optimization platform that helps organizations maximize compute utilization for AI workloads.”

    — NVIDIA Run:ai Documentation: Overview

  3. Gang scheduling, also called batch scheduling, treats a group of pods as one unit. The NVIDIA Run:ai Scheduler documentation describes it as a workload of many pods being either fully scheduled or fully pending. That stops half of a job from starting and sitting idle.

    What NVIDIA says (1)

    “Gang scheduling describes a scheduling principle in which a workload composed of multiple pods is either fully scheduled (all pods are scheduled and running) or fully pending (none of the pods are running).”

    — NVIDIA Run:ai Scheduler: Concepts and Principles

  4. Base Command Manager (BCM) is NVIDIA's cluster management software. The DGX SuperPOD reference architecture says it automates provisioning and administration. NVIDIA's product page says it integrates with tools like Slurm or NVIDIA Run:ai. Slurm is a widely used job scheduler for high-performance computing.

    What NVIDIA says (3)

    “It automates provisioning and administration, and supports clusters into the thousands of nodes”

    — DGX SuperPOD H100 Reference Architecture: Components

    “NVIDIA Base Command Manager streamlines cluster provisioning, workload management, and infrastructure monitoring.”

    — NVIDIA Base Command Manager Documentation

    “Integrate with tools, like Slurm or NVIDIA Run:ai , to support traditional HPC or AI and analytics workloads across bare-metal and containerized environments.”

    — NVIDIA Base Command Manager

  5. Kubernetes is a container orchestration system. An Operator is a Kubernetes pattern for automating the management of a software component. NVIDIA says configuring GPU nodes by hand needs several components, such as drivers and container runtimes, and is error-prone. The GPU Operator automates all of them: the driver, the device plugin, the Container Toolkit, GPU Feature Discovery (GFD) labels and DCGM (Data Center GPU Manager) monitoring.

    What NVIDIA says (2)

    “The NVIDIA GPU Operator uses the operator framework within Kubernetes to automate the management of all NVIDIA software components needed to provision GPU.”

    — About the NVIDIA GPU Operator

    “These components include the NVIDIA drivers (to enable CUDA), Kubernetes device plugin for GPUs, the NVIDIA Container Toolkit , automatic node labeling using GFD , DCGM based monitoring and others.”

    — About the NVIDIA GPU Operator

  6. Many HPC clusters do not let users run a privileged container daemon. Pyxis is NVIDIA's Slurm plugin that lets unprivileged users run containerized tasks through srun. It requires enroot, NVIDIA's tool that works like an enhanced unprivileged chroot.

    What NVIDIA says (3)

    “It allows unprivileged cluster users to run containerized tasks through the srun command.”

    — NVIDIA Pyxis: container plugin for Slurm

    “Installation Pyxis requires the enroot container utility (version 3.1.0 ) to be installed.”

    — NVIDIA Pyxis: container plugin for Slurm

    “Enroot can be thought of as an enhanced unprivileged chroot(1) .”

    — NVIDIA/enroot

  7. By default Pyxis removes a container when the Slurm task ends. With --container-name, the container is saved on the host. If a container with that name already exists, Pyxis uses it and skips the import, which saves time on repeated steps.

    What NVIDIA says (2)

    “Unnamed containers are removed after the slurm task is complete; named containers are not.”

    — NVIDIA Pyxis: container plugin for Slurm

    “If a container with this name already exists, the existing container is used and the import is skipped.”

    — NVIDIA Pyxis: container plugin for Slurm

  8. NFD labels nodes with their hardware features, which the GPU Operator uses to find GPU nodes. The GPU Operator documentation says it deploys NFD by default, so if NFD is already running you must disable the Operator's NFD deployment. You can check by looking for feature.node.kubernetes.io labels on your nodes.

    What NVIDIA says (2)

    “By default, NFD master and worker are automatically deployed by the Operator.”

    — GPU Operator: Installing the NVIDIA GPU Operator

    “If NFD is already running in the cluster, then you must disable deploying NFD when you install the Operator.”

    — GPU Operator: Installing the NVIDIA GPU Operator

  9. The device plugin's job is to advertise GPUs to Kubernetes so pods can request them. Its README says it currently lacks comprehensive GPU health checking and GPU cleanup features. Health monitoring should come from tools built for it, such as DCGM and DCGM Exporter.

    What NVIDIA says (1)

    “The NVIDIA device plugin is currently lacking Comprehensive GPU health checking features GPU cleanup features”

    — NVIDIA device plugin for Kubernetes

  10. Node provisioning means transferring the software image to the nodes. The DGX SuperPOD administration guide says it is done by provisioning nodes. The head node always has the provisioning role, and larger clusters can add more provisioning nodes to spread network load when many nodes boot. Each provisioning node keeps copies of the images on its local drive.

    What NVIDIA says (4)

    “Provisioning Nodes # The action of transferring the software image to the nodes is called node provisioning and is done by special nodes called the provisioning nodes.”

    — DGX SuperPOD Administration Guide: Provisioning Nodes

    “More complex clusters can have several provisioning nodes configured by the administrator, thereby distributing network traffic loads when many nodes are booting.”

    — DGX SuperPOD Administration Guide: Provisioning Nodes

    “A provisioning node keeps a copy of all the images it provisions on its local drive, in the same directory as where the head node keeps such images.”

    — DGX SuperPOD Administration Guide: Provisioning Nodes

    “Similar to how the head node always has a boot role, the head node also always has a provisioning role.”

    — DGX SuperPOD Administration Guide: Provisioning Nodes

  11. Software environments drift as packages update. NVIDIA's DGX Cloud Slurm guide says its Slurm implementation uses Pyxis and Enroot as the container plugin and runtime, and that building a containerized environment gives a frozen environment for training without package compatibility concerns.

    What NVIDIA says (2)

    “Preparing a Customized Container Image # The Slurm implementation in your DGX Cloud cluster leverages Pyxis and Enroot as the container plugin and runtime.”

    — DGX Cloud Slurm: Workload Examples

    “By building a containerized environment, we have a frozen environment to perform model training whenever possible without concerns of package compatibility. 4.1.3.1.”

    — DGX Cloud Slurm: Workload Examples

  12. Schedulers such as Slurm can run a prologue before a job and an epilogue after it. NVIDIA's DCGM guide describes a per-job group lifecycle: create and configure the group in the prologue and verify the GPUs are ready, let DCGM handle requested behaviors in the background while the job runs, and extract target information in the epilogue. DCGM groups are intended to match the scheduler's idea of a node-level job.

    What NVIDIA says (3)

    “Groups are intended to help the user manage collections of GPUs as a single abstract resource, usually correlated to the scheduler’s notion of a node-level job.”

    — DCGM Feature Overview

    “During prologue operations the group is created, configured, and used to verify the GPUs are ready for work.”

    — DCGM Feature Overview

    “During epilogue operations the groups is used to extract target information.”

    — DCGM Feature Overview

  13. Small inference models often leave most of a GPU idle. NVIDIA says Run:ai can fractionally allocate GPUs across inference, embedding and generation tasks so organizations can run more models in parallel without resource contention.

    What NVIDIA says (1)

    “By fractionally allocating GPUs across inference, embedding, and generation tasks, organizations can run more models in parallel without resource contention.”

    — NVIDIA Run:ai

Key terms

Try it

Sample question

How does a Kubernetes pod ask for a GPU once the NVIDIA device plugin is running?

Show the answer

Answer: By requesting the nvidia.com/gpu resource in its resource limits, for example nvidia.com/gpu: 1.

A device plugin is the Kubernetes mechanism that advertises special hardware to the scheduler. With NVIDIA's device plugin deployed, a container requests GPUs with the nvidia.com/gpu resource type. The scheduler then places the pod only on a node with that many free GPUs.

What NVIDIA says (1)

“With the daemonset deployed, NVIDIA GPUs can now be requested by a container using the nvidia.com/gpu resource type”

— NVIDIA device plugin for Kubernetes

Practice 3.2 (13 questions) Full AI Operations guide

← 3.1 Data center management and monitoring · 3.3 Monitoring GPUs →