Optimiza los clústeres con aprovisionamiento insuficiente
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En esta página, se describe cómo optimizar el rendimiento de tus clústeres de AlloyDB para PostgreSQL con el recomendador de clústeres con capacidad insuficiente.
El recomendador te ayuda a detectar clústeres que tienen un uso alto de CPU y memoria, y proporciona recomendaciones para mejorar la configuración del clúster.
Cómo funciona el recomendador de clústeres con capacidad insuficiente
Cuando se detecta un uso alto de CPU o memoria, verás una recomendación para aumentar el tamaño de la instancia afectada en el clúster y reducir el uso de CPU o memoria al máximo. Las recomendaciones se generan a diario.
Antes de comenzar
Antes de ver las recomendaciones y estadísticas, haz lo siguiente:
Enumera las recomendaciones de clústeres con aprovisionamiento insuficiente
Puedes enumerar las recomendaciones para los clústeres con aprovisionamiento insuficiente con la Google Cloud consola, gcloud CLI o la API de Recommender.
Console
Para mostrar recomendaciones sobre clústeres con aprovisionamiento insuficiente, completa los siguientes pasos:
En la consola de Google Cloud , ve a la página Clústeres.
En la tarjeta Rendimiento, haz clic en Instancia principal con capacidad insuficiente.
Se muestra una lista de los clústeres a los que se aplica la recomendación Instancia principal con aprovisionamiento insuficiente.
gcloud CLI
Para mostrar una lista de recomendaciones sobre clústeres con aprovisionamiento insuficiente con gcloud CLI, ejecuta el comando gcloud recommender recommendations list de la siguiente manera:
LOCATION: Es una región en la que se encuentran los clústeres, como us-central1.
API
Para mostrar una lista de recomendaciones para clústeres con aprovisionamiento insuficiente con la API de Recommendations, llama al método recommendations.list de la siguiente manera:
GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.alloydb.cluster.PerformanceRecommender/recommendations?filter=recommenderSubtype=INCREASE_PRIMARY_INSTANCE_SIZE
Reemplaza lo siguiente:
PROJECT_ID: ID del proyecto
LOCATION: Es una región en la que se encuentran los clústeres, como us-central1.
Visualiza las estadísticas y las recomendaciones detalladas
Puedes ver estadísticas y recomendaciones detalladas sobre los clústeres con aprovisionamiento insuficiente que requieren optimización con la Google Cloud consola,
gcloud CLI o la API de Recommender.
Console
En la consola de Google Cloud , ve a la página Clústeres.
LOCATION : Es una región en la que se encuentran los clústeres, como us-central1.
INSIGHT_SUBTYPE: establece este parámetro en una de las siguientes opciones:
HIGH_INSTANCE_CPU_UTILIZATION: mostrar
estadísticas sobre el uso de CPU
HIGH_INSTANCE_MEMORY_UTILIZATION: mostrar
estadísticas sobre la memoria
API
Llama al método insights.list de la siguiente manera:
GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/google.alloydb.cluster.PerformanceInsight/insights?filter=insightSubtype=INSIGHT_SUBTYPE
Reemplaza lo siguiente:
PROJECT_ID: ID del proyecto
LOCATION: Es una región en la que se encuentran tus clústeres, por ejemplo, us-central1.
INSIGHT_SUBTYPE: establece este parámetro en una de las siguientes opciones:
HIGH_INSTANCE_CPU_UTILIZATION: mostrar
estadísticas sobre el uso de CPU
HIGH_INSTANCE_MEMORY_UTILIZATION: mostrar
estadísticas sobre la memoria
En la siguiente tabla, se enumeran las estadísticas y recomendaciones que el recomendador de clústeres con aprovisionamiento insuficiente de AlloyDB para PostgreSQL podría generar para ayudarte a evitar cuellos de botella por el uso elevado de memoria y CPU y a minimizar la probabilidad de eventos de memoria insuficiente.
Los subtipos se pueden ver en los resultados de gcloud y la API.
Estadísticas
Recomendaciones
Según las tendencias de uso de CPU actuales, el clúster se marca como con alto uso de CPU.
Subtipo: HIGH_INSTANCE_CPU_UTILIZATION
Aumenta el tamaño de la CPU o reduce el uso de CPU.
Subtipo: INCREASE_PRIMARY_INSTANCE_SIZE
Según las tendencias de uso de memoria actuales, el clúster se marca como que tiene uso de memoria alto.
Subtipo: HIGH_INSTANCE_MEMORY_UTILIZATION
Aumenta el tamaño de la memoria o reduce el uso de memoria.
Subtipo: INCREASE_PRIMARY_INSTANCE_SIZE
Aplica recomendaciones con la consola de Google Cloud
Evalúa las recomendaciones con cuidado y realiza las siguientes acciones en la consola deGoogle Cloud para implementar la recomendación:
Haz clic en Editar en tu clúster.
En la ventana Editar instancia principal, cambia a un tipo de máquina con más CPU virtuales y más memoria.
No es necesario que redimensiones el clúster de la manera exacta en que se recomienda. Usa tu criterio y cambia el tamaño según la forma en la que deseas aprovisionar el clúster.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eThe underprovisioned cluster recommender identifies clusters with high CPU and/or memory utilization and suggests optimizations to enhance performance.\u003c/p\u003e\n"],["\u003cp\u003eRecommendations to increase the instance size of underprovisioned clusters are generated daily and can be viewed after enabling the Recommender API and having the correct IAM roles.\u003c/p\u003e\n"],["\u003cp\u003eYou can list and apply underprovisioned cluster recommendations using the Google Cloud console, gcloud CLI, or the Recommender API.\u003c/p\u003e\n"],["\u003cp\u003eInsights on high CPU and memory utilization can be viewed via the console, CLI, or API, detailing the type of usage issue, such as \u003ccode\u003eHIGH_INSTANCE_CPU_UTILIZATION\u003c/code\u003e or \u003ccode\u003eHIGH_INSTANCE_MEMORY_UTILIZATION\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eImplementing the recommended instance size increase involves editing the cluster settings in the console, updating the primary instance to a machine type with more vCPUs and memory.\u003c/p\u003e\n"]]],[],null,["# Optimize underprovisioned clusters\n\nThis page describes how to optimize the performance of your AlloyDB for PostgreSQL clusters by using the\nunderprovisioned cluster [recommender](/recommender/docs/overview).\nThe recommender helps you detect clusters that have high CPU and memory\nutilization and provides recommendations for improving your cluster configuration.\n\nHow the underprovisioned cluster recommender works\n--------------------------------------------------\n\nWhen there is high CPU and or memory utilization detected, you see a\nrecommendation to increase the size of the affected instance in the cluster\nto reduce CPU or memory utilization at peak. Recommendations are generated daily.\n\nBefore you begin\n----------------\n\nBefore you can view recommendations and insights, do the following:\n\n- Ensure that you [enable the Recommender API](/recommender/docs/enabling).\n\n- To get the permissions to view and work with insights and recommendations,\n ensure that you have the required [Identity and Access Management (IAM) roles](/iam/docs/understanding-roles#cloud-alloydb-roles).\n\n \u003cbr /\u003e\n\n See [Grant access to other users](/alloydb/docs/user-grant-access) for more information.\n\nList underprovisioned cluster recommendations\n---------------------------------------------\n\nYou can list recommendations for underprovisioned clusters\nusing the Google Cloud console, `gcloud CLI`, or the Recommender API. \n\n### Console\n\nTo list recommendations about underprovisioned clusters, complete the following steps:\n\n1. In the Google Cloud console, go to the **Clusters** page.\n\n [Go to Clusters](https://console.cloud.google.com/alloydb/clusters)\n\n For more information, see\n [Find recommendations with Recommendation Hub](/recommender/docs/recommendation-hub/identify-configuration-problems).\n2. In the **Performance** card, click **Underprovisioned primary instance**.\n\n A list of clusters to which the **Underprovisioned primary instance** recommendation applies is displayed.\n\n### gcloud CLI\n\nTo list recommendations about underprovisioned clusters using gcloud CLI, run the [`gcloud recommender recommendations list`](/sdk/gcloud/reference/recommender/recommendations/list) command as follows: \n\n```\ngcloud recommender recommendations list \\\n--project=PROJECT_ID \\\n--location=LOCATION \\\n--recommender=google.alloydb.cluster.PerformanceRecommender \\\n--filter=recommenderSubtype=INCREASE_PRIMARY_INSTANCE_SIZE\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 where your clusters are located, such as `us-central1`.\n\n### API\n\nTo list recommendations for underprovisioned clusters using the [Recommendations API](/recommender/docs/using-api), call the\n[`recommendations.list`](/recommender/docs/reference/rest/v1/projects.locations.recommenders.recommendations/list)\nmethod as follows: \n\n```\nGET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.alloydb.cluster.PerformanceRecommender/recommendations?filter=recommenderSubtype=INCREASE_PRIMARY_INSTANCE_SIZE\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 where your clusters are located, such as `us-central1`.\n\nView insights and detailed recommendations\n------------------------------------------\n\nYou can view insights and detailed recommendations about underprovisioned clusters\nthat require optimization using the Google Cloud console,\n`gcloud CLI`, or the Recommender API. \n\n### Console\n\n1. In the Google Cloud console, go to the **Clusters** page.\n\n [Go to Clusters](https://console.cloud.google.com/alloydb/clusters)\n2. Click the recommendation button for a cluster in the **Issues** column.\n\n The recommendation panel appears, which contains insights and detailed recommendations about an underprovisioned cluster.\n\n### gcloud CLI\n\nRun the [`gcloud recommender insights list`](/sdk/gcloud/reference/recommender/insights/list) command as follows: \n\n```\ngcloud recommender insights list \\\n--project=PROJECT_ID \\\n--location=LOCATION \\\n--insight-type=google.alloydb.cluster.PerformanceInsight\n--filter=insightSubtype=INSIGHT_SUBTYPE\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 where your clusters are located, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003eINSIGHT_SUBTYPE\u003c/var\u003e: set this parameter to one of the following:\n - `HIGH_INSTANCE_CPU_UTILIZATION`: display insights about CPU usage\n - `HIGH_INSTANCE_MEMORY_UTILIZATION`: display insights about memory\n\n### API\n\nCall the [`insights.list`](/recommender/docs/reference/rest/v1/projects.locations.insightTypes.insights/list) method as follows: \n\n```\nGET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/google.alloydb.cluster.PerformanceInsight/insights?filter=insightSubtype=INSIGHT_SUBTYPE\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 where your clusters are located, for example, `us-central1`.\n- \u003cvar translate=\"no\"\u003eINSIGHT_SUBTYPE\u003c/var\u003e: set this parameter to one of the following:\n - `HIGH_INSTANCE_CPU_UTILIZATION`: display insights about CPU usage\n - `HIGH_INSTANCE_MEMORY_UTILIZATION`: display insights about memory\n\nThe following table lists the insights and recommendations that the AlloyDB for PostgreSQL\nunderprovisioned cluster recommender might generate to help you avoid bottlenecks from high CPU and memory\nusage and minimize the likelihood of out-of-memory events.\nThe subtypes are visible in the `gcloud` and API results.\n\nApply recommendations using the Google Cloud console\n----------------------------------------------------\n\nEvaluate the recommendations carefully and do the following in the\nGoogle Cloud console to implement the recommendation:\n\n1. Click **Edit** on your cluster.\n2. In the **Edit primary instance** window, switch to a machine type with more vCPUs and more memory.\n You don't need to rightsize the cluster exactly as recommended. Use your\n judgement and resize based on how you intend to provision the cluster.\n\n3. Click **Update instance**.\n\n | **Note:** You must carefully evaluate before you update the cluster. Applying recommendations might impact your pricing.\n\nWhat's next\n-----------\n\n- [Google Cloud recommenders](/recommender/docs/recommenders)"]]