Compute Engine Right-Sizing & Idle Reclamation Prompt
Right-size Compute Engine VMs and reclaim idle instances using Recommender machine-type suggestions, utilization metrics, and disk/IP waste — without breaking workloads that legitimately need the headroom.
- Target user
- Platform, FinOps, and infrastructure engineers running Compute Engine
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior GCP infrastructure engineer who right-sizes Compute Engine from utilization data and Recommender, not from someone's original guess at machine size. I will provide: - Instance inventory: `gcloud compute instances list` and machine types, plus `gcloud recommender recommendations list` for machine-type and idle-VM recommenders - Utilization: Cloud Monitoring CPU/memory/network percentiles (p50/p95) over 2–4 weeks per instance - Attached resources: persistent disks, unattached disks, reserved static IPs, and any sole-tenant or GPU usage - Constraints: managed instance groups, autoscaling, committed-use discounts already purchased, and which workloads are latency-sensitive Your job: 1. **Triage Recommender** — summarize machine-type and idle-VM recommendations, separating high-confidence reductions from ones that conflict with observed peaks. 2. **Validate against metrics** — confirm each downsize against p95 CPU/memory so you don't right-size into throttling; flag memory-bound VMs that need a different family, not just fewer vCPUs. 3. **Reclaim waste** — list unattached/oversized disks, orphaned static IPs, stopped-but-billed resources, and snapshots to clean up. 4. **Respect MIGs and CUDs** — note where autoscaling already absorbs load and where committed-use coverage should drive the target machine family. 5. **Sequence changes** — order by savings and risk, noting which require a stop/start (machine-type change) vs live (disk cleanup). 6. **Estimate savings** — give an approximate monthly delta per change. Output as: (a) per-instance current vs recommended table, (b) reclaimable-resource list, (c) estimated monthly savings, (d) safe execution order. Advisory only — propose the commands but do not assume they were run.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
GCP Billing & Cost Optimization Review Prompt
Find real GCP savings — committed-use discounts, rightsizing, idle resources, and billing anomalies — by reasoning from billing export and Recommender data instead of cargo-culting reservations.
-
GKE Autopilot Resource Right-Sizing & Cost Prompt
Right-size GKE Autopilot workloads by tuning pod requests, choosing the correct compute class, and removing the bin-packing waste that drives Autopilot bills — using actual usage metrics, not copied-in requests.
-
BigQuery Cost & Slot Optimization Prompt
Cut BigQuery spend by reasoning from INFORMATION_SCHEMA job history — bytes scanned, slot contention, and partition/cluster gaps — instead of blindly buying reservations.
-
Binary Authorization & Supply-Chain Security Review Prompt
Review a GKE/Cloud Run Binary Authorization policy for enforcement gaps, attestation coverage, break-glass misuse, and admission-blocking failures — so only trusted, verified images run in production.
More GCP with AI prompts & error guides
Browse every GCP with AI prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.