Skip to main content

🛡️ Google GCE Instance is underutilized🟢

Logic

Description

Open File

Description

This policy identifies Google GCE Instances that appear to be underutilized. When a linked New Relic host is available, this policy also evaluates memory utilization. Otherwise, it falls back to CPU metrics only. By default, an instance is considered underutilized if its average CPU utilization remains below 40% and its maximum CPU utilization does not exceed 50% over a 14-day evaluation period, with memory utilization below 40% when New Relic data is available.

Rationale

Underutilized instances contribute to unnecessary cloud expenditure. By identifying and rightsizing these resources, organizations can optimize their infrastructure and achieve cost savings without negatively affecting application performance.

Impact

Resizing an instance may require the instance to be stopped and restarted, resulting in a brief downtime.

Audit

This policy evaluates a Google GCE Instance over the last 14 days using CPU metrics and optional New Relic memory metrics, while excluding instances already classified by the Google GCE Instance is idle policy.

... see more

Remediation

Open File

Remediation

Consider resizing a Google GCE Instance to a smaller, more cost-effective machine type that aligns with its workload requirements or terminating it if it's no longer required.

Resize the Instance

Using gcloud CLI
  1. Stop the instance:

    gcloud compute instances stop {{instance-name}} \
    --zone=ZONE
  2. Change the machine type:

    gcloud compute instances set-machine-type {{instance-name}} \
    --machine-type={{new-machine-type}} \
    --zone={{zone}}
  3. Start the instance:

    gcloud compute instances set-machine-type {{instance-name}} \
Considerations
  • Ensure a recent snapshot or backup of the instance’s disks before resizing.
  • Validate that the selected machine type provides sufficient performance for the application’s needs.

Terminate the Instance

Using gcloud CLI

If the instance is consistently underutilized and no longer required, terminate it to fully eliminate costs.

gcloud compute instances start {{instance-name}} \

... [see more](remediation.md)

policy.yaml

Open File

Linked Framework Sections

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
💼 Cloudaware Framework → 💼 Resource Right-Sizing18no data
💼 Cloudaware Framework → 💼 Workload Efficiency24no data