Stay organized with collections Save and categorize content based on your preferences.
MySQL | PostgreSQL | SQL ServerDatabase instances running with an allocation of memory that's either too low or too high might experience performance issues. Instances can sometimes run into out-of-memory (OOM) issues.
The max server memory (mb)
flag limits the amount of memory that Cloud SQL can allocate for its internal pools. You can manually set a value for this flag, or omit the flag and let Cloud SQL manage memory limits for you automatically.
If you don't enable the flag, then Cloud SQL manages the instance's memory limits for you automatically, based on the size of the RAM for your instance.
If you enable the flag and manually set a value for it, and later resize the instance, then Cloud SQL disables the flag, overrides the value previously given, and automatically manages the memory limits of the instance for you until a new max server memory (mb)
value is provided.
Insufficient values for the flag can cause performance issues, while over-allocation can lead to instability, performance degradation, and database crashes.
Users are strongly encouraged to let Cloud SQL manage the instance's memory limits.
For more information, see SQL Server settings.
PricingThe Maximum server memory recommender is in the Standard Recommender pricing tier.
Before you begin Required roles and permissionsTo get the permissions to view and work with insights and recommendations, ensure that you have the required Identity and Access Management (IAM) roles.
Task Role View recommendationsrecommender.cloudsqlViewer
or cloudsql.admin
Apply recommendations cloudsql.editor
or cloudsql.admin
For more information about IAM roles, see
IAM basic and predefined roles referenceand
Manage access to projects, folders, and organizations.
List the recommendationsTo list the recommendations, follow these steps:
ConsoleTo list recommendations about instance performance, follow these steps:
Alternatively, follow these steps:
Go to the Recommendation Hub. See also Find and applyrecommendations with the Recommendations.
In the All recommendations card, click Performance .
Run the gcloud recommender recommendations list
command as follows:
gcloud recommender recommendations list \ --project=PROJECT_ID \ --location=LOCATION \ --recommender=google.cloudsql.instance.PerformanceRecommender \ --filter=RECOMMENDER_SUBTYPE=SQLSERVER_USE_AUTOMATIC_MAX_SERVER_MEMORY_MANAGEMENT
Replace the following:
us-central1
Call the recommendations.list
method as follows:
GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations
Replace the following:
us-central1
To view insights and detailed recommendations, follow these steps:
ConsoleDo one of the following:
On the Performance Recommendations page, click the Performance recommendations card and then click Create indexes or reconfigure join settings. The recommendation panel appears, which contains insights and detailed recommendations for the instance.
On the Instances page, click Create indexes or reconfigure join settings. The list of instances displays only those instances for which the recommendation applies.
Run the gcloud recommender insights list
command as follows:
gcloud recommender insights list \ --project=PROJECT_ID \ --location=LOCATION \ --insight-type=google.cloudsql.instance.PerformanceInsight \ --filter=INSIGHT_SUBTYPE=INSIGHT_SUBTYPE
Replace the following:
us-central1
SQLSERVER_MAX_SERVER_MEMORY_TOO_LOW
and SQLSERVER_MAX_SERVER_MEMORY_TOO_HIGH
.Call the insights.list
method as follows:
GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/google.cloudsql.instance.PerformanceInsight/insights
Replace the following:
us-central1
To implement this recommendation, do the following:
Locate the instance with the recommendation Server memory misconfigured. Click the recommendation to open it.
In the recommendation window, click Edit instance.
In the Flags and parameters section, locate and delete the Max server memory (mb) flag. Removing the flag lets Cloud SQL manage instance memory limits for you.
Except 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-08-14 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-08-14 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