MIG NVIDIA Multi Instance GPU: What It Is
In this article
NVIDIA Multi-Instance GPU (MIG) is a feature on certain NVIDIA data center GPUs that physically partitions a single GPU into multiple smaller, isolated GPU instances. Each instance has its own dedicated compute cores, memory, and memory bandwidth, so it behaves like a separate, smaller GPU. MIG is designed to improve utilization, security, and cost efficiency in shared environments like cloud computing, virtualized workstations, and AI inference clusters.
Background: Why MIG Was Created
Before MIG, a single high-end GPU was often underutilized in shared workloads. A large GPU might be used for one training job that only uses a fraction of its capacity, leaving the rest idle. Conversely, running multiple jobs on the same GPU without isolation was risky—one job could interfere with another's performance or even access its data. MIG solves this by letting you split the GPU into hardware-level partitions, each with its own dedicated resources. This is different from software-based sharing (like time-slicing) because the partitions are physically isolated, so one instance cannot affect another's performance or security.
The feature first appeared with the NVIDIA A100 GPU (released in 2020) and is also available on later data center GPUs like the H100 and A30. It is not available on consumer GeForce cards.
How MIG Works
MIG works by dividing the GPU into compute instances (CIs) and memory instances (MIs). A compute instance gets a slice of the GPU's streaming multiprocessors (SMs), while a memory instance gets a slice of the GPU's memory and memory bandwidth. You can combine one CI and one MI to form a GPU instance (GI). Each GI is fully isolated, with its own L2 cache slice, memory controller, and copy engines.
To enable MIG, you need to:
- Put the GPU in MIG mode (using the
nvidia-smicommand or the NVIDIA driver configuration). - Define the GPU instances you want, choosing from predefined profiles (e.g., on A100, you can create 1, 2, 3, or 7 instances).
- Assign each instance to a virtual machine, container, or process.
Each instance appears as a separate device to the software, so you can run different workloads on each without interference.
MIG Profiles and Sizing
NVIDIA provides predefined MIG profiles for each GPU. For example, the A100 40GB can be partitioned into:
- 1 instance with 40GB memory (full GPU)
- 2 instances with 20GB each
- 3 instances with 13.3GB each
- 7 instances with 5GB each
The exact profiles depend on the GPU model and memory size. You cannot create arbitrary custom sizes—only the predefined profiles are supported. This is important for capacity planning: if your workload needs 15GB, you might have to use a 20GB instance and waste 5GB.
MIG vs. Other GPU Sharing Methods
MIG is often compared to other ways of sharing a GPU:
- Time-slicing (e.g., CUDA MPS): Multiple jobs share the GPU by taking turns using the whole GPU. This can lead to latency spikes and less predictable performance.
- Software partitioning (e.g., vGPU with vSphere): Uses hypervisor-level virtualization, but performance isolation is not as strong as MIG.
- Multiple GPUs: Using several smaller physical GPUs instead of one big one. MIG gives you flexibility to allocate resources on demand without buying more hardware.
MIG is unique because it provides hardware-level isolation, which is critical for security and performance guarantees in multi-tenant environments.
Choosing MIG Profiles
When deciding how to partition your GPU, consider:
- Workload size: Match the instance memory to the largest model or dataset you need to run.
- Performance requirements: More SMs per instance means faster compute. A 20GB instance on A100 has half the SMs of the full GPU, so it will be roughly half as fast.
- Number of users: If you have many small jobs, more instances might be better than fewer large ones.
- Isolation needs: If you need strong security, MIG is the way to go.
Start with a profile that matches your smallest common workload, then add more instances as needed. You can change profiles only when the GPU is in MIG mode and no instances are active.
Common Problems and Limitations
MIG has some limitations that users often encounter:
- Not all software supports MIG: Some CUDA libraries and frameworks may not work correctly with MIG instances. Check compatibility before deploying.
- No NVLink between instances: MIG instances on the same GPU cannot communicate via NVLink. They are isolated, so you must use PCIe or network for inter-instance communication.
- Memory is fixed: You cannot change the memory size of an instance after creation; you must delete and recreate it.
- MIG is not available on all GPUs: Only specific data center GPUs support MIG. Consumer and workstation cards do not.
- Performance overhead: There is a small overhead when enabling MIG, but it is minimal compared to the benefits.
If you run into issues, check the NVIDIA documentation and ensure your driver and CUDA version support MIG.
Costs and Licensing
MIG itself is a free feature—it comes with the GPU. However, you may need to consider licensing costs for the software you run on each instance. For example, some enterprise software licenses are per-GPU or per-user, so using MIG might require additional licenses if you run multiple instances. Also, MIG is only available on expensive data center GPUs, so the hardware cost is a factor. But MIG can reduce total cost by allowing you to consolidate workloads onto fewer physical GPUs.
Frequently Asked Questions
Can MIG be used on GeForce RTX cards?
No. MIG is only supported on NVIDIA data center GPUs like A100, H100, and A30. GeForce and RTX consumer cards do not have MIG support.
Does MIG improve performance?
MIG does not improve raw performance of a single workload. It improves utilization and isolation, so overall throughput in a shared environment can be higher. A single instance will perform similarly to a smaller physical GPU with the same specs.
How do I enable MIG?
You enable MIG using the nvidia-smi command: nvidia-smi -mig 1 (to enable) or nvidia-smi -mig 0 (to disable). Then you can create instances with nvidia-smi mig -cgi. The exact commands depend on your driver version.
Is MIG secure?
Yes, MIG provides hardware-level isolation, meaning one instance cannot access another instance's memory or compute resources. This is considered more secure than software-based sharing.
Can I run containers on MIG instances?
Yes, you can assign MIG instances to containers using NVIDIA Container Toolkit. Each container sees the assigned instance as a separate GPU.
What is the difference between MIG and vGPU?
MIG is hardware partitioning at the GPU level, while vGPU is a hypervisor-based virtualization that can also do time-slicing. MIG offers stronger isolation and is often used in bare-metal or container environments, while vGPU is common in VMware environments.