A Tale of TPU Observability on GKE: Part 2 - Dynamic Slicing Enhancements

Hopefully you have already read Part 1 of this guide, if not see A Tale of TPU Observability on GKE: Part 1, where we highlighted using GKE metrics for TPU clusters from V6 and earlier. Workload Lifecycle metrics provide essential observability for these deployments, helping engineering teams track startup latency, uptime, and recovery times across node pools and JobSets. However, scaling to next-generation TPU v7 architectures demands visibility beyond cluster-level scheduling. Dynamic Slicing decouples capacity allocation from physical topology, requiring platform teams to map virtual slice states directly to underlying reservation subblocks to diagnose hardware failures and optimize slice formation efficiency.

The Paradigm Shift: Preparing for v7 and Dynamic Slicing

If you recall with left Alex, a Lead AI Platform Engineer with her v5e pipelines finally humming along. Alex’s manager suddenly drops the big news: they have just secured an allocation of the latest and greatest v7 TPUs for the same training cluster. These aren’t just faster—they operate on an entirely different architectural paradigm.

While the foundational WLI metrics work seamlessly across all TPU generations, this new allocation will leverage GKE Dynamic Slicing for unprecedented scale. Traditionally, users had to provision TPU capacity in rigid, pre-defined shapes. Dynamic slicing changes the game for TPU resource management by decoupling physical capacity provisioning from slice formation.

With dynamic slicing and incremental provisioning, GKE node pools are provisioned in modular, isolated 16-node cubes. The GKE Slice Controller then dynamically reconfigures the Optical Circuit Switching (OCS) network to connect these cubes, forming the requested TPU slice topologies on the fly.

This brings massive benefits: faster time to provision, agile capacity reshaping, and quicker recovery from hardware failures. However, this dynamic behavior introduces an observability challenge: How do platform operators and ML engineers track the lifecycle of their slices and trace a failing Kubernetes JobSet back to the underlying physical reservation blocks and subblocks?

Bridging the Gap: The New Dynamic Slicing Observatory

Alex refuses to be caught off guard. Before the v7 TPUs even spin up, she proactively configures her alerts using a new suite of lifecycle and metadata metrics in GKE 1.36+ that establish end-to-end lineage and health tracking from workloads to physical hardware. These metrics are written at the project level, sampled every 60 seconds, and are available under the kubernetes.io domain in Cloud Monitoring.

To understand how to monitor this, you have to visualize the relationship graph. Observability in GKE Dynamic Slicing is about mapping the relationships between your workloads (Kubernetes JobSets), the virtual TPU slices they run on, the logical partitions composing those slices, and the physical reservation hardware.Here is a breakdown of the metrics that bring this diagram to life:

1. Slice Lifecycle and Duration Metrics

These metrics monitor the actual operations and transitions of the GKE Slice Controller as it creates and dismantles slices.

2. Workload Allocation and Correlation Metrics

  • kubernetes.io/jobset/assigned_slices: Indicates which TPU slices a Kubernetes JobSet is scheduled on. A value of True indicates scheduling; False is written when the job is de-scheduled.

3. TPU Metadata Metrics

These metrics map the virtualized TPU entities (slices, partitions) to node pools and the underlying physical GCE reservation hardware.

Scenario 3: The Needle in the v7 Haystack

With her runbooks updated, Alex is ready. Let’s suppose a massive v7 multi-slice JAX training job fails with a TPU link communication error. In a dynamic slicing environment, finding the physical culprit used to be a nightmare. Now, she simply follows the breadcrumbs:

Step 1: Detect a State Failure

An alert based on the below query is triggered when the state of a TPU V7 slice transitions to FAILED:

kubernetes_io:accelerator_slice_state == “FAILED”

Cloud Console UI:

She discovers that logical slice test-slice-a has failed.

Step 2: Identify the Affected Workloads

She queries the assigned slices metric to find the active JobSet:

kubernetes_io:jobset_assigned_slices{slice_name=“test-slice-a”}

Cloud Console UI:

She verifies that the JAX training job jax-training-run-4 is affected.

Step 3: Map the Slice to Logical Partition IDs

She identifies which logical partition IDs compose test-slice-a:

kubernetes_io:accelerator_slice_metadata{entity_name=“test-slice-a”}

Cloud Console UI:

The query maps the slice to partition IDs part-hash-01 and part-hash-02.

Step 4: Pinpoint the Physical Reservation Block and Subblock

Finally, she resolves those logical partition IDs to the GCE reservation structure:

kubernetes_io:accelerator_partition_metadata{partition_id=~“part-hash-01”}

Cloud Console UI:

The result reveals that these partitions reside on Reservation my-tpu-reservation

From here, she can examine the health labels of these specific subblocks or coordinate with Google Cloud support using the exact block/subblock details to resolve the hardware fault. This cuts down triage time from hours of manual log digging to minutes.

View All Reservations:

gCloud Command:

To list all Compute Engine reservations across all zones in a project:

gcloud compute reservations list --project=<PROJECT_ID>

  • Filter by READY status:

gcloud compute reservations list --project=<PROJECT_ID> --filter=“status=READY”

  • Scope to specific zones:

gcloud compute reservations list --project=<PROJECT_ID> --zones=<ZONE_1>,<ZONE_2>

  • If you do not know the zone (search across all zones in the project):

# Exact name match

gcloud compute reservations list --project=<PROJECT_ID> --filter=“name=XXX”

# Prefix / substring match

gcloud compute reservations list --project=<PROJECT_ID> --filter=“name:XXX”

  • If you know the zone and want full details:

gcloud compute reservations describe XXX \

--zone=<ZONE> \\

--project=<PROJECT_ID>

Cloud Console UI:

View all blocks in this reservation:

gCloud Command:

  • List all blocks in a reservation:

gcloud compute reservations blocks list <RESERVATION_NAME> \

--zone=<ZONE> \\

--project=<PROJECT_ID>
  • Describe a specific block (for full topology and host details):

gcloud compute reservations blocks describe <RESERVATION_NAME> \

--block-name=<BLOCK_NAME> \\

--zone=<ZONE> \\

--project=<PROJECT_ID>

Cloud Console UI:

View all sub blocks in this block:

gCloud Command:

  • List all sub-blocks in a specific block:

gcloud compute reservations sub-blocks list <RESERVATION_NAME> \

--block-name=<BLOCK_NAME> \\

--zone=<ZONE> \\

--project=<PROJECT_ID>
  • Describe a specific sub-block (for full topology and host details):

gcloud compute reservations sub-blocks describe <RESERVATION_NAME> \

--block-name=<BLOCK_NAME> \\

--sub-block-name=<SUB_BLOCK_NAME> \\

--zone=<ZONE> \\

--project=<PROJECT_ID>

Cloud Console UI:

The Unexpected Bonus: FinOps and Capacity Management

By tracking these metrics, Alex inadvertently becomes the hero of her FinOps and billing teams. Beyond troubleshooting, these metrics are crucial for financial operations.

By grouping kubernetes.io/accelerator/partition/metadata by reservation_name and node_pool_name, teams can track reservation utilization over time. Even better, they can cross-reference jobset/assigned_slices and the reservation metadata to charge back TPU costs to specific teams based on the exact blocks and subblocks they occupied. Precise, granular departmental billing for dynamically assembled hardware is finally a reality.

Conclusion: Ready for the Next Generation

By proactively embracing these observability tools, Alex transformed her operational posture from purely reactive firefighting to predictive, precise management.

Whether you are managing stable workloads on legacy generations using Workload Lifecycle metrics, or preparing for the dynamic, highly distributed infrastructure of new TPU fleets with Dynamic Slicing, you need telemetry that peers through the virtualization layers down to the optical circuitry.

These metrics are available out of the box in GKE version 1.36 or later. If you run AI/ML training or large-scale JobSet workloads, enable system metrics forwarding to Cloud Monitoring and start tracking these KPIs in your Dashboards. Don’t wait for your complex training jobs to fail—refer to the GKE Observability Guide and the GKE System Metrics Reference to dive in today!

2 Likes