Skip to content

[Feature] Support MPS (Multi-Process Service) compatibility with Consumable Shares #1283

Open

Description

@troychiu

Component

gpu-kubelet-plugin

Problem Statement

Overview

In #1257, MPS (Multi-Process Service) was explicitly disallowed when ConsumableShares is enabled to unblock the PR. This tracking issue is created to design and implement compatibility between MPS and Consumable Shares.
Reference discussion: PR #1257 Comment

Challenges

When ConsumableShares is enabled, multiple ResourceClaim objects can request fractional or shared access to the same physical GPU or dynamic MIG instance. Integrating MPS daemon management into this model introduces several architectural and lifecycle challenges:

  1. CUDA Runtime Pipe Restriction (CUDA_MPS_PIPE_DIRECTORY):
    • The CUDA runtime relies on CUDA_MPS_PIPE_DIRECTORY (e.g. /tmp/nvidia-mps) to locate the MPS control daemon pipe. A single container process can only connect to one MPS server pipe at a time.
    • If a workload requests multiple GPUs managed by separate MPS daemons, mounting multiple pipe directories causes collision, or the client application is unable to communicate with more than one MPS server simultaneously.
  2. MPS Daemon Lifecycle & Scope:
    • Per-Claim Daemons: Launching a daemon per ResourceClaim (e.g. mps-control-daemon-<claim-uid>) results in multiple daemons running on the same underlying physical GPU, causing pipe directory conflicts and competing CUDA contexts.
    • Multi-GPU / Multi-Device Daemons: Grouping multiple GPUs under a single MPS daemon creates a single fault domain where a CUDA error in one client process could reset the MPS server and impact unrelated GPUs.
  3. Node Restart & Determinism:
    • Allowing the first ResourceClaim prepared on a node to dynamically set the scope of an MPS daemon (CUDA_VISIBLE_DEVICES) introduces non-deterministic behavior across node reboots or driver restarts, potentially disrupting previously running workloads if prepare ordering changes.

Proposed Solution

Based on initial discussions in #1257:

  • Option A: Per-Device / Per-MIG MPS Daemons (Restricted to Single-Device/MIG Claims)
    • Scope each MPS daemon strictly to an individual GPU or dynamic MIG instance (i.e. CUDA_VISIBLE_DEVICES=<GPU-UUID>).
    • Restrict MPS sharing with ConsumableShares to single-device requests (1 GPU or 1 MIG instance per claim).
    • Multiple claims allocating from the exact same single GPU share that GPU’s dedicated MPS daemon.
    • Avoids multi-GPU pipe collisions and limits fault domain to the single physical GPU/MIG instance.
  • Option B: Dynamic Daemon Scope per Device Set
    • Allow the first prepared claim to define the MPS daemon scope (single GPU or multi-GPU set).
    • Reject subsequent claims requiring overlapping, non-identical device sets.
    • Requires persistent state management to preserve daemon scope across driver restarts.

Alternatives Considered

No response

Scope

Medium: New capability behind existing feature gate

Upstream Kubernetes Dependencies

No response

Additional Context

No response

Activity

  1. added
    needs-triage
    on Jul 29, 2026
  2. added this to the v0.6.0 milestone on Aug 28, 2026
  3. self-assigned this
    on Oct 20, 2026
  4. guptaNswati commented on Oct 20, 2026

    @guptaNswati
    Contributor

    Option A (one MPS daemon per GPU, and each claim can only request 1 GPU) seems more straightforward:

    Claim 1 (GPU-0) ──┐
                      ├──> GPU-0 (MPS daemon D0)
    Claim 2 (GPU-0) ──┘
    
    Claim 3 (GPU-0 + GPU-1) ──> rejected (multi-GPU claim)
    

    Few things to think about for claims sharing the same GPU:

    • Conflicting MPS config: defaultActiveThreadPercentage and pinned memory limits are set daemon-wide at startup. If two claims ask for different values, which one wins, or is the second claim rejected?
    • No mixing MPS and non-MPS claims: MPS puts a full GPU in EXCLUSIVE_PROCESS mode, so while the daemon runs, no non-MPS process (time-slicing or default claim) can create a CUDA context on that GPU.
    • No teardown until the last claim: unpreparing a claim today deletes its MPS daemon. With a shared daemon, it should only stop when the last claim using it is unprepared.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component/gpu-kubelet-pluginfeature-gate/MPSSupportneeds-triagesize/medium

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions