In this series / On this page· 9 of 18
Serving in Production
  1. 1. Disaggregated Serving: Dynamo, llm-d, and When Splitting Prefill from Decode Pays
  2. 2. TTFT, ITL, Goodput: Measuring What Users Feel
  3. 3. Benchmark an Inference Server Without Lying to Yourself
  4. 4. Expert Parallelism, and What DeepEP Does for It
  5. 5. Serving Kimi K3.1 Pro: The State per Request, the Indexer's Cost, and Where 1M Tokens Fit
  6. 6. Other Users' Data in the KV Cache: What Cloudflare's GLM-5.3 Incident Teaches Operators
  7. 7. Flow Control in the Serving Stack: What llm-d, Dynamo and AIBrix Do When the Fleet Is Full
  8. 8. Context Parallelism for Long-Context Serving: PCP and DCP in vLLM and SGLang
  9. 9. Several Models, One GPU: Time-Slicing, MPS, MIG, and What CUDA 13.4's Memory Caps Change
  10. 10. Serving Mistral Large 4: What Its Cache Costs and Where It Fits
  11. 11. Prefix-Aware Routing Across Replicas: Kubernetes Service, Dynamo's KV Router, the llm-d EPP and Kinference
  12. 12. Serving Ripple-65B: What a Dense Model with 1M Context Costs, and When It Beats an MoE
  13. 13. Cost per Million Tokens, Computed: GPU-Hours, Utilization, and the Cache
  14. 14. Kinference at alpha.7: What Buoyant's Inference Control Plane Does, and What It Reuses
  15. 15. Splitting Off the Vision Encoder: When Encoder Disaggregation Pays in vLLM
  16. 16. The Cache Hit That Changed the Answer
  17. 17. Prefix Caches That Collapse Under Bursts, and the Session Cap That Prevents It
  18. 18. MLPerf Endpoints v1.0: How to Read an Agentic Inference Benchmark
9 of 18

Several Models, One GPU: Time-Slicing, MPS, MIG, and What CUDA 13.4's Memory Caps Change

Time-slicing, MPS, MIG and DRA for several models on one GPU: what each isolates, what interference costs, and what CUDA 13.4's memory caps change.

32 min readUpdated

Two vLLM servers on one GPU at --gpu-memory-utilization 0.45 each look partitioned, but that number is a promise each engine makes to itself: nothing below it stops one server from taking the other's memory, and under MPS a fault in one takes the other down. We measured what each sharing mode costs a chat model next to a prefill-heavy neighbour, and MPS at its defaults was the worst arm by far: 8.4 times the inter-token latency of running alone, against 2.3 times for plain time-slicing, until we capped the neighbour's threads.

Answer first: what each mode separates

A shared GPU has three things to divide: memory, compute, and the blast radius of a fault. Each mode divides a different subset.

Mode Memory Compute Application fault in one process Engine's memory fraction is of Needs Victim ITL vs alone (measured, one chip, one workload)
Time-slicing Not separated Turns on the whole GPU Stays in that process (measured) The whole device Any GPU 2.3x
MPS, defaults Not separated Kernels run concurrently, no share Reaches every client (measured) The whole device One daemon, same UID for all clients 8.4x
MPS with legacy limits Hard cap at allocation A thread ceiling per client, not a reservation Reaches every client Still the whole device (measured) Same 1.6x (thread cap only: neighbour at 50%)
MPS v3 memory partitioning (CUDA 13.4) Hard limit plus soft guarantee (cgroup v2) time-sharing or sm-sharing sm-sharing: one error domain; time-sharing: at best as time-slicing (not tested) The hard limit Driver R615+, cgroup v2 Not measured
MPS v3 compute controls (CUDA 13.5) As above Reserved SM partitions that may borrow idle SMs; weighted turns between servers Reaches every client, per the containment docs (not tested) The hard limit Driver R620+ Not measured
MIG Hardware slice Hardware slice Stays in the instance The instance H100, H200, B200, GB200, GB300, RTX PRO 6000 Blackwell Not measured
HAMi Software cap (CUDA API interception) Software SM limit Not documented (not tested) Not checked here Its device plugin Not measured

The decisions (measurements and Kubernetes routes below):

  • One team's trusted services, no MIG: MPS, never at its defaults: cap the batch-like client's threads or, on R620, reserve an SM partition for the latency-critical one; limit each client's memory, give each engine an explicit KV size.
  • Tenants, or anything that must survive a neighbour's crash: MIG where the card has it, otherwise separate GPUs. MPS shares one error domain, v3 included; v3's time-sharing at best matches time-slicing.
  • Time-slicing: development, notebooks, batch jobs. It contains application faults better than MPS, but nothing stops one process from taking another's memory.

What changed on 27 October: NVIDIA's Kubernetes post put CUDA 13.4's driver-enforced memory limits behind pod annotations, through KAI Scheduler and the new gpu-fractioning operator. The memory boundary is new; the fault domain under sm-sharing is not. CUDA 13.5 (4 November, driver R620) adds compute controls to MPS v3, which no Kubernetes route exposes yet.

Four panels, one GPU each, with a grid of what each separates: time-slicing (one context at a time on all SMs, one memory pool, a fault stays in its process), MPS (kernels from both clients on the same SMs at once, one memory pool, one error domain), MPS v3 in sm-sharing (a memory wall between clients, still one error domain), MIG (SMs, memory and error domain cut into instances)Four panels, one GPU each, with a grid of what each separates: time-slicing (one context at a time on all SMs, one memory pool, a fault stays in its process), MPS (kernels from both clients on the same SMs at once, one memory pool, one error domain), MPS v3 in sm-sharing (a memory wall between clients, still one error domain), MIG (SMs, memory and error domain cut into instances) Only MIG separates memory, compute and faults at once; CUDA 13.4 adds a memory wall to MPS but keeps one error domain under sm-sharing.

Your engine's memory number is a promise, not a partition

--gpu-memory-utilization and --mem-fraction-static tell an engine how much to take, not the driver, and the two engines measure different things.

vLLM 0.33.0. The fraction is of the device's total, per instance: "if you have two vLLM instances running on the same GPU, you can set the GPU memory utilization to 0.5 for each instance" (config/cache.py L215-L224). At start, vLLM requests total x u and refuses to start ("Free memory on device ... on startup is less than desired GPU memory utilization") if free memory is below that (v1/worker/utils.py L761-L770). If it starts, its KV cache is the requested amount minus its own weights, activations and CUDA graphs (gpu_worker.py L753-L757). The neighbour is never subtracted: it can only stop vLLM from starting. In our runs, two Qwen3-8B servers at 0.30 each got about 20.5 GiB of KV cache (about 149,000 tokens), the second within 0.2 GiB of the first. A neighbour that grows after start surfaces as an OOM in this server's activations or CUDA-graph buffers or, on unified memory, as an earlyoom kill.

One catch: vLLM measures its own non-KV memory as the drop in global free memory while it profiles (mem_utils.py L311-L321). A neighbour that allocates or frees during that window skews the KV budget. Start servers one at a time and wait for /v1/models before starting the next.

SGLang v0.5.23 (tagged 29 October, released on GitHub 2 November). --mem-fraction-static covers "model weights and KV cache memory pool", but the slack it leaves is (1 - f) times the free memory measured before loading weights, and the pool takes whatever is free after the weights minus that slack (kv_cache_configurator.py L2990-L3050). Start it second and it sizes its pool against the leftovers; start it first and the neighbour gets only the slack. Two SGLang servers with the same fraction get unequal pools: set --max-total-tokens on both.

Bars of device memory: vLLM requests device total times u, checked once at start, with the neighbour never subtracted; SGLang keeps (1 - f) of the free memory before weights as slack, drawn started first and started second, where the neighbour already resident shrinks its KV poolBars of device memory: vLLM requests device total times u, checked once at start, with the neighbour never subtracted; SGLang keeps (1 - f) of the free memory before weights as slack, drawn started first and started second, where the neighbour already resident shrinks its KV pool vLLM's fraction is of the device and launch order only decides whether it starts; SGLang's share depends on who started first.

What a legacy MPS memory limit does to this. We ran a 1 GiB-at-a-time allocation loop (mem_probe.py) without MPS and under MPS with CUDA_MPS_PINNED_DEVICE_MEM_LIMIT=0=24G:

cudaMemGetInfo free / total at start Host MemAvailable at start Allocation loop
No MPS 96.3 / 121.63 GiB 116.6 GiB 32 GiB, stopped by the probe's own cap
MPS, 24G limit 23.85 / 121.63 GiB 116.5 GiB 23 GiB; the 24th fails (out of memory) with 93 GiB of host memory still available

The limit holds, even where device memory is system memory. Free memory is capped; total is not. Then we started vLLM under the same 24G limit. At --gpu-memory-utilization 0.30 it sized a 20.65 GiB KV cache (0.30 x 121.63 GiB, minus 15.27 GiB of weights and its overheads) and died allocating it:

# engine log excerpt: pid prefix and timestamps removed, the OOM message cut after "free"
INFO  [gpu_worker.py:772] Available KV cache memory: 20.65 GiB
ERROR [core.py:1584] torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.65 GiB.
      GPU 0 has a total capacity of 121.63 GiB of which 8.35 GiB is free.

At 0.90 it planned 93.56 GiB and died the same way. The start check passed because on integrated GPUs both engines read "free" from the host's MemAvailable (vLLM mem_utils.py L143-L151, SGLang common.py L427-L456), which the MPS limit does not touch. On a discrete GPU the check reads the capped free memory, so vLLM should refuse to start instead (from the source; not run). Either way the fraction is of the wrong number. Set the KV size directly: --kv-cache-memory-bytes in vLLM, which ignores --gpu-memory-utilization (cache.py L374-L381), and --max-total-tokens in SGLang, which caps the pool, whenever two engines share a GPU.

MPS v3 changes the arithmetic: under CUDA 13.4 memory partitioning, cuMemGetInfo "reports total and free memory capped to the hard limit" (MPS v3 memory partitioning), so vLLM's u becomes a fraction of the cap. We could not run v3 (it needs driver R615).

Time-slicing: separate contexts, no memory wall

Without MPS, each process gets its own CUDA context and address space, and the GPU switches between contexts. Nothing limits memory. The device plugin's timeSlicing replicas only multiply the advertised nvidia.com/gpu count.

On faults, NVIDIA's Kubernetes post promises "full error isolation", while the device plugin's README @ v0.20.1 says "if one workload crashes, they all do". The CUDA runtime scopes an illegal address to the faulting process (cudaErrorIllegalAddress), and the Xid catalog classes Xid 13 and 31 as application faults. We tested it: a 35-line CUDA program (fault_probe.cu) wrote to an unmapped address next to a serving vLLM. The kernel logged Xid 31 against fault_probe, the probe's next CUDA call returned the same error, and the victim finished all 24 requests at 69.4 ms median ITL, as if alone.

So the post is right for application faults and too strong as "full": uncontained ECC (Xid 95), a GPU off the bus (Xid 79) or a GSP timeout (Xid 119) needs a reset that ends every tenant. The README is wrong for ordinary crashes, right that memory is not isolated.

MPS: concurrent kernels, one error domain

Under MPS, the clients of one user share a server process that owns the GPU context, and their kernels run at the same time on the same SMs, in separate address spaces. You don't need root: run a daemon per user with private pipe and log directories, and give every client the same CUDA_MPS_PIPE_DIRECTORY:

$ export CUDA_MPS_PIPE_DIRECTORY=$HOME/mps/pipe CUDA_MPS_LOG_DIRECTORY=$HOME/mps/log
$ mkdir -p "$CUDA_MPS_PIPE_DIRECTORY" "$CUDA_MPS_LOG_DIRECTORY"
$ nvidia-cuda-mps-control -d
$ CUDA_MPS_ACTIVE_THREAD_PERCENTAGE=50 vllm serve Qwen/Qwen3-8B --port 8102 ...   # the batch-like client
$ echo quit | nvidia-cuda-mps-control

Two controls exist on a driver without v3:

  • CUDA_MPS_ACTIVE_THREAD_PERCENTAGE caps the share of threads a client may use. It is a ceiling, not a reservation: "Kernels launched from different MPS client contexts may execute on the same SM" (When to use MPS).
  • CUDA_MPS_PINNED_DEVICE_MEM_LIMIT caps a client's allocations, CUDA's internal ones included; beyond it, allocations fail with out of memory. It hides the cap in free, not in total (measured above).

The docs also describe static SM partitions, which reserve SMs instead of capping them (chunks of 8 SMs on Hopper and newer discrete GPUs, 2 on integrated ones). The control daemon of driver 580.173.02 rejects their -S flag ("Unrecognized option"), and the docs don't say which driver adds it; under v3 they are the sm-partition module (next section).

The price of MPS is the error domain. "A fatal GPU fault generated by a Volta MPS client process will be reported to all the clients running on the subset of GPUs in which the fatal fault is contained, without indicating which client generated the error" (When to use MPS). The same probe as an MPS client next to a vLLM client, in the MPS server log:

[2026-11-03 10:05:48.296 Server 2395953] Client {PID: 2396586, Context: 1} encountered a fatal GPU error.
[2026-11-03 10:05:48.296 Server 2395953] Server is handling a fatal GPU error.
...
[2026-11-03 10:05:48.296 Server 2395953] All clients belonging to error trigging process 2395971 will be torn down
...
[2026-11-03 10:05:48.296 Server 2395953] All clients belonging to error trigging process 2396586 will be torn down
...
[2026-11-03 10:05:48.296 Server 2395953] The following devices will be reset:
[2026-11-03 10:05:48.296 Server 2395953] 0
[2026-11-03 10:05:48.296 Server 2395953] The following client process have a sticky error set:
[2026-11-03 10:05:48.296 Server 2395953] 2395971
[2026-11-03 10:05:48.296 Server 2395953] 2396586

2396586 is the probe; 2395971 is vLLM's engine core. vLLM aborted (core dumped) and 22 of the victim's 24 requests failed. The GPU itself was healthy afterwards: a fresh context passed a control kernel once both clients had exited.

What a busy neighbour costs, measured

One chat model next to one prefill-heavy model, under each mode we could run.

Setup. An ASUS Ascent GX10 (NVIDIA GB10: 48 SMs, 128 GB of LPDDR5X shared with the CPU), driver 580.173.02, CUDA 13.0, legacy MPS. Two vLLM 0.33.0 servers, each Qwen3-8B BF16 at --gpu-memory-utilization 0.30, --max-model-len 16384, --max-num-seqs 64, prefix caching off, otherwise vLLM's defaults: chunked prefill at 2,048 tokens per step (vLLM's default for vllm serve on GB10, arg_utils.py L2959-L3006), decode replayed from CUDA graphs. The victim serves chat: 1,024 tokens in, 256 out, concurrency 2, 24 measured requests after 2 warm-up requests. The neighbour serves 8,192 tokens in, 64 out, at concurrency 32, which keeps its KV cache full (16 or 17 running, 15 waiting) and its GPU time mostly in prefill. Both loads come from vllm bench serve (method: benchmarking-inference-servers):

$ vllm bench serve --backend vllm --base-url http://localhost:8102 --model Qwen/Qwen3-8B \
    --dataset-name random --random-input-len 8192 --random-output-len 64 --random-range-ratio 0 \
    --ignore-eos --max-concurrency 32 --num-prompts 4000 --request-rate inf --seed 7
$ vllm bench serve --backend vllm --base-url http://localhost:8101 --model Qwen/Qwen3-8B \
    --dataset-name random --random-input-len 1024 --random-output-len 256 --random-range-ratio 0 \
    --ignore-eos --max-concurrency 2 --num-prompts 24 --request-rate inf --seed 11 \
    --percentile-metrics ttft,tpot,itl,e2el --metric-percentiles 50,90,99

The neighbour's load generator spent two to three minutes building its prompts, longer than its 60-second head start, so the first 10 victim requests (6 in A3) ran alone or straddled the start of the load; the table keeps the 14, 14 and 18 that started after it. Neighbour prefill is the delta of its vllm:prompt_tokens_total counter over the loaded window (308, 1,108 and 279 s).

Arm Victim requests under load ITL p50 / p99 TTFT p50 / max ITL vs alone Neighbour prefill
A0 alone 24 69.5 / 71.7 ms 364 / 442 ms 1.0x -
A0m alone, under MPS 24 70.0 / 72.1 ms 362 / 438 ms 1.0x -
A1 time-slicing 14 160.6 / 165.5 ms 888 / 1,132 ms 2.3x 1,303 tokens/s
A2 MPS, defaults 14 586.4 / 666.0 ms 1,591 / 1,872 ms 8.4x 2,395 tokens/s
A3 MPS, neighbour at 50% threads 18 114.2 / 122.6 ms 721 / 964 ms 1.6x 940 tokens/s

"ITL vs alone": A1 against A0; A2 and A3 against A0m, the same victim alone under MPS.

Grouped bars per arm: victim median ITL as a multiple of alone (2.3x, 8.4x, 1.6x) and median TTFT (2.4x, 4.4x, 2.0x), with the neighbour's prefill throughput beside each (1,303, 2,395 and 940 tokens/s)Grouped bars per arm: victim median ITL as a multiple of alone (2.3x, 8.4x, 1.6x) and median TTFT (2.4x, 4.4x, 2.0x), with the neighbour's prefill throughput beside each (1,303, 2,395 and 940 tokens/s) MPS at its defaults gave the neighbour 84% more prefill than time-slicing and the chat model 3.7 times worse ITL; half the threads for the neighbour traded 28% of its prefill (against time-slicing) for the chat model's lowest loaded ITL.

MPS by itself costs nothing: alone under MPS, the victim ran within 1% of alone without it. What hurts is an uncapped neighbour: the GPU did more total work under MPS defaults than under time-slicing and gave almost all of it to the client that submitted the most. A3 is a trade, not a free win: the neighbour did 28% less prefill than under time-slicing, 61% less than under MPS defaults.

Part of why is documented. Without MPS, contexts take turns (the default slice policy is undocumented; reading 2.3x as the cost of turns is ours). Under MPS there are no turns: kernels from different clients "may execute on the same SM, depending on load-balancing", and the docs describe no fairness between clients.

The rest is our reading, not proven. Each 2,048-token prefill step launches GEMMs with far more thread blocks than 48 SMs hold. A decode step, even replayed from a CUDA graph, is a chain of hundreds of small dependent kernels, each starting only when the neighbour's blocks free an SM: the wait is paid per kernel instead of once per turn. A thread cap leaves SMs the neighbour cannot occupy. Bandwidth adds to it: the victim's decode is bandwidth-bound (69.5 ms per token is roughly one read of its 15.3 GiB of weights) and under MPS competes at every moment. We took no trace; profilers attribute MPS client work to the server process.

What does not transfer: an H100 or B200 has about three times these SMs and an order of magnitude more memory bandwidth, so expect different multiples in the same direction: at MPS defaults, the client that submits the most gets the GPU. The embedder-neighbour arm sent no request in its window, so we have no number for it.

CUDA 13.4 and 13.5: a memory wall, then compute controls

CUDA 13.4 brings MPS v3, a scriptable CLI beside the old shell (MPS v3 interface), and what matters for sharing: memory partitioning over cgroup v2 (MPS v3 memory partitioning):

  • The hard limit is dmem.max (or the misc controller where dmem, kernel 6.14 and newer, isn't usable), "enforced at allocation time": past it, CUDA_ERROR_OUT_OF_MEMORY.
  • The soft limit is dmem.min, a guarantee. A client may borrow past it, and "crossing it makes a client an eviction candidate; the client is only actually evicted under real memory pressure".
  • Limits are set as root with nvidia-smi memory-limits --set --namespace <cgroup> --soft-limit <MiB> --hard-limit <MiB> -i 0, not by writing the dmem.* files.

Eviction is reactive. When a client within its soft limit hits the wall, the driver asks the server to make room, the server terminates a client that is over its soft limit ("The server will not evict the requester itself"), and the requester retries. The evicted client's next call returns CUDA_ERROR_MPS_CLIENT_TERMINATED. If one victim frees too little, the server terminates the oldest over-soft cgroup, all its clients together, and repeats for up to 10 seconds.

Sequence: client A allocates past its soft limit and becomes an eviction candidate; client B, under its own soft limit, finds device memory full; the driver asks the MPS server to make room and the server terminates A, not the requester; B retries and its allocation succeeds; A's next call returns CUDA_ERROR_MPS_CLIENT_TERMINATEDSequence: client A allocates past its soft limit and becomes an eviction candidate; client B, under its own soft limit, finds device memory full; the driver asks the MPS server to make room and the server terminates A, not the requester; B retries and its allocation succeeds; A's next call returns CUDA_ERROR_MPS_CLIENT_TERMINATED A soft limit is a borrowing zone, and what you pay for the loan is your process.

For a serving engine, eviction is a crash: vLLM and SGLang preallocate their KV pools and never re-measure, so an engine that borrowed past its soft limit keeps the loan and stays the first candidate. Set the soft limit equal to the hard limit for engines, and let only jobs that can restart borrow.

KAI sets the compute mode per container. sm-sharing is MPS context sharing, with "a single error domain". time-slicing, the default, is v3's memory accounting without context sharing, so the cap works in both; NVIDIA says each workload keeps its own error domain there, which at best equals plain time-slicing. We did not run v3; our fault tests above are the legacy equivalents.

Limits, from the same page: no MIG; cudaMallocManaged tracked only in system memory; Docker's leaf cgroup "reports the full GPU and never inherits the ancestor", so apply the limit on the container's real leaf; and NVIDIA recommends the misc fallback as "most reliable today".

CUDA 13.5 (announcement, 4 November) adds the compute side, on driver R620 (MPS v3 interface, namespaces):

  • SM partitions that borrow. A static partition reserves its SMs even while idle; with --max-chunks it may also borrow SMs no partition owns and those of --shareable partitions with no client attached, which MPS reclaims before reassigning. NVIDIA says partitions "never share SMs at the same time, so error isolation is preserved", but its containment rules still send a fatal fault to every client on the GPU: count on compute isolation only.
  • Partitions per namespace, namespaces per cgroup: a container's clients get their SM partition, thread percentage and pinned-memory limit from their cgroup, not from environment variables set inside the container.
  • Weighted timeslicing between servers: a base slice (10, 20 or 50 ms) scaled per server by --timeslice-pct, which "controls timeslice length; it does not guarantee a percentage of GPU utilization". Clients inside one server still run concurrently.

None of this changes MPS's defaults, which A2 measured. It adds a second protection for a latency-critical engine: a partition of its own reserves SMs, where A3's cap only limits the neighbour. An engine never detaches, so two engines never lend to each other; leave SMs unassigned for the neighbour to borrow. Engines in separate servers take turns: expect A1 with tunable turns, not A3. We ran none of it, and no Kubernetes route exposes it yet: a gpu-fractioning proposal (#143) would give each sm-sharing container its own namespace, and KAI plans compute requests and limits, alpha, for v0.20 (#2191).

Kubernetes routes, side by side

Route (version) What it enforces What it needs
Device plugin timeSlicing (v0.20.1) Nothing: replicas multiply the advertised count Any GPU
Device plugin mps (v0.20.1) Equal split: memory = total / replicas, threads = 100 / replicas (daemon.go L253-L280) "Experimental"; not on MIG. Both routes are applied by the GPU Operator (v26.7.2) via devicePlugin.config
MIG Hardware: B200 1g.23gb to 7g.180gb, H100 80 GB 1g.10gb to 7g.80gb A MIG-capable card; GPU Operator MIG manager
DRA driver (v0.5.1) Per claim: TimeSlicing (interval) or MPS (thread percentage, pinned-memory limits), MIG devices included Kubernetes 1.32+; alpha feature gates TimeSlicingSettings, MPSSupport, off by default
HAMi (v2.10.0) A software cap: libvgpu.so preloaded through /etc/ld.so.preload (server.go L834-L881) Its device plugin; an allocation that bypasses the interception escapes the cap
KAI Scheduler (v0.18.7) Nothing by default (NonMemoryEnforced: "Containers may see and use more GPU memory than requested"); with NvFractions and gpu-fractioning (v0.1.8), a driver-enforced limit per container For NvFractions: driver 615+, containerd 2.0 with NRI, GPU Operator v26.7.0+, container toolkit v1.20.1+

The specs below are for one mix: an embedder and a reranker at 4 GiB each, an LLM at 36 GiB.

Device plugin, MPS replicas (timeSlicing: takes the same shape):

# device plugin v0.20.1: four MPS replicas, each capped at total/4 memory and 25% of threads,
# so the embedder gets as much as the LLM
version: v1
sharing:
  mps:
    resources:
    - name: nvidia.com/gpu
      replicas: 4

MIG. With the device plugin's mixed strategy each profile is its own resource. On a B200 the LLM asks for nvidia.com/mig-2g.45gb: 1 (36 GiB does not fit the 23 GB of a 1g.23gb), and the embedder and reranker take nvidia.com/mig-1g.23gb: 1 each. Under the GPU Operator's default single strategy, slices appear as plain nvidia.com/gpu.

DRA driver. One claim runs one MPS daemon, with its limits as daemon defaults for every container on the claim. Size the defaults for the LLM and let the small models tighten their own limit, which a client's CUDA_MPS_PINNED_DEVICE_MEM_LIMIT may do but never loosen (MPS docs; not run under the DRA driver):

# adapted from k8s-dra-driver-gpu v0.5.1 demo/specs/quickstart/v1/gpu-test-mps.yaml:
# namespace dropped, limits sized for the mix
apiVersion: resource.k8s.io/v1
kind: ResourceClaimTemplate
metadata:
  name: shared-gpu
spec:
  spec:
    devices:
      requests:
      - name: mps-gpu
        exactly:
          deviceClassName: gpu.nvidia.com
      config:
      - requests: ["mps-gpu"]
        opaque:
          driver: gpu.nvidia.com
          parameters:
            apiVersion: resource.nvidia.com/v1beta1
            kind: GpuConfig
            sharing:
              strategy: MPS
              mpsConfig:
                defaultPinnedDeviceMemoryLimit: 36Gi
# embedder and reranker containers (same pod, same claim):
#   env: [{name: CUDA_MPS_PINNED_DEVICE_MEM_LIMIT, value: "0=4G"}]

HAMi takes limits per container: nvidia.com/gpu: 1 plus nvidia.com/gpumem: 4096 for the embedder and the reranker and 36864 for the LLM, in megabytes (passed on as CUDA_DEVICE_MEMORY_LIMIT_0=<n>m), and optionally nvidia.com/gpucores, a percentage.

KAI with NvFractions takes per-container annotations. Install KAI with --set global.nvFractions.set=true, which also installs gpu-fractioning and switches gpuSharingMode to NvFractions. Each member of the mix is its own pod: KAI v0.18.7's admission rejects a pod in which more than one container has NvFractions annotations (KAI GPU sharing docs). The LLM's pod:

metadata:
  labels:
    kai.scheduler/queue: default-queue
  annotations:
    nvidia.com/container.llm.gpu-memory.request: "36Gi"        # guaranteed
    nvidia.com/container.llm.gpu-memory.limit: "36Gi"          # omit and it equals the request
    nvidia.com/container.llm.gpu-compute.mode: "time-slicing"  # default; or "sm-sharing"
spec:
  schedulerName: kai-scheduler
  containers:
  - name: llm

The embedder's and reranker's pods carry the same three annotations under their own container names, at 4Gi. "A shared GPU runs one compute mode at a time, so KAI Scheduler never places a time-slicing workload and an sm-sharing workload on the same GPU" (NVIDIA's post): if the embedder and reranker run sm-sharing to overlap, the LLM goes to another GPU, or joins them in one error domain.

Gotchas

MPS daemons don't match pgrep -x. Linux truncates comm to 15 characters, so both daemons show as nvidia-cuda-mps and a check on pgrep -x nvidia-cuda-mps-control never succeeds. Match the command line (pgrep -f '^nvidia-cuda-mps-control') or ask the daemon (echo get_server_list | nvidia-cuda-mps-control).

Under MPS, the Xid names the wrong process. In our fault test the kernel logged Xid 31 against VLLM::EngineCor (vLLM's engine core, truncated the same way), not the probe. The MPS server log's "encountered a fatal GPU error" line names the real one; read it before you blame the process in dmesg.

A client with the wrong pipe directory silently skips MPS. Setting CUDA_MPS_PIPE_DIRECTORY to an empty string or a non-existent directory is NVIDIA's documented way to bypass MPS (When to use MPS, the CUDA-GDB section). A typo puts a client back on time-slicing next to the MPS server, with none of your limits. Check echo ps | nvidia-cuda-mps-control for every client you expect.

cuBLAS under MPS below 100% threads on Hopper. Since CUDA 12.6 Update 2, FP16, BF16 and FP8 GEMMs could return wrong results for MPS clients below 100% active threads; CUDA 13.5's cuBLAS fixes it (release notes). Engines load the cuBLAS their PyTorch wheel pulls in, not the system toolkit's: check that version before you cap threads on H100 or H200, as A3 did here.

R615 and R620 are not what you get by default. The GPU Operator v26.7.2 installs 595.91.07 unless you set driver.version, and gpu-fractioning checks for major version 615 or newer (dependency_checker.go L44); CUDA 13.5's MPS features need R620, and since 13.4 the toolkit no longer bundles the Linux driver. On Grace Hopper and Grace Blackwell, R620 (620.70.06) defaults to CDMM instead of onlining GPU memory as a NUMA node, a node-wide mode applied at reload: choose it before you upgrade.

Both timeSlicing and mps in one device-plugin config: MPS wins, silently (sharing.go L36-L44), although the README calls them mutually exclusive.

Verdict

For one team's services on a GPU without MIG, use MPS with every client limited: a memory limit per client, explicit KV sizes in each engine, and a thread cap on the batch-like neighbour. We tested one cap, 50% on a prefill-heavy LLM: the chat model went to 1.6x its alone ITL, against 2.3x under time-slicing, and the neighbour lost 28% of its time-slicing prefill. That is one trade on one chip, not a rule: the right cap depends on what the neighbour's throughput is worth to you, so measure two or three on your own mix. What the data does settle: never run MPS at its defaults next to a latency-sensitive engine (8.4x here), and expect every client on the GPU to go down together. CUDA 13.5 leaves that rule standing; on R620, test a reserved SM partition for the latency-critical engine against the thread cap, the first MPS control that protects the victim instead of throttling the neighbour.

For tenants, or a latency SLO that must survive a neighbour's crash, use MIG on cards that have it (H100, H200, B200, GB200, GB300, RTX PRO 6000 Blackwell), or separate GPUs. CUDA 13.4 gives MPS a memory wall and 13.5 compute partitions, neither a fault wall: sm-sharing is one error domain, and time-sharing is at best time-slicing's.

Keep time-slicing for development and batch. In Kubernetes, KAI with gpu-fractioning is the first route with a driver-enforced memory limit per container, worth the R615 upgrade if you need that limit; HAMi is the route when you can't move to R615, knowing its cap lives in an interception layer.

When one GPU is no longer enough, flow control decides which requests wait, and disaggregated serving splits prefill from decode across GPUs instead of making them share one.

Sources

  1. Inference EnginesvLLM 0.34: Three Changes to Re-check Before You Upgrade
  2. The GPU for Inference EngineersMegakernels for Decode: What a Kernel Boundary Costs, and When Fusing a Layer Pays
  3. Inference EnginesThe Draft's LM Head: What vLLM 0.33's Quantized Copy Saves at Batch 1

Inference Notes

Once a week: what changed in serving AI models, and what it means if you build, run or pay for them, in about five minutes.

Read past issues