The Cloud SQL overprovisioned instance recommender helps you detect instances that are unnecessarily large for a given workload. It then provides recommendations on how to resize such instances and reduce cost. This page describes how this recommender works and how to use it.
How it works
The Cloud SQL overprovisioned recommender analyzes the usage metrics of primary instances that are older than 30 days. For each instance, the recommender considers the CPU and memory utilization based on the values of certain metrics within the last 30 days. The recommender does not analyze read replicas or instances configured for high availability (HA).
If the peak utilization of either or both the CPU and the memory within the observation period is low, the instance is estimated to be overprovisioned. Recommendations are generated every 24 hours for rightsizing such instances when the estimated monthly cost savings are greater than or equal to $10.
The recommender uses conservative thresholds to ensure that it flags only instances that are significantly overprovisioned, which is usually a good indicator of waste. The recommender suggests a machine type that has at least 8 vCPUs and 32 GB.
Pricing
The Cloud SQL overprovisioned instance recommender is in the Standard Recommender 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 required roles.
For more information about roles, see understanding roles and granting IAM permissions.Tasks Roles View recommendations One of these roles: recommender.cloudsqlViewerorcloudsql.viewer.Apply recommendations One of these roles: recommender.cloudsqlAdmin,cloudsql.editor, orcloudsql.admin. Enable the Recommender API.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.
List overprovisioned Cloud SQL instance recommendations
You can list overprovisioned instance recommendations by
using the Google Cloud console, gcloud, or the Recommender API.
Console
To list recommendations about overprovisioned instances by using the Google Cloud console, follow these steps:
Go to the Cloud SQL Instances page.
Click View all on the overprovisioned instance recommendations banner.
Alternatively, follow these steps:
Go to the Active Assist.
For more information, see Getting started with Recommendation Hub.
In the Reduce Cloud SQL instance cost card, click View all.
Click the Reduce instance tab.
gcloud
To list recommendations about overprovisioned instances by using gcloud, run the
gcloud 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.