Skip to content
Ramiro Alvarez
[ menu ]

[ field guide ] · updated 28 Nov 2026

GPU on Kubernetes: a field guide

Most workloads do not need a whole H100. This page collects what I have measured about sharing one between several workloads on Kubernetes, and how I would choose between the options.

Tested: July 2025, two weeks on NVIDIA H100 hardware.

[ the short answer ]

Start with HAMi unless you need hard isolation

Choose HAMi when

  • Your users are internal and trusted, such as data science or research teams.
  • You run long training jobs, where 6 hours against 10 matters.
  • You change GPU allocations often.
  • You debug GPU memory problems regularly and want errors you can act on.

Choose MIG when

  • You serve external users or have compliance requirements, so hardware isolation is required.
  • You prefer predictable performance to peak performance.
  • You can plan allocations in advance.
  • You can afford maintenance windows for reconfiguration.

The two can be combined: HAMi on training clusters, where speed matters most, and MIG for inference serving, where isolation matters most.

[ side by side ]

HAMi and MIG on the same H100

HAMiMIG
How it shares the GPUSoftware: time-slicing with per-pod memory limitsHardware: the GPU is split into isolated instances
BERT-base training, time per batch35.3 ms (12 GB slice)60.0 ms (1g.12gb instance)
Changing an allocationRestart the job, about 30 seconds; other workloads keep runningDrain, reconfigure and reboot the node, about 15 minutes; every workload on it moves
Running out of GPU memoryA CUDA out-of-memory error with usage, request size and free memoryAn internal PyTorch assertion with nothing to act on
Five identical jobs at onceAll scheduled immediately; finish within 5% of each otherNo interference at all; unused capacity cannot be reclaimed
How a pod asks for itnvidia.com/gpu: 1 and nvidia.com/gpumem: 12000nvidia.com/mig-1g.12gb: 1

On real BERT-base training HAMi was 1.7 times faster per batch. An overnight run that takes 10 hours on a MIG instance finishes in about 6 on a HAMi slice of the same size.

[ a warning about benchmarks ]

Synthetic tests overstate the gap

Synthetic benchmarks showed HAMi more than eight times ahead. The real training job showed 1.7 times. Measure with your own workload before you decide.

Synthetic testHAMi 12 GBMIG 1g.12gb
Memory bandwidth, GPU internal1,667 GB/s202 GB/s
Matrix multiplication45.4 TFLOPS4.8 TFLOPS

[ reference ]

MIG profiles on an H100

As reported by nvidia-smi mig -lgip. A profile name gives the compute slices and the memory, so 1g.12gb is one compute slice with a nominal 12 GB.

ProfileInstances per GPUMemory each
1g.12gb710.75 GiB
1g.24gb421.62 GiB
2g.24gb321.62 GiB
3g.47gb246.38 GiB
4g.47gb146.38 GiB
7g.94gb193.12 GiB

[ run your own test ]

What to measure

  1. Training time with your own models, not synthetic benchmarks.
  2. What the error looks like when a job runs out of GPU memory.
  3. Several users submitting jobs at the same time.
  4. How long a configuration change takes and what it interrupts.
  5. How you debug a failed job with the tools you already have.

With either option, DCGM metrics stop at the node or GPU instance. Per-pod GPU utilisation needs extra monitoring.

[ not covered yet ]

Coming to this page

  • Multi-node GPU scheduling strategies
  • Cost optimisation for shared GPU infrastructure
  • Production monitoring for GPU workloads
  • Migrating between sharing technologies

[ newsletter ]

Get new posts by email

GPUs, inference and cost on Kubernetes, sent when there is a new post. No spam. Prefer feeds? Use RSS.