gke-ai-troubleshooting-tpu-performance-degradation
Diagnose GKE Cloud TPU training throughput drops and step-time regressions (15%+ TPU duty-cycle drop) using ML Diagnostics Workload Monitoring (`gcloud alpha mldiagnostics monitored-events` / `hypercomputecluster.googleapis.com/v1alpha`) and 1-minute Cloud Monitoring system metrics (`kubernetes.io/n…
Install / Use
npx skills add google/skills --skill gke-ai-troubleshooting-tpu-performance-degradationInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Our assessment of gke-ai-troubleshooting-tpu-performance-degradation
gke-ai-troubleshooting-tpu-performance-degradation scores 97/100 on our quality scale, 38th of 765 Operations skills we index (top 5%).
Its SKILL.md is 14 KB long, well organised into 14 sections with 2 code examples: a thorough specification that gives an agent plenty to work with.
With 20,340 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 26 days ago, so gke-ai-troubleshooting-tpu-performance-degradation is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
gke-ai-troubleshooting-tpu-performance-degradation compared with similar skills
All 4 of these similar skills score higher than gke-ai-troubleshooting-tpu-performance-degradation; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| gke-ai-troubleshooting-tpu-performance-degradation (this skill)by google | 97 | 20.3k | 26d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 100.1k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 76.5k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 88.8k | today | MCP Server |
| crawl4aiby unclecode | 100 | 85.9k | today | MCP Server |
Frequently asked questions
- How do I install gke-ai-troubleshooting-tpu-performance-degradation?
- Run
npx skills add google/skills --skill gke-ai-troubleshooting-tpu-performance-degradation. The install tabs above show the steps for each supported agent. - Which AI agents does gke-ai-troubleshooting-tpu-performance-degradation work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is gke-ai-troubleshooting-tpu-performance-degradation safe to use?
- It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is gke-ai-troubleshooting-tpu-performance-degradation still maintained?
- The repository was last updated 26 days ago, so gke-ai-troubleshooting-tpu-performance-degradation is actively maintained.
Skill content
View source on GitHubname: gke-ai-troubleshooting-tpu-performance-degradation
description: >-
Diagnose GKE Cloud TPU training throughput drops and step-time regressions
(15%+ TPU duty-cycle drop) using ML Diagnostics Workload Monitoring (gcloud alpha mldiagnostics monitored-events /
hypercomputecluster.googleapis.com/v1alpha) and 1-minute Cloud Monitoring
system metrics (kubernetes.io/node/accelerator/*). Distinguishes hardware
and network fabric throttling from workload resource bottlenecks (HBM
capacity, host memory, or host CPU saturation). Use when TPU training
throughput or duty cycle drops without crashing pods, when
PERFORMANCE_DEGRADATION monitored events fire, or when triaging slow
multi-slice training steps. Don't use for complete multi-slice XLA execution
stalls with HANG_DETECTED logs (use gke-ai-troubleshooting-tpu-mxla-hang) or
pod eviction/interruption restarts (use
gke-ai-troubleshooting-jobset-interruption).
metadata:
version: "1.0.1"
category: AiAndMachineLearning
Troubleshoot GKE TPU performance degradation with ML Diagnostics Workload Monitoring
Diagnose and mitigate Cloud TPU training throughput drops and step-time
regressions (15%+ drop in TPU duty cycle) on Google Kubernetes Engine (GKE) by
correlating ML Diagnostics Workload Monitoring MonitoredEvent analyzer
reports with 1-minute Cloud Monitoring system metrics and GKE node topology
labels.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-performance-degradation)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-performance-degradation) to User-Agent headers.
Prerequisites
- Tools: Install the
Google Cloud SDK (
gcloudwithalphacomponent forgcloud alpha mldiagnostics) andkubectl. - Cloud Billing & Project Configuration: Verify an active billing account is
linked (
gcloud billing projects describe {project_id}), authenticate (gcloud auth login), set the target project (gcloud config set project {project_id}), and ensurecontainer.googleapis.com,monitoring.googleapis.com, andhypercomputecluster.googleapis.comare enabled. - Supported workloads and GKE versions: Google Cloud ML Diagnostics only
supports JAX on TPUs (see
ML Diagnostics platform).
Workload Monitoring is enabled by default, supports the
jobsetandjobGKE job types, and is compatible with GKE versions1.36.0-gke.4681000and later, as stated in Configure GKE for ML Diagnostics. If a workload uses another framework (such as PyTorch) or another custom resource type,gcloud alpha mldiagnosticswon't list ML runs or monitored events for it. On-demand profiling (Step 4 Path A) additionally requires the cluster setup described in that document. - Required IAM Roles:
- Cluster Director Editor (
roles/hypercomputecluster.editor), the role listed in the "IAM permissions" section of ML Diagnostics platform, for the ML Diagnostics CLI and API calls in this skill (ML runs, monitored events, and on-demand profiler sessions) - Monitoring Viewer (
roles/monitoring.viewer) for the PromQL queries in Step 2 - Kubernetes Engine Viewer (
roles/container.viewer) for thekubectl get nodesquery in Step 3 - For remediation (
[High Risk]steps): Kubernetes Engine Cluster Admin (roles/container.clusterAdmin)
- Cluster Director Editor (
- Reference Documentation:
- ML Diagnostics platform (Sections: "IAM permissions")
- Configure GKE for ML Diagnostics (Sections: "Set up with gcloud CLI, Google Cloud console, or Terraform", "Manual installation", "Connection-operator")
- Workload monitoring with ML Diagnostics (Sections: "Workload Monitoring and analyzers", "HBM Capacity Analyzer", "Host Memory Utilization Analyzer", "CPU Utilization Analyzer", "Access Workload Monitoring information through the API", "List all monitored events", "System Metrics")
- Get started with the ML Diagnostics CLI (Sections: "List machine learning runs", "Monitored-events commands", "List profiler targets", "Capture on-demand profiler sessions")
- Scale container resource requests and limits (Sections: "Identify workloads without resource requests or limits")
- Auto-repair nodes (Sections: "Repair criteria", "Verify node auto-repair is enabled for a Standard node pool", "Enable auto-repair for an existing Standard node pool", "Node auto repair in TPU slice nodes")
- Deploy TPU workloads in GKE Standard (Sections: "Configure auto repair for TPU slice nodes")
- Get support (Sections: "Before you contact support")
Read-only rule: Run read-only diagnostic commands only. Never drain, delete, or re-create nodes, or run any other command that changes the cluster. Give the user any fix to apply themselves.
When you recommend a fix, link the doc section that describes it.
Analyzer routing overview
By default, Workload Monitoring treats a 15% drop in TPU duty cycle as a
performance degradation, raises a MonitoredEvent (type: PERFORMANCE_DEGRADATION), and runs its analyzers. Consult the
Workload Monitoring and analyzers
section in the official Cloud TPU documentation for the complete analyzer
definitions, detection criteria, and subsections, and route remediation by
category:
- Category A: workload resource bottlenecks (never cordon or replace nodes):
- When the firing analyzer (
detectionState: "DETECTED") indicates a workload memory or host CPU capacity bottleneck (see the "HBM Capacity Analyzer", "Host Memory Utilization Analyzer", and "CPU Utilization Analyzer" sections of Workload monitoring with ML Diagnostics), route to Path A: Workload resource bottlenecks (workload optimization and profiling).
- When the firing analyzer (
- Category B: infrastructure and network fabric throttling (culprit nodes):
- When the firing analyzer (
detectionState: "DETECTED") indicates an interconnect, thermal/power throttling, memory bandwidth, or Top-of-Rack (ToR) network fault on specific instances (see Workload Monitoring and analyzers), route to Path B: Infrastructure or network fabric throttling (map the culprit Compute Engine instance IDs to GKE nodes, handle node repair through GKE, and escalate to Google Cloud Support).
- When the firing analyzer (
- Category C:
PERFORMANCE_DEGRADATIONevent fired, but no analyzer reportsdetectionState: "DETECTED":- When a
PERFORMANCE_DEGRADATIONevent exists (as in the sample output in List all monitored events, whereanalyzerReportsentries havedetectionState: "NOT_DETECTED"), route to Path C: Event fired with no DETECTED analyzer.
- When a
Diagnostic workflow
Step 0: Collect context and set the investigation window [Low Risk]
Collect the target parameters. By default, query a 60-minute window `[T - 30m, T
- 30m]
around{issue_time}`:
{project_id}: Google Cloud project ID{location}: Google Cloud region where the ML run and GKE cluster reside (for example,us-central1){cluster_name}: GKE cluster name{workload_name}/{ml_run_id}: JobSet / workload name or ML Diagnostics run ID{issue_time}: Timestamp when throughput degradation was observed (T, ISO-8601 UTC){start_time}:T - 30m{end_time}:T + 30m
Step 1: Query ML runs and monitoredEvents [Low Risk]
- List active or recent ML runs: Give the user
gcloud alpha mldiagnostics machine-learning-run listwith a link to List machine learning runs in the ML Diagnostics CLI reference, and locate{ml_run_id}matching{workload_name}. - List performance degradation events: Give the user
gcloud alpha mldiagnostics monitored-events listwith a link to Monitored-events commands, or thehypercomputecluster.googleapis.com/v1alphaAPI with a link to Access Workload Monitoring information through the API, to check forPERFORMANCE_DEGRADATIONevents during[{start_time}, {end_time}]. - Describe the
MonitoredEvent: Give the usergcloud alpha mldiagnostics monitored-events describewith a link to the same Monitored-events commands section, and inspect theanalyzerReportsarray (analyzer,detectionState,details, andrecommendedActions).- If a
PERFORMANCE_DEGRADATIONevent fired, run Step 2 to corroborate with the 1-minute system metrics; if none of itsanalyzerReportsentries hasdetectionState: "DETECTED", follow Path C: Event fired with no DETECTED analyzer. - If no
PERFORMANCE_DEGRADATIONevent exists and duty cycle is steady in Step 2, rule out TPU performance degradation by following Path D: Healthy telemetry.
- If a
Step 2: Correlate with 1-minute Cloud Monitoring system metrics [Low Risk]
Consult the
System Metrics
section in the Workload Monitoring documentation for the 1-minute Cloud
Monitoring metrics exported for TPU and host devices, and run read-only PromQL
queries over [{start_time}, {end_time}] to corroborate the analyzer report:
# 1. Node TPU duty cycle (look for the drop on the affected nodes)
kubernetes_io:node_accelerator_duty_cycle{
monitored_resource="k8s_node",
project_id="{project_id}",
cluster_name="{cluster_name}"
}
# 2. HBM utilization ratio by node (around 0.90 is approaching the limit)
sum by (node_name) (
kubernetes_io:node_accelerator_memory_used{
monitored_resource="k8s_node",
project_id="{project_id}",
cluster_name="{cluster_name}"
}
)
/
sum by (node_name) (
kubernetes_io:node_accelerator_memory_total{
monitored_resource="k8s_node",
project_id="{project_id}",
cluster_name="{cluster_name}"
}
)
# 3. Host memory and CPU allocatable utilization
kubernetes_io:node_memory_allocatable_utilization{
monitored_resource="k8s_node",
project_id=
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
100.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
76.5kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
88.8k🕷️ A Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
85.9kOpen-source web crawler and scraper for LLMs and AI agents: any website into clean, LLM-ready Markdown. Run it yourself, or use Crawl4AI Cloud with one key. Join our Discord https://discord.gg/VuxzM8mtf
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
