AI on Kubernetes · GPU/NPULesson 5 of 20
Sharing Accelerators (Time-Slicing, MPS)
When a small model holds a whole GPU, most of it sits idle. With DRA you can write a sharing strategy (TimeSlicing or MPS) into the device claim’s config so several Pods share one GPU. With no sharing config, which this lesson calls “none”, a claim gets a whole GPU. This lesson uses NVIDIA’s DRA driver for GPUs as the example. Node-wide MIG and time-slicing through the GPU Operator are covered in Sharing GPUs.
Sharing modenone (no config)
Who uses the GPU1 Pod
Isolationno interference
Quota charged—
RequestAppears in a later step
What you will learn
- The default "none" gives each Pod a whole GPU
- In DRA, Pods that reference the same claim share its device
- Time-slicing takes turns and has no memory isolation
- MPS runs Pods at the same time under set limits
- Quota is counted per claim
The three modes
| None | Time-slicing | MPS | |
|---|---|---|---|
| Who shares | Nobody | Pods referencing the same claim | Pods referencing the same claim |
| How | Whole GPU | Take turns in time | Run at once under caps |
| Isolation | No interference | No memory isolation or performance guarantee | Concurrent within caps; weak fault isolation |
Try it yourself
kubectl get resourceclaims -n <namespace> # Named claim shared by several Pods (step 3)
kubectl get resourceclaim <name> -n <namespace> -o jsonpath='{.status.reservedFor[*].name}' # Pods using this claim
kubectl get resourceclaim <name> -n <namespace> -o jsonpath='{.spec.devices.config}' # TimeSlicing or MPS settings
kubectl exec <pod> -- nvidia-smi # e.g. NVIDIA: shared GPU memory and processes (step 5)
kubectl describe quota -n <namespace> # Charged per claim, not per Pod (step 8)
Check yourself
Further reading: Dynamic Resource Allocation · DRA Driver for NVIDIA GPUs · Time-slicing with the DRA driver · MPS with the DRA driver · NVIDIA MPS