Google CloudCompute4 min read

Review GCE machine type recommendations before resizing VMs

Sources checked September 9, 202610 minutes
On this page
THE SHORT ANSWER

Review each returned machine type recommendation, then resize only when it fits the workload pattern and the target type is available in the zone. An empty result is not proof that every VM is ideally sized.

Why this is worth a look

Compute Engine uses the last 8 days of CPU and memory metrics to generate machine type recommendations, which are available at no charge. The algorithm suits weekly patterns, gradual growth or decline, persistent underuse, and persistent throttling, but is less suited to infrequent or very brief CPU spikes. Recommendations are unavailable for VMs with ephemeral disks, GPUs, or TPUs, and for memory-optimized instances. Google also does not show recommendations when estimated savings are below $10 per month, so an empty result does not establish that no smaller opportunity exists. For batch workloads where cost matters more than performance, you can ignore recommendations to increase size.

Start with this query

BASH

Read-only gcloud command that lists returned Compute Engine machine type recommendations for one project and zone. It displays documented recommendation fields and does not resize VMs.

List machine type recommendations for a zone
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

  1. 01

    Pick one zone

    Choose the zone that contains the VMs you want to review. The command reads recommendations for one project and zone, so repeat it for each additional zone.

  2. 02

    Run the read-only command

    Set PROJECT_ID and ZONE, then run the command. It calls the VM instance rightsizing recommender and displays each returned recommendation's name, description, and operationGroups.

  3. 03

    Interpret the result carefully

    Use returned recommendations for workloads with weekly patterns, growth or decline over weeks, persistent underuse, or persistent throttling. Treat infrequent spikes and very brief CPU spikes cautiously. Google does not show recommendations when estimated savings are below $10 per month, so an empty result is not proof that every VM is ideally sized.

  4. 04

    Check fit before resizing

    Before making a change, confirm that the recommended machine type is available in the instance zone and satisfies the instance's attached-disk, image, and license requirements. For batch workloads where cost matters more than performance, you can ignore recommendations to increase size.

Before making changes

Assume an authenticated gcloud CLI and the recommender.computeInstanceMachineTypeRecommendations.list permission on the project. The command only lists recommendation metadata for the selected project and zone, so it is read-only and applies no resize. Recommendations use the last 8 days of CPU and memory data; CPU figures are averages over 60-second intervals, so short spikes may not be captured. Recommendations are free, but applying a resize charges for the selected machine type. Google does not show recommendations below $10 per month in estimated savings.

Ignore this check if you do not manage running Compute Engine VMs in a specific zone, or if the fleet is mostly infrequently spiky or briefly CPU-spiky. Also ignore it for configurations where recommendations are unavailable, including ephemeral disks, GPUs, TPUs, memory-optimized machine families, and the listed managed service environments.

Primary sources