GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/recommenders/google.cloudsql.instance.RECOMMENDER/recommendations
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[],[],null,["# Reduce overprovisioned Cloud SQL instances\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/sql/docs/postgres/recommender-sql-overprovisioned \"View this page for the PostgreSQL database engine\") \\| [SQL Server](/sql/docs/sqlserver/recommender-sql-overprovisioned \"View this page for the SQL Server database engine\")\n\n\u003cbr /\u003e\n\nThe Cloud SQL overprovisioned instance [recommender](/recommender/docs/overview)\nhelps you detect instances that are unnecessarily large for a given workload.\nIt then provides recommendations on how to resize such instances and reduce\ncost. This page describes how this recommender works and how to use it.\n\nHow it works\n------------\n\nThe Cloud SQL overprovisioned recommender analyzes the usage metrics\nof primary instances that are older than 30 days. For each instance, the\nrecommender considers the CPU and memory utilization based on the values of\ncertain [metrics](/monitoring/api/metrics_gcp_c#gcp-cloudsql) within the last 30 days.\nThe recommender does not analyze read replicas.\n\nIf the peak utilization of either or both the CPU and the memory within the\nobservation period is low, the instance is estimated to be overprovisioned.\nRecommendations are generated every 24 hours for rightsizing such instances when\nthe estimated monthly cost savings are greater than or equal to $10.\n\nThe recommender uses conservative thresholds to ensure that it flags only\ninstances that are significantly overprovisioned, which is usually a good\nindicator of waste. The recommender suggests a machine type that has at least\n8 vCPUs and 32 GB.\n| **Warning:** It's highly recommended that you evaluate the insights and 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.\n\nPricing\n-------\n\nThe Cloud SQL overprovisioned instance recommender is in the *Standard*\n[Recommender pricing tier](/recommender/pricing).\n\nBefore you begin\n----------------\n\nBefore you can view recommendations and insights, do the following:\n\n- To get the permissions to view and work with insights and recommendations, ensure that you have the required [roles](/sql/docs/mysql/project-access-control#roles).\n\n For more information about roles, see [understanding roles](/iam/docs/understanding-roles) and [granting IAM permissions](/iam/docs/granting-changing-revoking-access).\n-\n\n\n Enable the Recommender API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=recommender.googleapis.com)\n\nList overprovisioned Cloud SQL instance recommendations\n-------------------------------------------------------\n\nYou can list overprovisioned instance recommendations by\nusing the Google Cloud console, `gcloud`, or the Recommender API. \n\n### Console\n\nTo list recommendations about overprovisioned instances by using the\nGoogle Cloud console, follow these steps:\n\n1. Go to the **Cloud SQL Instances** page.\n\n [Go to Cloud SQL Instances](https://console.cloud.google.com/sql/instances)\n2. Click **View all** on the overprovisioned instance recommendations banner.\n\nAlternatively, follow these steps:\n\n1. Go to the **Recommendation Hub**.\n\n [Go to the Recommendation Hub](https://console.cloud.google.com/home/recommendations/)\n\n For more information, see\n [Getting started with Recommendation Hub](/recommender/docs/recommendation-hub/identify-configuration-problems).\n2. In the **Reduce Cloud SQL instance cost** card, click **View all**.\n\n3. Click the **Reduce instance** tab.\n\n### gcloud\n\nTo list recommendations about overprovisioned instances by using `gcloud`, run the\n[`gcloud recommender recommendations list`](/sdk/gcloud/reference/recommender/recommendations/list)\ncommand as follows: \n\n```\ngcloud recommender recommendations list \\\n--project=PROJECT_ID \\\n--location=LOCATION \\\n--recommender=google.cloudsql.instance.RECOMMENDER\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003eRECOMMENDER\u003c/var\u003e: The ID of the recommender as `OverprovisionedRecommender`.\n\n### API\n\nTo list recommendations about overprovisioned instances by using the\n[Recommendations API](/recommender/docs/using-api), call the\n[`recommendations.list`](/recommender/docs/reference/rest/v1beta1/projects.locations.recommenders.recommendations/list)\nmethod as follows: \n\n```\nGET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/recommenders/google.cloudsql.instance.RECOMMENDER/recommendations\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003eRECOMMENDER\u003c/var\u003e: The ID of the recommender as `OverprovisionedRecommender`.\n\nIf the recommender detects overprovisioned instances, it lists them in a\ntable. Each row shows the instance name, a brief recommendation, the current machine type,\nthe recommended machine type, the location, and the last refresh date.\n\nView insights and detailed recommendations\n------------------------------------------\n\nYou can view insights and detailed recommendations about overprovisioned instances by\nusing the Google Cloud console, `gcloud`, or the Recommender API. \n\n### Console\n\nTo view insights and detailed recommendations about an overprovisioned instance by using the\nGoogle Cloud console, click the recommendation button in the list of instances.\n\n### gcloud\n\nTo view insights and detailed recommendations about overprovisioned instances by using `gcloud`, run the\n[`gcloud recommender insights list`](/sdk/gcloud/reference/recommender/insights/list)\ncommand as follows: \n\n```\ngcloud recommender insights list \\\n--project=PROJECT_ID \\\n--location=LOCATION \\\n--insight-type=google.cloudsql.instance.INSIGHT_TYPE\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003eINSIGHT_TYPE\u003c/var\u003e: The ID of the insight type as `CpuUsageInsight` or `MemoryUsageInsight`, which provide insights about CPU usage and memory, respectively.\n\n### API\n\nTo view insights and detailed recommendations about overprovisioned instances by using the\n[Recommendations API](/recommender/docs/using-api), call the\n[`insights.list`](/recommender/docs/reference/rest/v1beta1/projects.locations.insightTypes.insights/list)\nmethod as follows: \n\n```\nGET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.cloudsql.instance.INSIGHT_TYPE/insights\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003eINSIGHT_TYPE\u003c/var\u003e: The ID of the insight type as `CpuUsageInsight`. or `MemoryUsageInsight`, which provide insights about CPU usage and memory, respectively.\n\nA panel appears showing insights about the current memory and CPU utilization\nof the instance. The following categories of information are provided\nalong with some supporting charts.\n\nThe following table lists the insights and recommendations that the Cloud SQL\noverprovisioned instance recommender might generate to help you reduce costs.\nThe subtypes are visible in the `gcloud` and API results.\n\nApply recommendations\n---------------------\n\nEvaluate the recommendations carefully and do any of the following:\n\n- To examine the recommendation, click **View instance**.\n\n A banner appears at the top of the page providing a recommendation.\n\n [Edit](/sql/docs/mysql/edit-instance) the instance, if required, to\n reduce the vCPUs or memory. Alternatively, switch to a machine type with fewer\n vCPUs and less memory.\n You don't need to rightsize the instance exactly as recommended. Use your\n judgement about instance size based on how you intend to provision the instance.\n Keep in mind that the bigger the size, the greater the operational latency.\n- To dismiss the recommendation so that it's de-emphasized and appears dimmed,\n click **Dismiss**.\n\n- To close the panel without applying or dismissing the recommendation, click\n **Cancel**.\n\nYou can also [export these recommendations to BigQuery](/recommender/docs/bq-export/export-recommendations-to-bq)\nand then examine them using [Looker Studio](/bigquery/docs/visualize-looker-studio) or [Looker](/bigquery/docs/looker).\n\nWhat's next\n-----------\n\n- [Monitor disk availability](/sql/docs/mysql/using-ood-recommender)\n- [Reduce idle Cloud SQL instances](/sql/docs/mysql/recommender-sql-idle)\n- [Blog: Maximize your Cloud ROI](https://cloud.google.com/blog/products/management-tools/active-assist-comes-to-google-cloud)\n- [Blog: Do more with less](https://cloud.google.com/blog/products/databases/reduce-cloud-sql-costs-with-optimizations-by-active-assist)\n- [Google Cloud recommenders](/recommender/docs/recommenders)"]]