Google CloudCompute5 min read

Right-size Compute Engine with workload context

Sources checked September 7, 2026Varies by scope
On this page

This check is due for a source refresh. Confirm the current documentation before you rely on provider-specific details.

THE SHORT ANSWER

Use the recommendation as an input to a resize review when the previous 8 days represent the workload. Confirm memory telemetry separately with the Ops Agent where memory is important, because it enables memory metrics for review and can improve recommendation accuracy.

Why this is worth a look

Compute Engine machine-type recommendations are generated from Cloud Monitoring system metrics collected over the previous 8 days. CPU utilization is averaged over 60-second intervals, so very brief spikes and infrequent peaks, such as monthly activity, may not be represented. The Ops Agent enables memory and process metrics in the VM observability view, and agent CPU and memory metrics are automatically used for recommendations when the agent is installed and running. Listing recommendations is a read-only review step scoped to a project, location, and recommender ID. The provider warns that impacts should be evaluated before applying a recommendation.

Start with this query

BASH

Run this read-only Bash command locally with the Google Cloud CLI. Replace PROJECT_ID and ZONE. It lists the VM machine-type recommender output for one project and zone as JSON. The command reads recommendations only, uses no query columns or units, and covers the provider's recommendation window of the previous 8 days.

List Compute Engine machine-type recommendations
set -euo pipefail

PROJECT_ID="PROJECT_ID"
ZONE="ZONE"

# Read-only: lists recommendations for one project and zone.
gcloud recommender recommendations list \
  --project="${PROJECT_ID}" \
  --location="${ZONE}" \
  --recommender="google.compute.instance.MachineTypeRecommender" \
  --format="json"

How to confirm it

  1. 01

    Verify memory telemetry

    In Google Cloud Monitoring, open the VM instances dashboard and check the Agent column. In the VM observability view, CPU and network metrics are available by default, while memory and process utilization metrics require the Ops Agent. If memory matters to the decision, use the agent metrics for an independent review.

  2. 02

    Review the lookback window

    Check whether the previous 8 days represent the VM's normal workload. Pay particular attention to peaks or cycles that are not represented in those 8 days, including infrequent activity such as monthly peaks. Also account for very brief CPU spikes that 60-second averaging may smooth out.

  3. 03

    List recommendations

    Run the command locally with an authenticated Google Cloud CLI, replacing PROJECT_ID with the target project and ZONE with its zone. The list operation returns recommendations for the specified project, location, and machine-type recommender without changing the VM.

  4. 04

    Evaluate before resizing

    Compare the recommendation with the CPU and memory evidence, workload timing, and operational requirements. Do not apply a resize until a reviewer in your organization has evaluated its impact.

Before making changes

Assumptions: you are reviewing the project and zone supplied in the command, the Google Cloud CLI is installed and authenticated, and your identity has recommender.computeInstanceMachineTypeRecommendations.list on the target project. The command is read-only and returns JSON recommendations for the specified project, zone, and recommender ID. The recommendation window is 8 days, CPU uses 60-second averages, and memory and process metrics in the VM observability view require the Ops Agent. Longer or unrepresented peaks need separate review.

Ignore this check when the previous 8 days do not represent the workload well enough for a machine-type review, or when you cannot verify the relevant memory telemetry and workload peaks.

Primary sources