MySQL semi-sync settings
MySQL semi-sync settings affect the stability and performance of the database cluster. When creating a cluster, default values are applied in the settings. The default values are selected to ensure high cluster performance and vary depending on the cluster configuration and the version of MySQL semi-sync.
You can:
- view default settings and change them when creating a cluster;
- or view settings and change them in an already created cluster.
We recommend changing setting values only when necessary—incorrect values can make the cluster inoperable or reduce its performance.
When scaling a cluster, some setting values are automatically replaced with default values. The list of such settings can be viewed in the Automatic settings changes when scaling a cluster subsection.
View settings
You can view the list of settings available for changes when creating a cluster or changing settings.
If you have changed the settings, you can separately view a list of settings whose values differ from the defaults.
Detailed descriptions of all settings can be found in the The MySQL Server section of the MySQL documentation.
- In the Dashboard, on the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the cluster page → Settings tab.
- In the DBMS settings block, click Change.
- Optional: to see only the settings for which you have changed the default value, select the Show modified parameters checkbox.
- View settings.
Change settings
We recommend changing setting values only when necessary—incorrect values can make the cluster inoperable or reduce its performance.
After changing some settings, the cluster will automatically restart and will be unavailable during the restart. The restart will begin immediately after saving the changes. The list of such settings can be viewed in the List of settings that require a restart subsection.
- In the Dashboard, on the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the cluster page → Settings tab.
- In the DBMS settings block, click Change.
- Specify new values.
- Click Save.
List of settings that require a restart
default_time_zone;innodb_adaptive_hash_index_parts;innodb_autoinc_lock_mode;innodb_buffer_pool_instances;innodb_buffer_pool_load_at_startup;innodb_commit_concurrency;innodb_flush_method;innodb_ft_cache_size;innodb_ft_max_token_size;innodb_ft_min_token_size;innodb_ft_total_cache_size;innodb_ft_sort_pll_degree;innodb_log_buffer_size(for MySQL semi-sync 5.7 only);innodb_log_file_size(for MySQL semi-sync 5.7 only);innodb_page_cleaners;innodb_purge_threads;innodb_read_io_threads;innodb_rollback_on_timeout;innodb_sort_buffer_size;innodb_sync_array_size;innodb_write_io_threads;max_digest_length;table_open_cache_instances;thread_pool_size;thread_stack.
Automatic setting changes when scaling a cluster
DBMS settings have valid value ranges. If, during cluster scaling, the setting values go beyond the valid ranges, these values are automatically replaced with default values so that the cluster can operate.
After the cluster has been scaled and its status becomes ACTIVE, you will be able to change settings and set new values.
List of settings that are reset to their default values when scaling a cluster:
innodb_buffer_pool_instances;innodb_buffer_pool_size;innodb_log_file_size(for MySQL semi-sync 5.7 only);innodb_redo_log_capacity;max_connections;max_heap_table_size;temptable_max_ram;thread_pool_size;tmp_table_size.
Character set and collation settings
The character set (CHARACTER SET or CHARSET) and collation (COLLATION) for the DBMS are determined by the loose_character_set_server and collation_server settings. Default values vary depending on the DBMS version.
You can change the settings when creating a cluster or change the settings in an existing cluster. The character set must be compatible with the collation. To view compatible values, run the command mysql> SHOW COLLATION WHERE Charset = '<charset>';, where <charset> is the character set for which you are checking compatible collations.
For more information about the settings and their compatibility, see the Character Sets and Collations in MySQL article in the MySQL 8.4 documentation.