MIG: Partition NVIDIA GPUs

Khimananda Oli 9 min read Virtualization
MIG: Partition NVIDIA GPUs

By Khimananda Oli | Last reviewed: August 2026

Data center GPUs like the A100 and H100 are often too large for individual inference or development tasks, leading to massive resource waste when a single user occupies an entire card. Using MIG: Partition NVIDIA GPUs allows you to split a single physical accelerator into up to seven fully isolated instances, each with dedicated compute, memory, and cache. This guide provides the exact configuration steps, profile selection logic, and Kubernetes integration patterns needed to implement GPU partitioning safely in production. Before enabling this feature, review your workload characteristics as outlined in GPUs for AI: what developers need to know to ensure partitioning aligns with your performance requirements.

Physical GPU (A100 / H100)GPU Slice 1SMs + Tensor CoresDedicated VRAML2 Cache SliceGPU Slice 2SMs + Tensor CoresDedicated VRAML2 Cache SliceGPU Slice NSMs + Tensor CoresDedicated VRAML2 Cache Slice
MIG partitions a single GPU into hardware-isolated slices with dedicated compute, memory, and cache

How does MIG: Partition NVIDIA GPUs actually work?

Multi-Instance GPU (MIG) is a hardware-level virtualization technology available on NVIDIA Ampere (A100, A30) and Hopper (H100, H200) architectures. Unlike software-based GPU sharing such as MPS or time-slicing, MIG enforces isolation at the silicon level. When you use MIG: Partition NVIDIA GPUs, the GPU’s streaming multiprocessors (SMs), L2 cache, and DRAM bandwidth are physically divided into distinct slices that cannot interfere with each other.

Each GPU Instance (GI) contains a fixed allocation of SMs and a dedicated portion of L2 cache. Within each GI, you can further create Compute Instances (CI) that share the GI’s resources but have separate scheduling contexts. Memory is allocated in fixed granules—typically 5 GB, 10 GB, 20 GB, or 40 GB on an 80 GB A100—and is backed by dedicated ECC-protected VRAM regions. This means a noisy neighbor in one partition cannot cause memory corruption, cache thrashing, or latency spikes in another partition.

The critical distinction from virtualization approaches like vGPU is that MIG does not require a hypervisor or license server. It operates entirely within the GPU firmware and driver stack, making it suitable for bare-metal Kubernetes nodes, containerized training clusters, and compliance-sensitive environments where hypervisor overhead is unacceptable. For teams managing database workloads alongside AI inference on shared infrastructure, understanding these isolation boundaries is as important as PostgreSQL administration essentials for preventing cross-workload interference.

Which MIG profiles should you choose for different workloads?

Selecting the right profile is where most MIG deployments fail. Profiles are denoted as Xg.Ygb, where X represents the number of GPU slices (compute units) and Y represents the memory allocation in gigabytes. On an 80 GB A100, common profiles include:

  • 1g.5gb: 1/7th compute, 5 GB VRAM. Ideal for lightweight inference, tokenization, or CI/CD validation jobs.
  • 1g.10gb: 1/7th compute, 10 GB VRAM. Suitable for medium-sized models (e.g., BERT-base, ResNet-50) or vector embedding generation.
  • 2g.20gb: 2/7ths compute, 20 GB VRAM. Good balance for fine-tuning smaller LLMs or running RAG pipelines with moderate context windows.
  • 3g.40gb: 3/7ths compute, 40 GB VRAM. Appropriate for larger inference workloads or batch processing with high memory pressure.
  • 7g.80gb: Full GPU. Use when a single workload requires all resources; disables MIG benefits but maintains compatibility.

A common mistake is over-provisioning memory while under-utilizing compute. If your workload is compute-bound (e.g., matrix multiplication in transformers), prioritize profiles with more GPU slices even if memory seems tight. Conversely, for retrieval-augmented generation where KV-cache dominates VRAM usage, favor higher memory allocations. Always benchmark with realistic payloads before committing to a profile topology. Teams evaluating cost trade-offs between dedicated and shared GPUs should also consult rent vs buy GPUs for AI workloads to align partitioning strategy with financial models.

ProfileCompute SlicesMemory (A100 80GB)Best ForAvoid When
1g.5gb1/75 GBInference <2B params, preprocessingTraining or long-context LLMs
1g.10gb1/710 GBBERT, embeddings, small RAGModels >7B parameters
2g.20gb2/720 GBFine-tuning 3B–7B modelsHigh-throughput serving
3g.40gb3/740 GB13B inference, batch ETLLatency-critical real-time apps
7g.80gbFull80 GBTraining, 70B+ modelsMulti-tenant environments

How do you configure and enable MIG on Linux hosts?

Enabling MIG requires administrative access and a host reboot. The process is identical across Ubuntu, RHEL, and SUSE systems with NVIDIA drivers ≥470. Follow these steps precisely:

  1. Verify GPU support: Run nvidia-smi --query-gpu=name,mig.mode.current --format=csv. Only A100/A30/H100/H200 will show MIG capability.
  2. Enable MIG mode: Execute sudo nvidia-smi -i 0 -mig 1 for GPU index 0. Repeat for each GPU or use -i 0,1,2,3 for multiple cards.
  3. Reboot the host: MIG mode changes require a full system restart. sudo reboot.
  4. Create GPU instances: After reboot, list available profiles with nvidia-smi mig -lgip. Create instances using nvidia-smi mig -cgi 9,9,9 -C (creates three 1g.10gb instances on GPU 0).
  5. Persist configuration: Add instance creation commands to a systemd service or cloud-init script to survive reboots. Never rely on manual recreation in production.
# Example: Create mixed MIG topology on A100 80GB
sudo nvidia-smi -i 0 -mig 1
sudo reboot

# After reboot: create 2x 1g.10gb + 1x 2g.20gb
sudo nvidia-smi mig -i 0 -cgi 9,9,14 -C

# Verify created instances
nvidia-smi mig -lgi

Note that MIG configuration is destructive: creating new instances deletes existing ones. Always export your current topology with nvidia-smi mig -lgii before making changes. In automated environments, store desired state in Git and reconcile via Ansible or Terraform rather than imperative scripts.

nvidia-smi -mig 1Host RebootCreate Instancesnvidia-smi mig -cgiExpose to K8sDevice Plugin ConfigPersistent State ManagementGitOps Repodesired-mig-topology.yamlAnsible / TerraformReconcile on node joinSystemd Servicemig-config.serviceNever rely on manual recreation in production
MIG configuration workflow from CLI enablement through persistent state management for production clusters

How do you integrate MIG with Kubernetes and containers?

Kubernetes does not natively understand MIG partitions. You must use the NVIDIA GPU Operator with MIG support enabled. The operator deploys the device plugin, validates MIG configuration, and exposes partitions as schedulable resources like nvidia.com/mig-1g.10gb.

Install the operator via Helm with MIG strategy set to "mixed" or "single":

helm install gpu-operator nvidia/gpu-operator \
  --namespace gpu-operator --create-namespace \
  --set mig.strategy=mixed \
  --set mig.partitions[0].name=1g.10gb \
  --set mig.partitions[0].count=3 \
  --set mig.partitions[1].name=2g.20gb \
  --set mig.partitions[1].count=1

In your pod spec, request specific MIG devices instead of whole GPUs:

resources:
  limits:
    nvidia.com/mig-1g.10gb: 1
    memory: 8Gi
  requests:
    nvidia.com/mig-1g.10gb: 1
    memory: 8Gi

Critical considerations for Kubernetes integration:

  • Node labeling: Label nodes with their MIG topology so pods land on correctly partitioned hardware. The operator auto-labels, but verify with kubectl get nodes -l nvidia.com/mig.config=all-disabled.
  • DaemonSet tolerance: Ensure monitoring agents (Prometheus node-exporter, DCGM) tolerate MIG taints and query per-instance metrics via DCGM_FI_DEV_GPU_UTIL{gpu_instance_id="X"}.
  • Security context: MIG partitions inherit host-level GPU access controls. Use Pod Security Standards to prevent unauthorized privilege escalation. Never run untrusted code without additional sandboxing beyond MIG.

For teams already running observability stacks, integrating MIG metrics follows the same patterns described in Prometheus metrics monitoring fundamentals—just add DCGM exporter targets and adjust recording rules for per-instance aggregation.

What are the limitations and operational risks of MIG?

MIG is powerful but not universal. Understanding its constraints prevents costly misconfigurations:

  • No dynamic resizing: Changing partition topology requires deleting all existing instances and recreating them. This is disruptive and cannot be done live. Plan capacity upfront.
  • Limited profile combinations: Not all profile mixes are valid. An A100 80GB supports exactly seven 1g.5gb OR three 2g.20gb + one 1g.10gb, etc. Consult NVIDIA’s official profile matrix before designing topologies.
  • No inter-partition communication: MIG slices cannot directly share memory or signal each other. Multi-GPU training across MIG partitions is impossible; use NCCL only within a single GI or across physical GPUs.
  • Driver/firmware coupling: MIG behavior changes between driver branches. Pin driver versions and test upgrades in staging. Driver 535+ improved H100 MIG stability significantly over 520.
  • Monitoring gaps: Standard nvidia-smi shows aggregate stats. Per-instance telemetry requires DCGM ≥3.3. Without it, you’re flying blind on utilization and thermal throttling per slice.

In my experience helping Nepal-based AI startups optimize cloud spend, the biggest pitfall is treating MIG as a cost-saving panacea without modeling actual workload concurrency. If your inference traffic is bursty and unpredictable, time-slicing with fractional GPUs may outperform static MIG partitions. Always measure before optimizing.

GPU Sharing Technology ComparisonMIG✓ Hardware Isolation✓ Zero Performance Tax✓ Secure Multi-Tenant✗ Static Partitions✗ No Live ResizeBest: Production AI/MLTime-Slicing✓ Dynamic Allocation✓ Simple Setup✗ No Isolation✗ Context Switch Overhead✗ Noisy NeighborsBest: Dev/Test BurstsvGPU✓ Flexible Profiles✓ Live Migration✗ License Required✗ Hypervisor Overhead✗ Limited GPU SupportBest: VDI / Legacy Apps
MIG vs time-slicing vs vGPU: choose based on isolation needs, workload predictability, and licensing constraints

Implementing MIG: Partition NVIDIA GPUs in production

Successfully deploying MIG: Partition NVIDIA GPUs requires treating GPU topology as immutable infrastructure. Define your desired partition layout in version control, automate reconciliation via IaC, and validate with synthetic benchmarks before admitting user workloads. Monitor per-instance utilization through DCGM and set alerts for underutilized partitions—they indicate either over-provisioning or scheduling failures. Remember that MIG solves a specific problem: secure, predictable multi-tenancy on expensive accelerators. It is not a substitute for proper capacity planning, workload profiling, or architectural review. If your team needs help designing GPU infrastructure that balances cost, security, and performance, reach out to discuss your specific requirements.

Frequently Asked Questions

MIG is supported on Ampere and newer data center GPUs including A100, A30, H100, H200, and B200. Consumer cards like RTX 4090 and workstation RTX Ada generation do not support MIG. Always verify your specific SKU datasheet before provisioning infrastructure for GPU partitioning in 2026.

Run nvidia-smi -mig 1 as root to enable the feature, then reboot the host or reset the GPU using nvidia-smi -r. The GPU must be completely idle with no running processes. Verify activation afterward by checking that MIG mode shows Enabled in nvidia-smi output.

No, changing MIG configurations requires a full GPU reset or system reboot. Plan maintenance windows accordingly when resizing instances. Use nvidia-smi mig -dci and -dgi commands to destroy existing compute and GPU instances before applying new profiles that take effect only after the mandatory reset cycle completes.

MIG provides hardware-level isolation with dedicated memory and cache per instance, ensuring security between tenants. MPS uses software time-slicing on a single GPU context, offering higher density but no fault isolation. Choose MIG for multi-tenant production workloads and MPS for trusted batch processing where isolation is unnecessary.

Yes. Use the official NVIDIA GPU Operator v24.9 or later which automatically configures MIG devices and exposes them as distinct Kubernetes resources. Pods request specific MIG profiles like nvidia.com/mig-1g.5gb instead of whole GPUs. Ensure your cluster nodes have compatible drivers and the operator correctly detects enabled MIG mode.

Each MIG instance receives a proportional slice of L2 cache and memory bandwidth based on its profile size. A 1g.5gb instance gets roughly one-seventh of total bandwidth on an A100. This deterministic allocation prevents noisy neighbor issues but means small instances cannot burst beyond their fixed hardware partition limits during peak demand.

Yes, you can mix compatible profiles on a single GPU as long as they fit within the available compute and memory slices. For example, an A100-80GB supports combinations like two 3g.40gb plus one 2g.20gb instance. Use nvidia-smi mig -lgip to list all valid profile combinations for your specific GPU model.

No. Live migration of individual MIG instances is not supported in 2026. You must checkpoint application state, destroy the source instance, create a matching profile on the destination GPU, and restore. Full VM migration containing MIG devices requires vendor-specific orchestration and typically involves brief downtime during the GPU reconfiguration phase.

Use nvidia-smi dmon or DCGM exporter to collect per-instance metrics including SM occupancy, memory usage, and encoder utilization. Each MIG device has a unique UUID visible in nvidia-smi mig -lgi. Integrate these metrics into Prometheus using the dcgm-exporter Helm chart to build granular dashboards tracking individual tenant performance and capacity.

Only the affected MIG instance resets; other partitions on the same physical GPU continue operating normally. This hardware-level fault isolation is a primary advantage over MPS or time-slicing approaches. The crashed instance becomes temporarily unavailable until restarted, but sibling workloads experience zero interruption or performance degradation from the failure event.

Slightly. Partitioning introduces minimal overhead from resource reservation boundaries and management logic, typically under five percent aggregate throughput loss compared to unpartitioned operation. The tradeoff provides deterministic performance isolation essential for multi-tenant environments. Benchmark your specific workload profiles to quantify actual impact rather than relying on theoretical maximums.

Yes. On H100 and newer GPUs, MIG integrates with Confidential Computing to provide hardware-isolated enclaves per instance. Each partition maintains separate encryption keys and attestation boundaries. Enable CC-on mode via nvidia-smi before configuring MIG profiles. This combination is required for regulated workloads processing sensitive data in shared cloud GPU infrastructure during 2026.

Run nvidia-smi mig -lv to list all configured instances and verify profile assignments match expectations. Check dmesg for Xid errors indicating misconfiguration. Deploy a test pod or container requesting each MIG resource type to confirm scheduling works. Validate memory limits by running gpu-burn or similar stress tools within each partition boundary.

First confirm MIG mode is enabled and GPU was reset. Check driver version supports your GPU architecture. Verify no legacy CUDA processes hold GPU locks preventing reconfiguration. Review nvidia-mig-manager logs for profile creation failures. Ensure BIOS settings expose sufficient PCIe BAR space. Test with a single simple profile before attempting complex mixed configurations.

Avoid MIG for single-tenant dedicated workloads needing full GPU resources, training large language models requiring maximum VRAM, or graphics rendering pipelines incompatible with partitioned contexts. Also skip MIG on unsupported consumer hardware or when workload variability makes static partitioning inefficient. Dynamic GPU sharing via time-slicing often suits development environments better than rigid MIG allocations.