Reduce underprovisioned Cloud SQL instances Stay organized with collections Save and categorize content based on your preferences.
Preview
This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.
The underprovisioned instancerecommenderhelps you detect instances that have high CPU and/or memory utilization.It then provides recommendations for how to optimize the instance.This page describes how this recommender works and how to use it.
How it works
When there is high CPU and/or memory utilization detected, you see a recommendation to increase the size of your instance to reduce CPU and/or memory utilization at peak.
Note: Recommendations are generated daily.Pricing
The underprovisioned instance recommender is in the StandardRecommender pricing tier.
Before you begin
Before you can view recommendations and insights, do the following:
- Ensure that you have the requiredrolesso that you have permission to view and work with insights and recommendations.
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 underprovisioned instance recommendations
Console
To list recommendations about underprovisioned instances, follow these steps:
Go to theCloud SQL Instances page.
ClickView all on the resize Cloud SQL instance recommender banner.
Alternatively, follow these steps:
Go to theRecommendation Hub.
For more information, seeGetting started with Recommendation Hub.
In theResize Cloud SQL instances to improve performance card, clickView all.
Click the instances with theResize Cloud SQL instance recommendation.
gcloud
To list recommendations about underprovisioned instances, run thegcloud recommender recommendations list
command as follows:
gcloud recommender recommendations list \--project=PROJECT_ID \--location=LOCATION \--recommender=google.cloudsql.instance.UnderprovisionedRecommender
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.
API
To list recommendations about underprovisioned 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.UnderprovisionedRecommender/recommendations
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.
If the recommender detects underprovisioned 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
Console
To view insights and detailed recommendations about an underprovisioned instance by using theGoogle Cloud console, click the recommendation button in the list of instances.
gcloud
To view insights and detailed recommendations about underprovisioned 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 isUnderprovisionedCpuUsageInsight
,UnderprovisionedMemoryUsageInsight
, orOomProbabilityInsight
,which provide insights about CPU usage, memory, and OOM probability, respectively.
API
To view insights and detailed recommendations about underprovisioned 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 as `UnderprovisionedCpuUsageInsight
,UnderprovisionedMemoryUsageInsight
, orOomProbabilityInsight
,which provide insights about CPU usage, memory, and OOM probability, respectively.
The following table lists the insights and recommendations that the Cloud SQLunderprovisioned instance recommender might generate to help you avoid bottlenecks from high CPU and memory usage and minimize the likelihood of out-of-memory events.The subtypes are visible in thegcloud
and API results.
Insights | Recommendations |
---|---|
Based on the current CPU utilization trends, the instance is flagged as having high CPU usage. Subtype: HIGH_CPU_UTILIZATION | Increase CPU size or reduce CPU utilization. Subtype: CHANGE_INSTANCE_SIZE |
Based on the current memory utilization trends, the instance is flagged as having high memory usage. Subtype: HIGH_MEMORY_UTILIZATION . | Increase memory size or reduce memory utilization. Subtype: CHANGE_INSTANCE_SIZE |
Based on the current usage trends, the instance is flagged as being at the risk of incurring future OOM events. Subtype: HIGH_OOM_PROBABILITY . | Increase memory size or reduce memory utilization. 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.
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.
Optimize the performance of your instance
To optimize your instance's performance, do the following:
Edit the instance, if required, toincrease the vCPUs or memory. Alternatively, switch to a machine type with morevCPUs and more memory. You don't need to rightsize the instance exactly as recommended. Use yourjudgement and resize based on how you intend to provision the instance.Keep in mind that the bigger the size, the greater the operational latency.
Caution: This operation can lead to an increase in cost. Additionally, it triggers a restart, which brings downtime to the instance.
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.