Home Knowledge Base GPU Multi-Process Service (MPS)

GPU Multi-Process Service (MPS) is the NVIDIA runtime service that enables multiple CUDA processes to share a single GPU concurrently with improved efficiency — replacing the default time-slicing behavior (where processes alternate GPU access) with true spatial sharing where multiple processes' kernels execute simultaneously on the same GPU, improving utilization for workloads like multi-rank MPI jobs, inference serving with multiple workers, and Kubernetes GPU sharing.

Why MPS

How MPS Works

 Without MPS (time-slicing):
 Process A: [kernel][idle ][kernel][idle ]
 Process B: [idle ][kernel][idle ][kernel]
 GPU:       [  A  ][  B  ][  A  ][  B  ]  ← context switches

 With MPS:
 Process A: [kernel][kernel][kernel]
 Process B: [kernel][kernel][kernel]
 GPU:       [ A+B  ][ A+B ][ A+B ]  ← concurrent execution

Starting MPS

# Start MPS daemon (run as root or GPU owner)
export CUDA_VISIBLE_DEVICES=0
nvidia-cuda-mps-control -d

# All CUDA processes on GPU 0 now go through MPS
# Run multiple processes
mpirun -np 4 ./my_cuda_app  # 4 MPI ranks share GPU via MPS

# Stop MPS
echo quit | nvidia-cuda-mps-control

MPS Benefits

ScenarioWithout MPSWith MPSImprovement
4 MPI ranks, small kernels35% GPU util85% GPU util2.4×
8 inference workers40% GPU util90% GPU util2.3×
Context switch overhead25-50 µs/switch0 (shared context)Eliminated
Memory overheadN contexts × overhead1 shared contextReduced

MPS vs. MIG vs. Time-Slicing

FeatureTime-SlicingMPSMIG
IsolationTemporal onlyMinimalFull hardware
Concurrent executionNoYesYes (separate instances)
Memory protectionFullLimitedFull
Error isolationFullShared (one crash affects all)Full
OverheadContext switchMinimalPartitioning setup
GPU supportAllVolta+A100+
Best forMixed workloadsMPI, cooperative processesMulti-tenant, cloud

Resource Limits (Volta+)

# Limit each MPS client to 25% of GPU threads
export CUDA_MPS_ACTIVE_THREAD_PERCENTAGE=25

# With Volta MPS: Up to 48 clients per GPU
# Each client gets guaranteed thread allocation

Use Cases

Limitations

GPU Multi-Process Service is the lightweight GPU sharing solution for cooperative workloads — by eliminating context switching and enabling true spatial multiplexing of multiple CUDA processes on a single GPU, MPS transforms underutilized GPUs running many small tasks into efficiently packed compute resources, making it essential for MPI-based HPC applications and cost-effective inference serving where workloads are trusted and isolation requirements are relaxed.

gpu mpsmulti process servicecuda mpsgpu sharing processesmps nvidia

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.