CostLensVM Right-sizing (GCP)

VM Right-sizing (GCP)

CostLens surfaces Compute Engine machine-type recommendations to move over-provisioned VMs to a smaller, cheaper machine type — and can apply the resize for you.

Updated August 20261 min read

CostLens surfaces machine-type recommendations from Google's Machine-Type Recommender — suggestions to move an over-provisioned VM to a smaller, cheaper machine type based on observed utilisation. Over-provisioned VMs pay for cores and memory they never use.

How it works

Recommender analyses utilisation

Google evaluates CPU and memory usage and suggests a right-sized machine type per instance.

CostLens reads them read-only

Using the recommender.viewer + Compute read scopes from GCP Accounts, CostLens ingests each recommendation and its projected saving.

Severity and savings are assigned

Savings come from the Recommender's costProjection, normalised to a 30-day month.

What to do

  1. Review the current vs recommended machine type and the projected saving.
  2. Confirm the smaller type meets your peak requirements (headroom for spikes).
  3. On Apply, choose either the CostLens-recommended machine type or a different type from the size picker — you keep full control over the final size. CostLens stops the instance, changes the machine type, and starts it again (GCP requires a stop to resize).
  4. The change is reversible within 24 hours.

Test first

If the workload also runs in a non-production project, apply the resize there first to confirm no performance regression before touching production.

Severity levels

SeverityEstimated monthly savings
critical>$500
high$100–$500
medium$20–$100
low<$20

Required permissions

  • Detect: roles/recommender.viewer + Compute read — see GCP Accounts.
  • Apply: Compute write covering compute.instances.setMachineType, compute.instances.stop, and compute.instances.start (granted by the CostLens write role when Auto-Fix / apply is enabled).

Limitations

  • Recommendations are based on Google's observation window; instances with variable or seasonal load may need judgement before resizing.
  • Right-sizing requires a stop/start, causing a brief interruption — schedule during a maintenance window.
CostLens
Previous
VM Off-Hours Schedule
CostLens
Next
MIG Autoscaling