⭐ Repository → 📁 Compliance Engine → 📁 CloudAware → 📁 Google → 📁 Cloud SQL
🛡️ Google Cloud SQL Instance is underutilized🟢
- Contextual name: 🛡️ Instance is underutilized🟢
- ID:
/ce/ca/google/sql/instance-underutilized
- Tags:
- Policy Type:
COMPLIANCE_POLICY
- Policy Categories:
COST
,PERFORMANCE
Logic
Description
Description
This policy identifies Google Cloud SQL Instances that are underutilized. An instance is considered underutilized if, over the last 30 days, its average CPU utilization is below 20%, average memory utilization is below 40%, and average disk I/O operations are below 50 IOPS.
Rationale
Overprovisioning database resources leads to unnecessary cloud costs and inefficient utilization of infrastructure. By detecting underutilized SQL instances, you can make informed rightsizing decisions, ensuring workloads are adequately supported while avoiding overspending on unused capacity.
Impact
Performance data should be reviewed carefully before resizing to ensure changes do not negatively affect application availability, stability, or responsiveness.
Audit
This policy evaluates an Google Cloud SQL Instance based on its 30-day performance metrics.
The Instance is marked as
INCOMPLIANT
if all the following criteria are met:
Metrics: CPU Utilization, 30-Day
< 20%.Metrics: Memory Utilization, 30-Day
< 40%.... see more
Remediation
Remediation
Before taking any action, review the instance's usage patterns in to confirm that underutilization is consistent and does not spike temporarily.
Downsize (Resize) the Instance
From gcloud CLI
If the instance is required but over-provisioned, you can resize it to a smaller, more cost-effective machine type:
gcloud sql instances patch {{instance-name}} \
--cpu={{new-cpu}}
--memory={{new-memory}}
[--tier={{new-machine-type}}] \
--region={{region}}Considerations
- Resizing may trigger a restart. Schedule changes during a maintenance window to minimize impact on availability.
- The
--cpu
and--memory
flags are not compatible with the Enterprise Plus edition. For Enterprise Plus instances, the machine configuration is determined solely by the--tier
flag and these flags should not be used.
policy.yaml
Linked Framework Sections
Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
---|---|---|---|---|---|
💼 Cloudaware Framework → 💼 Resource Right-Sizing | 15 | no data | |||
💼 Cloudaware Framework → 💼 Workload Efficiency | 24 | no data |