Reduce overprovisioned Cloud SQL instances Stay organized with collections Save and categorize content based on your preferences.
The Cloud SQL overprovisioned instancerecommenderhelps you detect instances that are unnecessarily large for a given workload.It then provides recommendations on how to resize such instances and reducecost. This page describes how this recommender works and how to use it.
How it works
The Cloud SQL overprovisioned recommender analyzes the usage metricsof primary instances that are older than 30 days. For each instance, therecommender considers the CPU and memory utilization based on the values ofcertainmetrics within the last 30 days.The recommender does not analyze read replicas.
If the peak utilization of either or both the CPU and the memory within theobservation period is low, the instance is estimated to be overprovisioned.Recommendations are generated every 24 hours for rightsizing such instances whenthe estimated monthly cost savings are greater than or equal to $10.
The recommender uses conservative thresholds to ensure that it flags onlyinstances that are significantly overprovisioned, which is usually a goodindicator of waste. The recommender suggests a machine type that has at least8 vCPUs and 32 GB.
Warning: It's highly recommended that you evaluate the insightsand in-context charts. Consult with the appropriate team to determine whether the flagged instance is inadvertently overprovisioned and a smaller instance might meet the needs of your application.Pricing
The Cloud SQL overprovisioned instance recommender is in theStandardRecommender pricing tier.
Before you begin
Before you can view recommendations and insights, do the following:
- To get the permissions to view and work with insights and recommendations,ensure that you have the requiredroles.
For more information about roles, seeunderstanding roles andgranting IAM permissions.Tasks Roles View recommendations One of these roles: recommender.cloudsqlViewer
orcloudsql.viewer
.Apply recommendations One of these roles: recommender.cloudsqlAdmin
,cloudsql.editor
, orcloudsql.admin
. Enable the Recommender API.
List overprovisioned Cloud SQL instance recommendations
You can list overprovisioned instance recommendations byusing the Google Cloud console,gcloud
, or the Recommender API.
Console
To list recommendations about overprovisioned instances by using theGoogle Cloud console, follow these steps:
Go to theCloud SQL Instances page.
ClickView all on the overprovisioned instance recommendations banner.
Alternatively, follow these steps:
Go to theRecommendation Hub.
For more information, seeGetting started with Recommendation Hub.
In theReduce Cloud SQL instance cost card, clickView all.
Click theReduce instance tab.
gcloud
To list recommendations about overprovisioned instances by usinggcloud
, run thegcloud recommender recommendations list
command as follows:
gcloud recommender recommendations list \--project=PROJECT_ID \--location=LOCATION \--recommender=google.cloudsql.instance.RECOMMENDER
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.RECOMMENDER
: The ID of the recommender asOverprovisionedRecommender
.
API
To list recommendations about overprovisioned instances by using theRecommendations API, call therecommendations.list
method as follows:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/recommenders/google.cloudsql.instance.RECOMMENDER/recommendations
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.RECOMMENDER
: The ID of the recommender asOverprovisionedRecommender
.
If the recommender detects overprovisioned instances, it lists them in atable. Each row shows the instance name, a brief recommendation, the current machine type,the recommended machine type, the location, and the last refresh date.
View insights and detailed recommendations
You can view insights and detailed recommendations about overprovisioned instances byusing the Google Cloud console,gcloud
, or the Recommender API.
Console
To view insights and detailed recommendations about an overprovisioned instance by using theGoogle Cloud console, click the recommendation button in the list of instances.
gcloud
To view insights and detailed recommendations about overprovisioned instances by usinggcloud
, run thegcloud recommender insights list
command as follows:
gcloud recommender insights list \--project=PROJECT_ID \--location=LOCATION \--insight-type=google.cloudsql.instance.INSIGHT_TYPE
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.INSIGHT_TYPE
: The ID of the insight type asCpuUsageInsight
orMemoryUsageInsight
, which provide insightsabout CPU usage and memory, respectively.
API
To view insights and detailed recommendations about overprovisioned instances by using theRecommendations API, call theinsights.list
method as follows:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.cloudsql.instance.INSIGHT_TYPE/insights
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.INSIGHT_TYPE
: The ID of the insight type asCpuUsageInsight
.orMemoryUsageInsight
, which provide insights about CPU usage and memory,respectively.
A panel appears showing insights about the current memory and CPU utilizationof the instance. The following categories of information are providedalong with some supporting charts.
Fields | Descriptions and related metrics |
---|---|
Max CPU utilization | The maximum CPU utilization as a percentage. Pertains to database/cpu/utilization . |
Max memory utilization | The maximum memory utilization as a percentage. Pertains to database/memory/utilization . |
The following table lists the insights and recommendations that the Cloud SQLoverprovisioned instance recommender might generate to help you reduce costs.The subtypes are visible in thegcloud
and API results.
Insights | Recommendations |
---|---|
Based on the current CPU utilization trends, the instance is flagged as overprovisioned. Subtype: LOW_CPU_UTILIZATION | Reduce the number of vCPUs or switch to a machine with fewer vCPUs. Subtype: CHANGE_INSTANCE_SIZE |
Based on the current memory utilization trends, the instance is flagged as overprovisioned. Subtype: LOW_MEMORY_UTILIZATION . | Reduce the memory requirement or switch to a machine with less memory. Subtype: CHANGE_INSTANCE_SIZE |
Apply recommendations
Evaluate the recommendations carefully and do any of the following:
To examine the recommendation, clickView instance.
A banner appears at the top of the page providing a recommendation.
Edit the instance, if required, toreduce the vCPUs or memory. Alternatively, switch to a machine type with fewervCPUs and less memory.You don't need to rightsize the instance exactly as recommended. Use yourjudgement about instance size based on how you intend to provision the instance.Keep in mind that the bigger the size, the greater the operational latency.
To dismiss the recommendation so that it's de-emphasized and appears dimmed,clickDismiss.
To close the panel without applying or dismissing the recommendation, clickCancel.
You can alsoexport these recommendations to BigQueryand then examine them usingLooker Studio orLooker.
What's next
- Monitor disk availability
- Reduce idle Cloud SQL instances
- Blog: Maximize your Cloud ROI
- Blog: Do more with less
- Google Cloud recommenders
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-14 UTC.