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 the Service Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see the launch stage descriptions.
The underprovisioned instance recommender helps 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 worksWhen 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. PricingThe underprovisioned instance recommender is in the Standard Recommender pricing tier.
Before you beginBefore you can view recommendations and insights, do the following:
recommender.cloudsqlViewer
or cloudsql.viewer
. Apply recommendations One of these roles: recommender.cloudsqlAdmin
, cloudsql.editor
, or cloudsql.admin
. For more information about roles, see understanding roles and granting IAM permissions.Enable the Recommender API.
To list recommendations about underprovisioned instances, follow these steps:
Go to the Cloud SQL Instances page.
Click View all on the resize Cloud SQL instance recommender banner.
Alternatively, follow these steps:
Go to the Recommendation Hub.
For more information, see Getting started with Recommendation Hub.
In the Resize Cloud SQL instances to improve performance card, click View all.
Click the instances with the Resize Cloud SQL instance recommendation.
To list recommendations about underprovisioned instances, run the gcloud 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 as us-central1
.To list recommendations about underprovisioned instances by using the Recommendations API, call the recommendations.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 as us-central1
.If the recommender detects underprovisioned instances, it lists them in a table. 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 ConsoleTo view insights and detailed recommendations about an underprovisioned instance by using the Google Cloud console, click the recommendation button in the list of instances.
gcloudTo view insights and detailed recommendations about underprovisioned instances by using gcloud
, run the gcloud 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 as us-central1
.INSIGHT_TYPE
: The ID of the insight type is UnderprovisionedCpuUsageInsight
, UnderprovisionedMemoryUsageInsight
, or OomProbabilityInsight
, which provide insights about CPU usage, memory, and OOM probability, respectively.To view insights and detailed recommendations about underprovisioned instances by using the Recommendations API, call the insights.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 as us-central1
.INSIGHT_TYPE
: The ID of the insight type as `UnderprovisionedCpuUsageInsight
, UnderprovisionedMemoryUsageInsight
, or OomProbabilityInsight
, which provide insights about CPU usage, memory, and OOM probability, respectively.The following table lists the insights and recommendations that the Cloud SQL underprovisioned 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 the gcloud
and API results.
HIGH_CPU_UTILIZATION
Increase CPU size or reduce CPU utilization.
CHANGE_INSTANCE_SIZE
Based on the current memory utilization trends, the instance is flagged as having high memory usage.
HIGH_MEMORY_UTILIZATION
. Increase memory size or reduce memory utilization.
CHANGE_INSTANCE_SIZE
Based on the current usage trends, the instance is flagged as being at the risk of incurring future OOM events.
HIGH_OOM_PROBABILITY
. Increase memory size or reduce memory utilization.
CHANGE_INSTANCE_SIZE
Apply recommendations
Evaluate the recommendations carefully and do any of the following:
To examine the recommendation, click View 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, click Dismiss.
To close the panel without applying or dismissing the recommendation, click Cancel.
To optimize your instance's performance, do the following:
Edit the instance, if required, to increase the vCPUs or memory. Alternatively, switch to a machine type with more vCPUs and more memory. You don't need to rightsize the instance exactly as recommended. Use your judgement 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 also export these recommendations to BigQuery and then examine them using Looker Studio or Looker.
What's nextExcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4