🛡️ Google GCE Instance is overutilized🟢
- Contextual name: 🛡️ Instance is overutilized🟢
- ID:
/ce/ca/google/compute-engine/instance-overutilized - Tags:
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
COST,PERFORMANCE
Logic
Description
Description
Identify Google GCE Instances operating at high utilization levels that may require scaling or resizing to maintain stable application performance. An instance is considered overutilized if, over a 14-day period, its average CPU utilization exceeds 80% and its maximum CPU utilization exceeds 95%.
Rationale
Overutilized instances can cause degraded response times, increased latency, and reduced workload stability. Identifying these instances helps ensure that compute capacity remains aligned with workload demand and supports timely scaling decisions.
Impact
Resizing or scaling an instance can increase infrastructure cost and may require a brief service interruption, depending on the workload and deployment model.
Audit
This policy evaluates a Google GCE Instance based on its 14-day CPU performance metrics.
The Instance is marked as
INCOMPLIANTif all the following criteria are met:
CPU Utilization, Average, %field is greater than 80%.CPU Utilization, Max, %field is greater than 95%.... see more
Remediation
Remediation
Right-Size Overutilized Instances
Resize the instance to a larger machine type if the workload consistently exceeds the current capacity.
Using gcloud CLI
Stop the instance:
gcloud compute instances stop {{instance-name}} \
--zone={{zone}}Change the machine type:
gcloud compute instances set-machine-type {{instance-name}} \
--machine-type={{new-machine-type}} \
--zone={{zone}}Start the instance:
gcloud compute instances start {{instance-name}} \
--zone={{zone}}Implement Autoscaling
For workloads with variable demand, consider moving the application to a managed instance group and configuring autoscaling policies based on CPU utilization.
Considerations
- Verify that the selected machine type is available in the instance zone.
- Confirm that the workload and attached resources are compatible with the new machine type.
- Schedule resizing during a maintenance window if the instance serves production traffic.
policy.yaml
Linked Framework Sections
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| 💼 Cloudaware Framework → 💼 Resource Right-Sizing | 18 | no data | |||
| 💼 Cloudaware Framework → 💼 Workload Efficiency | 24 | no data |