Skip to main content

Repository → 📁 Compliance Engine → 📁 CloudAware → 📁 Google → 📁 Cloud SQL

🛡️ Google Cloud SQL Instance is underutilized🟢

Logic

Description

Open File

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

Open File

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

Open File

Linked Framework Sections

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