TPU instances in MIGs

Managed instance groups (MIGs) automate the creation, configuration, and lifecycle management of a collection of VMs. MIGs provide benefits such as high availability through autohealing and regional (multi-zone) deployments, automatic scaling to handle variable loads, and simplified rolling updates for applications. For more information, see Managed instance groups.

You can use MIGs to create and manage TPU VMs for TPU versions v5p, v6e, and TPU7x. You can create MIGs with a single TPU VM, independent TPU VMs (also called single-host slices) and MIGs with interconnected TPU VMs (also called multi-host slices).

Each slice in a single-host MIG has at most one TPU VM. The TPU VMs within the MIG are not connected with inter-chip interconnect (ICI) links.

A multi-host slice contains multiple TPU VMs that are interconnected with ICI links.

MIGs with single-host TPU slices

Creating a managed instance group (MIG) with multiple, independent TPU instances is beneficial for workloads that require several individual TPU VMs but don't need them to be interconnected with ICI links for distributed workloads. For example:

For more information, see Create a MIG with single-host TPU slices.

MIGs with a multi-host slice

Unlike groups of independent TPU slices, a MIG configured for a multi-host slice manages a set of TPU VMs that are tightly coupled through ICI links. This creates a single, logical TPU slice.

Benefits and performance

MIGs for multi-host TPU slices provide the scale and performance required for intensive machine learning workloads.

Atomic lifecycle operations

To ensure the integrity of the interconnected topology, the MIG manages the entire slice as a single, indivisible unit throughout its lifecycle.

Configuration requirements

Configuring a multi-host MIG requires defining both the physical interconnection topology and the individual instance properties.

Slice availability and failure recovery

When you use MIGs to create a multi-host TPU slice, the MIG automatically manages the slice recovery process. If a host or ICI failure occurs, then the slice transitions to REACTIVATING state. All VMs in the slice will transition into REPAIRING state, though not necessarily all at the same time. The MIG will then automatically restart the VMs together on healthy capacity to restore the slice.

However, when you use Spot VMs, preemption results in instances being terminated. The MIG doesn't automatically reactivate the slice.

Failure recovery from an instance interruption

If you delete or stop a TPU instance, or stop an instance from within the operating system, then the slice will transition to the FAILED state. In this scenario, the slice remains in the FAILED state until you recreate the slice. To recreate the slice, you must either delete and recreate the MIG, or resize the MIG to 0 and then increase its size.

For more information about the slice states, see View the status of a TPU slice.

Limitations

MIGs with TPUs have the following limitations:

  • Lifecycle operations: You can't stop, start, resume, or suspend TPU instances. To change configurations that require a restart or to stop incurring charges, you must delete the instances.

  • Regional MIG zone distribution: You must set the target distribution shape to ANY_SINGLE_ZONE.

  • Configuration updates in a MIG:

  • For a MIG that forms a multi-host TPU slice, the following limitations also apply:

    What's next