跳到正文
Skillpedia
部署与云(DevOps)22k · #10271

gke-ai-troubleshooting-tpu-performance-degradation

它能做什么

这项技能帮助 AI 智能体在 GKE 上的 TPU 训练变慢或步骤耗时骤增时找出原因。适合发现训练吞吐量下降的机器学习工程师。

适用场景

  • ✓当 GKE 上的一次训练运行中,TPU duty cycle 下降 15% 或更多时。
  • ✓当 GKE 上的 TPU 任务的训练步骤耗时突然变长时。
  • ✓当你需要判断是硬件、网络限流,还是你自己的工作负载导致变慢时。

技能链接

https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-tpu-performance-degradation/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-tpu-performance-degradation/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我在 GKE 上的 TPU 训练这周明显变慢了,你能帮我查明原因吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查 ML Diagnostics 的监控事件和 1 分钟粒度的系统指标,然后与节点拓扑标签进行比较,以区分硬件和网络限制与工作负载问题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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 (gcloud with alpha component for gcloud alpha mldiagnostics) and kubectl.
  • 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 ensure container.googleapis.com, monitoring.googleapis.com, and hypercomputecluster.googleapis.com are 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 jobset and job GKE job types, and is compatible with GKE versions 1.36.0-gke.4681000 and 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 mldiagnostics won'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 the kubectl get nodes query in Step 3
    • For remediation ([High Risk] steps): Kubernetes Engine Cluster Admin (roles/container.clusterAdmin)
  • 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 T
常见问题

这项技能关注多大的下降幅度?

它针对 TPU duty cycle 下降 15% 或更多的情况编写。

它需要 ML Diagnostics 吗?

这项技能依赖 ML Diagnostics Workload Monitoring 报告,因此完整分析需要该功能。

它也适用于 GPU 训练吗?

不适用。这项技能用于 GKE 上的 Cloud TPU 训练。

详情

作者的原始描述

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

repo: google/skills

热度

GitHub 星标
22k
排名
#10271
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能