Explanation
Why the waste happens and who it affects.
Cloud SQL has its own spend-based committed use discounts, separate from Compute Engine commitments: a 1-year commitment gives 25% off and a 3-year commitment 52% off eligible vCPU and memory usage. Compute flexible CUDs apply to Compute Engine, GKE and Cloud Run, not to Cloud SQL, so a company can be well covered on compute and still pay list price for its databases.
The commitment is flexible within a region: it applies automatically to the aggregate vCPU and memory usage of all Cloud SQL instances in that region, across MySQL, PostgreSQL and SQL Server and across the Enterprise and Enterprise Plus editions, in any project paid by the billing account. That makes a commitment sized to the stable regional baseline low risk even when individual instances are resized, replaced or change engine.
Billing model
The pricing dimensions that drive this cost.
- On-demand vCPU and memory
- Billed per vCPU-hour and GiB-hour for every second the instance runs, at rates set by region and edition
- Cloud SQL CUD
- A 1-year or 3-year commitment to a minimum hourly spend in a region, discounting eligible vCPU and memory by 25% or 52%
- Overage
- Usage above the commitment is charged at on-demand rates, and a commitment cannot be cancelled after purchase
- Excluded charges
- CUDs do not apply to storage, backups, IP addresses, outbound data transfer, licensing, shared-core machine types or extended support
How to detect
4 checks to find it in your estate.
- Open Billing, Committed use discounts, Recommendations to see spend-based CUD recommendations for Cloud SQL (recommender google.cloudbilling.commitment.SpendBasedCommitmentRecommender), based on the last 30 days by default with a configurable lookback
- Use the CUD analysis report's Coverage tab to see Cloud SQL cost paid at on-demand rates versus cost covered by commitments
- From the Cloud Billing export, compute the minimum hourly Cloud SQL vCPU and memory spend per region over several months; that floor is the safe commitment size
- Exclude instances that are about to be deleted, downsized or migrated so the baseline reflects future usage
How to fix
4 ways to remove the waste.
- Clean up idle instances, rightsize overprovisioned ones and turn off unneeded HA first, so the commitment is not sized to waste
- Purchase a Cloud SQL commitment per region sized to the stable baseline, choosing 1 year (25%) when the fleet may shrink or move and 3 years (52%) for long-lived databases
- Buy in layers over time rather than one large commitment, since unused commitment is still billed and cannot be cancelled
- Review coverage and utilization quarterly and add commitments as the baseline grows
Documentation
Vendor references for pricing and configuration.