Reconfigure log settings 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 theService Specific Terms. You can process personal data for this feature as outlined in theCloud Data Processing Addendum, subject to the obligations and restrictions described in the agreement under which you access Google Cloud. Pre-GA features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.
This page describes how to manage temporary binary log files and InnoDB redo logfiles. Thisrecommender is calledReconfigure log settings.
Every day, this recommender analyzes the following:
Disk usage in the binary log and binary log statement caches. If more than10% of your transactions and non-transactional statements write to temporaryfiles on disk, thenReconfigure log settings recommends that you shouldincrease the value of
binlog_cache_sizeorbinlog_stmt_cache_sizetoimprove performance.For more information on increasing the value of
binlog_cache_size, seeCache memory consumption. For more information onincreasing the value ofbinlog_stmt_cache_size, seebinlog_stmt_cache_size.The ratio of wait time versus write time for the InnoDB redo logs. Thisrecommender advises increasing the value of
innodb_log_buffer_sizeiftransactions are waiting for the log buffer to flush.For more information on increasing the value of
innodb_log_buffer_size, see[Buffer memory consumption](/sql/docs/mysql/
Pricing
TheReconfigure log settings recommender is in theStandardRecommender pricing tier.
Before you begin
Required roles and permissions
To get the permissions to view and work with insights and recommendations, ensure that you have the requiredIdentity and Access Management (IAM) roles.
| Task | Role |
|---|---|
| View recommendations | recommender.cloudsqlViewer orcloudsql.admin |
| Apply recommendations | cloudsql.editor orcloudsql.admin |
List the recommendations
To list the recommendations, follow these steps:
Console
To list recommendations about instance performance, follow these steps:
- Go to theCloud SQL Instances page.
- On theImprove instance health by investigating issues and acting on recommendations banner, clickExpand Details.
Alternatively, follow these steps:
Go to theActive Assist. See alsoFind and apply recommendations with the Recommendations.
In theAll recommendations card, clickPerformance .
gcloud
Run thegcloud recommender recommendations list command as follows:
gcloud recommender recommendations list \--project=PROJECT_ID \--location=LOCATION \--recommender=google.cloudsql.instance.PerformanceRecommender \--filter=recommenderSubtype=MYSQL_RECONFIG_TRANS_LOGS
Replace the following:
- PROJECT_ID: your project ID
- LOCATION: a region where your instances are located, such as
us-central1
API
Call therecommendations.list method as follows:
GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations
Replace the following:
- PROJECT_ID: your project ID
- LOCATION: a region where your instances are located, such as
us-central1
View insights and detailed recommendations
To view insights and detailed recommendations, follow these steps:
Console
Do one of the following:
On thePerformance Recommendations page, click thePerformancerecommendations card and then clickReconfigure log settings.The recommendation panel appears, which contains insights anddetailed recommendations for the instance.
On theInstances page, clickReconfigure log settings. The list ofinstances displays only those instances for which the recommendationapplies.
gcloud
Run thegcloud recommender insights list command as follows:
gcloud recommender insights list \--project=PROJECT_ID \--location=LOCATION \--insight-type=google.cloudsql.instance.PerformanceInsight \--filter=insightSubtype=INSIGHT_SUBTYPE
Replace the following:
- PROJECT_ID: your project ID
- LOCATION: a region where your instances are located, such as
us-central1 - INSIGHT_SUBTYPE: set this parameter to one of the following:
MYSQL_LOW_BINLOG_CACHE_SIZE: display insights forthe number of transactional binary logs using the on-disk cache foryour instanceMYSQL_LOW_BINLOG_STMT_CACHE_SIZE: display insights forthe number of non-transactional statement binary logs using theon-disk cache for your instanceMYSQL_LOW_INNODB_LOG_BUFFER_SIZE: display insights forthe wait time compared to the write time for InnoDB redo logs
API
Call theinsights.list method as follows:
GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/google.cloudsql.instance.PerformanceInsight/insights
Replace the following:
- PROJECT_ID: your project ID
- LOCATION: a region where your instances are located, such as
us-central1
Apply the recommendation
To implement this recommendation, do one of the following:
Increase the value of either
binlog_stmt_cache_sizeorbinlog_cache_size.For more information on increasing the value of
binlog_stmt_cache_size, seebinlog_stmt_cache_size. For moreinformation on increasing the value ofbinlog_cache_size, seeCache memory consumption.Design your transactions to be small and use less of the binary log and binarylog statement caches.
Increase the value of
innodb_log_buffer_size. For more information onincreasing the value ofinnodb_log_buffer_size, seeBuffer memory consumption.Increase the persistent disk size so that you have enough parallel I/Orequests to improve ratio of read operations to write operations for the logfiles.
binlog_stmt_cache_size,binlog_cache_size, andinnodb_log_buffer_size requires more memory. After increasing these flags,monitor the memory usage.What's next
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-05 UTC.