Review Compute Engine recommendations before resizing VMs
On this page
This check is due for a source refresh. Confirm the current documentation before you rely on provider-specific details.
A resize can miss demand spikes or raise costs, so compare each recommendation with workload needs before approval. Confirm the target type is compatible and plan for a restart. An empty list is not proof that every VM is well sized.
What you need first
- Tool
- Use the Google Cloud CLI (gcloud), Google's command-line tool, in a Bash terminal. Install it, run gcloud init, and sign in with your federated identity first if your organization uses an external identity provider.
- Access
- Viewing recommendations requires recommender.computeInstanceMachineTypeRecommendations.list on the project. Resizing uses separate permissions and is outside this review.
- If you do not use that tool
- In Google Cloud console, open VM instances and read the Recommendation column, which can be sorted by estimated savings. Otherwise ask an authorized cloud colleague to run the command for your project and each zone and send the recommendation names, descriptions, and operation groups.
Why this is worth a look
Skipping this review can leave a VM short of capacity during brief or monthly peaks. Compute Engine uses the previous 8 days of CPU and memory data, with CPU averaged over 60-second intervals, so the recommendation fits weekly or persistent patterns better than infrequent spikes. Recommendations are free to view, but an applied resize is charged at the selected machine type's rate.
Run these commands
BASHRun this read-only Bash command with an authenticated gcloud CLI. It lists current machine type recommendations for one project and zone, returning documented names, descriptions, and proposed operation groups rather than usage measurements or historical data.
set -euo pipefail
PROJECT_ID="your-project-id"
ZONE="us-central1-c"
gcloud recommender recommendations list \
--recommender=google.compute.instance.MachineTypeRecommender \
--project="$PROJECT_ID" \
--location="$ZONE" \
--format="table(name,description,operationGroups)"How to confirm it
- 01
Set the project and zone
Replace PROJECT_ID and ZONE with the project ID and zone containing the VMs to review. Run the command once for each zone in scope. Read the proposed operations, and do not apply them during this review.
- 02
Compare against peak demand
Ask the workload owner whether brief or monthly peaks need more capacity than the recommendation suggests. Hold approval until those peaks are checked. For batch workloads where cost matters more than performance, an increase recommendation can be ignored.
- 03
Interpret an empty result
Wait 24 hours after creating a VM, or up to 24 hours after changing its machine type, before judging missing recommendations. Also check the exclusions below. Recommendations with estimated savings below $10 per month are not shown.
- 04
Check compatibility and interruption
Confirm that the target type supports the attached-disk count, image and license requirements, and is available in the VM's zone. Before approval, agree on acceptable interruption because applying a console recommendation stops the VM, changes its type, and restarts it.
Before making changes
Treat estimated savings as a comparison, not a bill forecast. Google uses the previous week's usage, extrapolates it to 30 days, and compares machine-type costs before sustained-use discounts. This assumes the workload owner can confirm that recent demand represents future needs. If they cannot, hold approval.