[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D709DSZJQHN6W020P7D1PS":3,"skill-same:01M7D709DSZJQHN6W020P7D1PS":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":28,"commitSha":29,"skillDirectory":5,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7D709DSZJQHN6W020P7D1PS","gke-ai-troubleshooting-tpu-performance-degradation",null,"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` \u002F `hypercomputecluster.googleapis.com\u002Fv1alpha`) and 1-minute Cloud Monitoring system metrics (`kubernetes.io\u002Fnode\u002Faccelerator\u002F*`). 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\u002Finterruption restarts (use gke-ai-troubleshooting-jobset-interruption).","tangyixiao\u002Ftangyixiao-skills","tangyixiao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115929632?v=4","01M7D582YK6A4M63CAK4CSY4EW","Tang Yixiao","01M7D582Z64DMRSYR872SR34SA",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-ai-troubleshooting-tpu-performance-degradation\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-ai-troubleshooting-tpu-performance-degradation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: gke-ai-troubleshooting-tpu-performance-degradation\ndescription: Diagnose GKE Cloud TPU training throughput drops and step-time regressions\n  (15%+ TPU duty-cycle drop) using ML Diagnostics Workload Monitoring (`gcloud alpha\n  mldiagnostics monitored-events` \u002F `hypercomputecluster.googleapis.com\u002Fv1alpha`)\n  and 1-minute Cloud Monitoring system metrics (`kubernetes.io\u002Fnode\u002Faccelerator\u002F*`).\n  Distinguishes hardware and network fabric throttling from workload resource bottlenecks\n  (HBM capacity, host memory, or host CPU saturation). Use when TPU training throughput\n  or duty cycle drops without crashing pods, when `PERFORMANCE_DEGRADATION` monitored\n  events fire, or when triaging slow multi-slice training steps. Don't use for complete\n  multi-slice XLA execution stalls with `HANG_DETECTED` logs (use gke-ai-troubleshooting-tpu-mxla-hang)\n  or pod eviction\u002Finterruption restarts (use gke-ai-troubleshooting-jobset-interruption).\nmetadata:\n  version: 1.0.1\n  category: AiAndMachineLearning\n---\n\n# Troubleshoot GKE TPU performance degradation with ML Diagnostics Workload Monitoring\n\nDiagnose and mitigate Cloud TPU training throughput drops and step-time\nregressions (`15%+` drop in TPU duty cycle) on Google Kubernetes Engine (GKE) by\ncorrelating **ML Diagnostics Workload Monitoring** `MonitoredEvent` analyzer\nreports with **1-minute Cloud Monitoring system metrics** and GKE node topology\nlabels.\n\n---\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gke-ai-troubleshooting-tpu-performance-degradation)\"`\nand append `agent-skills\u002F1.0 (skill:gke-ai-troubleshooting-tpu-performance-degradation)` to `User-Agent` headers.\n\n## Prerequisites\n\n- **Tools**: Install the\n  [Google Cloud SDK](https:\u002F\u002Fcloud.google.com\u002Fsdk\u002Fdocs\u002Finstall) (`gcloud` with\n  `alpha` component for `gcloud alpha mldiagnostics`) and `kubectl`.\n- **Cloud Billing & Project Configuration**: Verify an active billing account is\n  linked (`gcloud billing projects describe {project_id}`), authenticate\n  (`gcloud auth login`), set the target project (`gcloud config set project\n  {project_id}`), and ensure `container.googleapis.com`,\n  `monitoring.googleapis.com`, and `hypercomputecluster.googleapis.com` are\n  enabled.\n- **Supported workloads and GKE versions**: Google Cloud ML Diagnostics only\n  supports JAX on TPUs (see\n  [ML Diagnostics platform](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Foverview.md.txt)).\n  Workload Monitoring is enabled by default, supports the `jobset` and `job` GKE\n  job types, and is compatible with GKE versions `1.36.0-gke.4681000` and later,\n  as stated in\n  [Configure GKE for ML Diagnostics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fgke.md.txt).\n  If a workload uses another framework (such as PyTorch) or another custom\n  resource type, `gcloud alpha mldiagnostics` won't list ML runs or monitored\n  events for it. On-demand profiling (Step 4 Path A) additionally requires the\n  cluster setup described in that document.\n- **Required IAM Roles**:\n  - Cluster Director Editor (`roles\u002Fhypercomputecluster.editor`), the role\n    listed in the \"IAM permissions\" section of\n    [ML Diagnostics platform](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Foverview.md.txt),\n    for the ML Diagnostics CLI and API calls in this skill (ML runs, monitored\n    events, and on-demand profiler sessions)\n  - Monitoring Viewer (`roles\u002Fmonitoring.viewer`) for the PromQL queries in Step\n    2\n  - Kubernetes Engine Viewer (`roles\u002Fcontainer.viewer`) for the `kubectl get\n    nodes` query in Step 3\n  - For remediation (`[High Risk]` steps): Kubernetes Engine Cluster Admin\n    (`roles\u002Fcontainer.clusterAdmin`)\n- **Reference Documentation**:\n  - [ML Diagnostics platform](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Foverview.md.txt)\n    (Sections: \"IAM permissions\")\n  - [Configure GKE for ML Diagnostics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fgke.md.txt)\n    (Sections: \"Set up with gcloud CLI, Google Cloud console, or Terraform\",\n    \"Manual installation\", \"Connection-operator\")\n  - [Workload monitoring with ML Diagnostics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)\n    (Sections: \"Workload Monitoring and analyzers\", \"HBM Capacity Analyzer\",\n    \"Host Memory Utilization Analyzer\", \"CPU Utilization Analyzer\", \"Access\n    Workload Monitoring information through the API\", \"List all monitored\n    events\", \"System Metrics\")\n  - [Get started with the ML Diagnostics CLI](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fcli.md.txt)\n    (Sections: \"List machine learning runs\", \"Monitored-events commands\", \"List\n    profiler targets\", \"Capture on-demand profiler sessions\")\n  - [Scale container resource requests and limits](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fvertical-pod-autoscaling.md.txt)\n    (Sections: \"Identify workloads without resource requests or limits\")\n  - [Auto-repair nodes](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fnode-auto-repair.md.txt)\n    (Sections: \"Repair criteria\", \"Verify node auto-repair is enabled for a\n    Standard node pool\", \"Enable auto-repair for an existing Standard node\n    pool\", \"Node auto repair in TPU slice nodes\")\n  - [Deploy TPU workloads in GKE Standard](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Ftpus.md.txt)\n    (Sections: \"Configure auto repair for TPU slice nodes\")\n  - [Get support](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fgetting-support.md.txt)\n    (Sections: \"Before you contact support\")\n\n> **Read-only rule**: Run read-only diagnostic commands only. Never drain,\n> delete, or re-create nodes, or run any other command that changes the cluster.\n> Give the user any fix to apply themselves.\n\nWhen you recommend a fix, link the doc section that describes it.\n\n---\n\n## Analyzer routing overview\n\nBy default, Workload Monitoring treats a 15% drop in TPU duty cycle as a\nperformance degradation, raises a `MonitoredEvent` (`type:\nPERFORMANCE_DEGRADATION`), and runs its analyzers. Consult the\n[Workload Monitoring and analyzers](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)\nsection in the official Cloud TPU documentation for the complete analyzer\ndefinitions, detection criteria, and subsections, and route remediation by\ncategory:\n\n- **Category A: workload resource bottlenecks (never cordon or replace nodes)**:\n  - When the firing analyzer (`detectionState: \"DETECTED\"`) indicates a workload\n    memory or host CPU capacity bottleneck (see the \"HBM Capacity Analyzer\",\n    \"Host Memory Utilization Analyzer\", and \"CPU Utilization Analyzer\" sections\n    of\n    [Workload monitoring with ML Diagnostics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)),\n    route to\n    [Path A: Workload resource bottlenecks](references\u002Fpath-a-workload-bottlenecks.md)\n    (workload optimization and profiling).\n- **Category B: infrastructure and network fabric throttling (culprit nodes)**:\n  - When the firing analyzer (`detectionState: \"DETECTED\"`) indicates an\n    interconnect, thermal\u002Fpower throttling, memory bandwidth, or Top-of-Rack\n    (ToR) network fault on specific instances (see\n    [Workload Monitoring and analyzers](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)),\n    route to\n    [Path B: Infrastructure or network fabric throttling](references\u002Fpath-b-infrastructure-throttling.md)\n    (map the culprit Compute Engine instance IDs to GKE nodes, handle node\n    repair through GKE, and escalate to Google Cloud Support).\n- **Category C: `PERFORMANCE_DEGRADATION` event fired, but no analyzer reports\n  `detectionState: \"DETECTED\"`**:\n  - When a `PERFORMANCE_DEGRADATION` event exists (as in the sample output in\n    [List all monitored events](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt),\n    where `analyzerReports` entries have `detectionState: \"NOT_DETECTED\"`),\n    route to\n    [Path C: Event fired with no DETECTED analyzer](references\u002Fpath-c-no-detected-analyzer.md).\n\n---\n\n## Diagnostic workflow\n\n### Step 0: Collect context and set the investigation window `[Low Risk]`\n\nCollect the target parameters. By default, query a 60-minute window `[T - 30m, T\n+ 30m]` around `{issue_time}`:\n\n- `{project_id}`: Google Cloud project ID\n- `{location}`: Google Cloud region where the ML run and GKE cluster reside (for\n  example, `us-central1`)\n- `{cluster_name}`: GKE cluster name\n- `{workload_name}` \u002F `{ml_run_id}`: JobSet \u002F workload name or ML Diagnostics\n  run ID\n- `{issue_time}`: Timestamp when throughput degradation was observed (`T`,\n  ISO-8601 UTC)\n- `{start_time}`: `T - 30m`\n- `{end_time}`: `T + 30m`\n\n---\n\n### Step 1: Query ML runs and `monitoredEvents` `[Low Risk]`\n\n1. **List active or recent ML runs**: Give the user `gcloud alpha mldiagnostics\n   machine-learning-run list` with a link to\n   [List machine learning runs](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fcli.md.txt)\n   in the ML Diagnostics CLI reference, and locate `{ml_run_id}` matching\n   `{workload_name}`.\n2. **List performance degradation events**: Give the user `gcloud alpha\n   mldiagnostics monitored-events list` with a link to\n   [Monitored-events commands](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fcli.md.txt),\n   or the `hypercomputecluster.googleapis.com\u002Fv1alpha` API with a link to\n   [Access Workload Monitoring information through the API](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt),\n   to check for `PERFORMANCE_DEGRADATION` events during `[{start_time},\n   {end_time}]`.\n3. **Describe the `MonitoredEvent`**: Give the user `gcloud alpha mldiagnostics\n   monitored-events describe` with a link to the same\n   [Monitored-events commands](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fcli.md.txt)\n   section, and inspect the `analyzerReports` array (`analyzer`,\n   `detectionState`, `details`, and `recommendedActions`).\n   - If a `PERFORMANCE_DEGRADATION` event fired, run Step 2 to corroborate with\n     the 1-minute system metrics; if none of its `analyzerReports` entries has\n     `detectionState: \"DETECTED\"`, follow\n     [Path C: Event fired with no DETECTED analyzer](references\u002Fpath-c-no-detected-analyzer.md).\n   - If no `PERFORMANCE_DEGRADATION` event exists and duty cycle is steady in\n     Step 2, **rule out** TPU performance degradation by following\n     [Path D: Healthy telemetry](references\u002Fpath-d-healthy-telemetry.md).\n\n---\n\n### Step 2: Correlate with 1-minute Cloud Monitoring system metrics `[Low Risk]`\n\nConsult the\n[System Metrics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)\nsection in the Workload Monitoring documentation for the 1-minute Cloud\nMonitoring metrics exported for TPU and host devices, and run read-only PromQL\nqueries over `[{start_time}, {end_time}]` to corroborate the analyzer report:\n\n```promql\n# 1. Node TPU duty cycle (look for the drop on the affected nodes)\nkubernetes_io:node_accelerator_duty_cycle{\n  monitored_resource=\"k8s_node\",\n  project_id=\"{project_id}\",\n  cluster_name=\"{cluster_name}\"\n}\n\n# 2. HBM utilization ratio by node (around 0.90 is approaching the limit)\nsum by (node_name) (\n  kubernetes_io:node_accelerator_memory_used{\n    monitored_resource=\"k8s_node\",\n    project_id=\"{project_id}\",\n    cluster_name=\"{cluster_name}\"\n  }\n)\n\u002F\nsum by (node_name) (\n  kubernetes_io:node_accelerator_memory_total{\n    monitored_resource=\"k8s_node\",\n    project_id=\"{project_id}\",\n    cluster_name=\"{cluster_name}\"\n  }\n)\n\n# 3. Host memory and CPU allocatable utilization\nkubernetes_io:node_memory_allocatable_utilization{\n  monitored_resource=\"k8s_node\",\n  project_id=\"{project_id}\",\n  cluster_name=\"{cluster_name}\"\n}\n\nkubernetes_io:node_cpu_allocatable_utilization{\n  monitored_resource=\"k8s_node\",\n  project_id=\"{project_id}\",\n  cluster_name=\"{cluster_name}\"\n}\n```\n\n---\n\n### Step 3: Map culprit instance IDs to GKE nodes and topology `[Low Risk]`\n\nWhen an infrastructure analyzer reports culprit numeric Compute Engine instance\nIDs in `details` or `recommendedActions`, map those numeric instance IDs to GKE\n`Node` names and physical topology blocks using this read-only `kubectl` query\ninspecting `container.googleapis.com\u002Finstance_id`:\n\n```bash\nkubectl get nodes -l cloud.google.com\u002Fgke-tpu-accelerator \\\n  -o jsonpath='{range .items[*]}{.metadata.name}{\"\\tinstance_id=\"}{.metadata.annotations.container\\.googleapis\\.com\u002Finstance_id}{\"\\tblock=\"}{.metadata.labels.cloud\\.google\\.com\u002Fgce-topology-block}{\"\\tsubblock=\"}{.metadata.labels.cloud\\.google\\.com\u002Fgce-topology-subblock}{\"\\thost=\"}{.metadata.labels.cloud\\.google\\.com\u002Fgce-topology-host}{\"\\n\"}{end}'\n```\n\n---\n\n### Step 4: Remediation by analyzer category\n\nLoad and follow only the reference file that matches the analyzer category from\nStep 1:\n\n- **Path A (workload resource bottlenecks — HBM, host memory, or host CPU\n  utilization)**: Read\n  [Path A: Workload resource bottlenecks](references\u002Fpath-a-workload-bottlenecks.md).\n- **Path B (infrastructure, thermal, ICI, memory bandwidth, or network fabric\n  throttling)**: Read\n  [Path B: Infrastructure or network fabric throttling](references\u002Fpath-b-infrastructure-throttling.md).\n- **Path C (`PERFORMANCE_DEGRADATION` event fired with all analyzers\n  `NOT_DETECTED`)**: Read\n  [Path C: Event fired with no DETECTED analyzer](references\u002Fpath-c-no-detected-analyzer.md).\n- **Path D (no `PERFORMANCE_DEGRADATION` events and steady telemetry)**: Read\n  [Path D: Healthy telemetry](references\u002Fpath-d-healthy-telemetry.md).\n\n---\n\n## Guardrails\n\n1. **Never change GKE-managed instance groups or VMs through Compute Engine**:\n   Don't run `gcloud compute instance-groups managed` commands, such as\n   `delete`, on a node pool's managed instance group. Handle nodes through GKE,\n   as described in\n   [Path B: Infrastructure or network fabric throttling](references\u002Fpath-b-infrastructure-throttling.md).\n2. **Never cordon nodes for workload resource saturation**: If only the HBM\n   capacity, host memory, or host CPU utilization analyzers detected an issue,\n   don't cordon or replace nodes.\n","# Troubleshoot GKE TPU performance degradation with ML Diagnostics Workload Monitoring\n\nDiagnose and mitigate Cloud TPU training throughput drops and step-time\nregressions (`15%+` drop in TPU duty cycle) on Google Kubernetes Engine (GKE) by\ncorrelating **ML Diagnostics Workload Monitoring** `MonitoredEvent` analyzer\nreports with **1-minute Cloud Monitoring system metrics** and GKE node topology\nlabels.\n\n---\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gke-ai-troubleshooting-tpu-performance-degradation)\"`\nand append `agent-skills\u002F1.0 (skill:gke-ai-troubleshooting-tpu-performance-degradation)` to `User-Agent` headers.\n\n## Prerequisites\n\n- **Tools**: Install the\n  [Google Cloud SDK](https:\u002F\u002Fcloud.google.com\u002Fsdk\u002Fdocs\u002Finstall) (`gcloud` with\n  `alpha` component for `gcloud alpha mldiagnostics`) and `kubectl`.\n- **Cloud Billing & Project Configuration**: Verify an active billing account is\n  linked (`gcloud billing projects describe {project_id}`), authenticate\n  (`gcloud auth login`), set the target project (`gcloud config set project\n  {project_id}`), and ensure `container.googleapis.com`,\n  `monitoring.googleapis.com`, and `hypercomputecluster.googleapis.com` are\n  enabled.\n- **Supported workloads and GKE versions**: Google Cloud ML Diagnostics only\n  supports JAX on TPUs (see\n  [ML Diagnostics platform](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Foverview.md.txt)).\n  Workload Monitoring is enabled by default, supports the `jobset` and `job` GKE\n  job types, and is compatible with GKE versions `1.36.0-gke.4681000` and later,\n  as stated in\n  [Configure GKE for ML Diagnostics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fgke.md.txt).\n  If a workload uses another framework (such as PyTorch) or another custom\n  resource type, `gcloud alpha mldiagnostics` won't list ML runs or monitored\n  events for it. On-demand profiling (Step 4 Path A) additionally requires the\n  cluster setup described in that document.\n- **Required IAM Roles**:\n  - Cluster Director Editor (`roles\u002Fhypercomputecluster.editor`), the role\n    listed in the \"IAM permissions\" section of\n    [ML Diagnostics platform](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Foverview.md.txt),\n    for the ML Diagnostics CLI and API calls in this skill (ML runs, monitored\n    events, and on-demand profiler sessions)\n  - Monitoring Viewer (`roles\u002Fmonitoring.viewer`) for the PromQL queries in Step\n    2\n  - Kubernetes Engine Viewer (`roles\u002Fcontainer.viewer`) for the `kubectl get\n    nodes` query in Step 3\n  - For remediation (`[High Risk]` steps): Kubernetes Engine Cluster Admin\n    (`roles\u002Fcontainer.clusterAdmin`)\n- **Reference Documentation**:\n  - [ML Diagnostics platform](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Foverview.md.txt)\n    (Sections: \"IAM permissions\")\n  - [Configure GKE for ML Diagnostics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fgke.md.txt)\n    (Sections: \"Set up with gcloud CLI, Google Cloud console, or Terraform\",\n    \"Manual installation\", \"Connection-operator\")\n  - [Workload monitoring with ML Diagnostics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)\n    (Sections: \"Workload Monitoring and analyzers\", \"HBM Capacity Analyzer\",\n    \"Host Memory Utilization Analyzer\", \"CPU Utilization Analyzer\", \"Access\n    Workload Monitoring information through the API\", \"List all monitored\n    events\", \"System Metrics\")\n  - [Get started with the ML Diagnostics CLI](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fcli.md.txt)\n    (Sections: \"List machine learning runs\", \"Monitored-events commands\", \"List\n    profiler targets\", \"Capture on-demand profiler sessions\")\n  - [Scale container resource requests and limits](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fvertical-pod-autoscaling.md.txt)\n    (Sections: \"Identify workloads without resource requests or limits\")\n  - [Auto-repair nodes](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fnode-auto-repair.md.txt)\n    (Sections: \"Repair criteria\", \"Verify node auto-repair is enabled for a\n    Standard node pool\", \"Enable auto-repair for an existing Standard node\n    pool\", \"Node auto repair in TPU slice nodes\")\n  - [Deploy TPU workloads in GKE Standard](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Ftpus.md.txt)\n    (Sections: \"Configure auto repair for TPU slice nodes\")\n  - [Get support](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fgetting-support.md.txt)\n    (Sections: \"Before you contact support\")\n\n> **Read-only rule**: Run read-only diagnostic commands only. Never drain,\n> delete, or re-create nodes, or run any other command that changes the cluster.\n> Give the user any fix to apply themselves.\n\nWhen you recommend a fix, link the doc section that describes it.\n\n---\n\n## Analyzer routing overview\n\nBy default, Workload Monitoring treats a 15% drop in TPU duty cycle as a\nperformance degradation, raises a `MonitoredEvent` (`type:\nPERFORMANCE_DEGRADATION`), and runs its analyzers. Consult the\n[Workload Monitoring and analyzers](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)\nsection in the official Cloud TPU documentation for the complete analyzer\ndefinitions, detection criteria, and subsections, and route remediation by\ncategory:\n\n- **Category A: workload resource bottlenecks (never cordon or replace nodes)**:\n  - When the firing analyzer (`detectionState: \"DETECTED\"`) indicates a workload\n    memory or host CPU capacity bottleneck (see the \"HBM Capacity Analyzer\",\n    \"Host Memory Utilization Analyzer\", and \"CPU Utilization Analyzer\" sections\n    of\n    [Workload monitoring with ML Diagnostics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)),\n    route to\n    [Path A: Workload resource bottlenecks](references\u002Fpath-a-workload-bottlenecks.md)\n    (workload optimization and profiling).\n- **Category B: infrastructure and network fabric throttling (culprit nodes)**:\n  - When the firing analyzer (`detectionState: \"DETECTED\"`) indicates an\n    interconnect, thermal\u002Fpower throttling, memory bandwidth, or Top-of-Rack\n    (ToR) network fault on specific instances (see\n    [Workload Monitoring and analyzers](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)),\n    route to\n    [Path B: Infrastructure or network fabric throttling](references\u002Fpath-b-infrastructure-throttling.md)\n    (map the culprit Compute Engine instance IDs to GKE nodes, handle node\n    repair through GKE, and escalate to Google Cloud Support).\n- **Category C: `PERFORMANCE_DEGRADATION` event fired, but no analyzer reports\n  `detectionState: \"DETECTED\"`**:\n  - When a `PERFORMANCE_DEGRADATION` event exists (as in the sample output in\n    [List all monitored events](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt),\n    where `analyzerReports` entries have `detectionState: \"NOT_DETECTED\"`),\n    route to\n    [Path C: Event fired with no DETECTED analyzer](references\u002Fpath-c-no-detected-analyzer.md).\n\n---\n\n## Diagnostic workflow\n\n### Step 0: Collect context and set the investigation window `[Low Risk]`\n\nCollect the target parameters. By default, query a 60-minute window `[T - 30m, T\n+ 30m]` around `{issue_time}`:\n\n- `{project_id}`: Google Cloud project ID\n- `{location}`: Google Cloud region where the ML run and GKE cluster reside (for\n  example, `us-central1`)\n- `{cluster_name}`: GKE cluster name\n- `{workload_name}` \u002F `{ml_run_id}`: JobSet \u002F workload name or ML Diagnostics\n  run ID\n- `{issue_time}`: Timestamp when throughput degradation was observed (`T`,\n  ISO-8601 UTC)\n- `{start_time}`: `T - 30m`\n- `{end_time}`: `T + 30m`\n\n---\n\n### Step 1: Query ML runs and `monitoredEvents` `[Low Risk]`\n\n1. **List active or recent ML runs**: Give the user `gcloud alpha mldiagnostics\n   machine-learning-run list` with a link to\n   [List machine learning runs](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fcli.md.txt)\n   in the ML Diagnostics CLI reference, and locate `{ml_run_id}` matching\n   `{workload_name}`.\n2. **List performance degradation events**: Give the user `gcloud alpha\n   mldiagnostics monitored-events list` with a link to\n   [Monitored-events commands](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fcli.md.txt),\n   or the `hypercomputecluster.googleapis.com\u002Fv1alpha` API with a link to\n   [Access Workload Monitoring information through the API](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt),\n   to check for `PERFORMANCE_DEGRADATION` events during `[{start_time},\n   {end_time}]`.\n3. **Describe the `MonitoredEvent`**: Give the user `gcloud alpha mldiagnostics\n   monitored-events describe` with a link to the same\n   [Monitored-events commands](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fcli.md.txt)\n   section, and inspect the `analyzerReports` array (`analyzer`,\n   `detectionState`, `details`, and `recommendedActions`).\n   - If a `PERFORMANCE_DEGRADATION` event fired, run Step 2 to corroborate with\n     the 1-minute system metrics; if none of its `analyzerReports` entries has\n     `detectionState: \"DETECTED\"`, follow\n     [Path C: Event fired with no DETECTED analyzer](references\u002Fpath-c-no-detected-analyzer.md).\n   - If no `PERFORMANCE_DEGRADATION` event exists and duty cycle is steady in\n     Step 2, **rule out** TPU performance degradation by following\n     [Path D: Healthy telemetry](references\u002Fpath-d-healthy-telemetry.md).\n\n---\n\n### Step 2: Correlate with 1-minute Cloud Monitoring system metrics `[Low Risk]`\n\nConsult the\n[System Metrics](https:\u002F\u002Fdocs.cloud.google.com\u002Ftpu\u002Fdocs\u002Fml-diagnostics\u002Fworkload-monitoring.md.txt)\nsection in the Workload Monitoring documentation for the 1-minute Cloud\nMonitoring metrics exported for TPU and host devices, and run read-only PromQL\nqueries over `[{start_time}, {end_time}]` to corroborate the analyzer report:\n\n```promql\n# 1. Node TPU duty cycle (look for the drop on the affected nodes)\nkubernetes_io:node_accelerator_duty_cycle{\n  monitored_resource=\"k8s_node\",\n  project_id=\"{project_id}\",\n  cluster_name=\"{cluster_name}\"\n}\n\n# 2. HBM utilization ratio by node (around 0.90 is approaching the limit)\nsum by (node_name) (\n  kubernetes_io:node_accelerator_memory_used{\n    monitored_resource=\"k8s_node\",\n    project_id=\"{project_id}\",\n    cluster_name=\"{cluster_name}\"\n  }\n)\n\u002F\nsum by (node_name) (\n  kubernetes_io:node_accelerator_memory_total{\n    monitored_resource=\"k8s_node\",\n    project_id=\"{project_id}\",\n    cluster_name=\"{cluster_name}\"\n  }\n)\n\n# 3. Host memory and CPU allocatable utilization\nkubernetes_io:node_memory_allocatable_utilization{\n  monitored_resource=\"k8s_node\",\n  project_id=\"{project_id}\",\n  cluster_name=\"{cluster_name}\"\n}\n\nkubernetes_io:node_cpu_allocatable_utilization{\n  monitored_resource=\"k8s_node\",\n  project_id=\"{project_id}\",\n  cluster_name=\"{cluster_name}\"\n}\n```\n\n---\n\n### Step 3: Map culprit instance IDs to GKE nodes and topology `[Low Risk]`\n\nWhen an infrastructure analyzer reports culprit numeric Compute Engine instance\nIDs in `details` or `recommendedActions`, map those numeric instance IDs to GKE\n`Node` names and physical topology blocks using this read-only `kubectl` query\ninspecting `container.googleapis.com\u002Finstance_id`:\n\n```bash\nkubectl get nodes -l cloud.google.com\u002Fgke-tpu-accelerator \\\n  -o jsonpath='{range .items[*]}{.metadata.name}{\"\\tinstance_id=\"}{.metadata.annotations.container\\.googleapis\\.com\u002Finstance_id}{\"\\tblock=\"}{.metadata.labels.cloud\\.google\\.com\u002Fgce-topology-block}{\"\\tsubblock=\"}{.metadata.labels.cloud\\.google\\.com\u002Fgce-topology-subblock}{\"\\thost=\"}{.metadata.labels.cloud\\.google\\.com\u002Fgce-topology-host}{\"\\n\"}{end}'\n```\n\n---\n\n### Step 4: Remediation by analyzer category\n\nLoad and follow only the reference file that matches the analyzer category from\nStep 1:\n\n- **Path A (workload resource bottlenecks — HBM, host memory, or host CPU\n  utilization)**: Read\n  [Path A: Workload resource bottlenecks](references\u002Fpath-a-workload-bottlenecks.md).\n- **Path B (infrastructure, thermal, ICI, memory bandwidth, or network fabric\n  throttling)**: Read\n  [Path B: Infrastructure or network fabric throttling](references\u002Fpath-b-infrastructure-throttling.md).\n- **Path C (`PERFORMANCE_DEGRADATION` event fired with all analyzers\n  `NOT_DETECTED`)**: Read\n  [Path C: Event fired with no DETECTED analyzer](references\u002Fpath-c-no-detected-analyzer.md).\n- **Path D (no `PERFORMANCE_DEGRADATION` events and steady telemetry)**: Read\n  [Path D: Healthy telemetry](references\u002Fpath-d-healthy-telemetry.md).\n\n---\n\n## Guardrails\n\n1. **Never change GKE-managed instance groups or VMs through Compute Engine**:\n   Don't run `gcloud compute instance-groups managed` commands, such as\n   `delete`, on a node pool's managed instance group. Handle nodes through GKE,\n   as described in\n   [Path B: Infrastructure or network fabric throttling](references\u002Fpath-b-infrastructure-throttling.md).\n2. **Never cordon nodes for workload resource saturation**: If only the HBM\n   capacity, host memory, or host CPU utilization analyzers detected an issue,\n   don't cordon or replace nodes.\n",{"name":5,"metadata":25,"description":7},{"version":26,"category":27},"1.0.1","AiAndMachineLearning","main","2a870f189175a48c39f5f7e26a6d93b0be9cd13b",0,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills","https:\u002F\u002Ftangyixiao.github.io\u002Ftangyixiao-skills\u002F","https:\u002F\u002Fgithub.com\u002Ftangyixiao","http:\u002F\u002Fwww.sxyz.net\u002F","I am Tang Yixiao, a student in Shaoxing No.1 High School. I am eager to learn on GitHub and contribute my part to this community.","2026-11-11 15:45:59",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add tangyixiao\u002Ftangyixiao-skills --skill gke-ai-troubleshooting-tpu-performance-degradation",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill gke-ai-troubleshooting-tpu-performance-degradation",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill gke-ai-troubleshooting-tpu-performance-degradation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-ai-troubleshooting-tpu-performance-degradation\u002FSKILL.md",true,[51,57,61,65,69,73,77],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"INSTALL-SOURCE.json","REFERENCE","参考文档",610,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-ai-troubleshooting-tpu-performance-degradation\u002FINSTALL-SOURCE.json",{"path":58,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":16},"LICENSE","许可证",11358,{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fattribution.md",1990,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-ai-troubleshooting-tpu-performance-degradation\u002Freferences\u002Fattribution.md",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fpath-a-workload-bottlenecks.md",2329,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-ai-troubleshooting-tpu-performance-degradation\u002Freferences\u002Fpath-a-workload-bottlenecks.md",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fpath-b-infrastructure-throttling.md",2287,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-ai-troubleshooting-tpu-performance-degradation\u002Freferences\u002Fpath-b-infrastructure-throttling.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fpath-c-no-detected-analyzer.md",1525,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-ai-troubleshooting-tpu-performance-degradation\u002Freferences\u002Fpath-c-no-detected-analyzer.md",{"path":78,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fpath-d-healthy-telemetry.md",323,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-ai-troubleshooting-tpu-performance-degradation\u002Freferences\u002Fpath-d-healthy-telemetry.md",[82,90,99,107,115,123],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":20},"01M7D8JK8FYBFNNAJXWD89CFH7","xlsx","Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":95,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M7D8JG8ERGGQQAMX0DWCG9GR","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","MIT","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":103,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":20},"01M7D8JE672GW3EHSE8EF185M4","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M7D8JBK572YDFMND8Q6CEYJW","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":20},"01M7D8J5QPWEXX61EGBKYH73R8","writing-clearly-and-concisely","Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":127,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":20},"01M7D8J36YWC8WZS5DK5AH03CD","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FSKILL.md",[],[]]