Starting from December 8, 2021, TencentDB for MySQL has optimized parameter-related features and instance delivery process, including creating and applying parameter templates, comparing parameters, modifying modifiable parameters, and purchasing instances.
Note:Parameter capabilities are applicable only to two-node and three-node TencentDB for MySQL 5.6, 5.7, and 8.0.
As compared with the original instance purchase process, the initialization step is canceled, and you can select the character set, configure the table name case sensitivity, and enter the databases access port and root password on the instance purchase page.
For more information, see Creating MySQL Instance.
Certain parameters can be defined in a formula to change along with the specification, ensuring that the database always runs with the optimal configuration.
Expression syntax is supported as follows:
Supported Type | Description | Sample |
---|---|---|
Variable | DBinitMemory will be 4000.innodb_buffer_pool_size parameter in TencentDB for MySQL must be between 50% and 90% of the memory size. If the configured value is above 90% or below 50%, it will be automatically configured to 90% or 50% respectively. |
{DBinitMemory * 786432}: DBinitMemory * percentage (75% by default) * 1024 * 1024 (unit conversion). |
Operator | Formula syntax: It should be enclosed in braces ({}). {MIN(DBInitMemory/4+500,1000000)} instead of {MIN(DBInitMemory\*0.25+500,1000000)} is supported. |
- |
Function | {MAX(DBInitCpu/2,4)} |
For detailed parameter settings, see Setting Instance Parameters.
For parameter template creation, the original one parameter template type is changed to two types (high-performance template and high-stability template), and the referenced template type option is added.
Comparison of parameters between template types:
Changed Parameter | Default Template | High-Performance Template | High-Stability Template |
---|---|---|---|
innodb_read_io_threads | 12 | {MAX(DBInitCpu/2,4)} | {MAX(DBInitCpu/2,4)} |
innodb_write_io_threads | 12 | {MAX(DBInitCpu/2,4)} | {MAX(DBInitCpu/2,4)} |
max_connections | 800 | {MIN(DBInitMemory/4+500,100000)} | {MIN(DBInitMemory/4+500,100000)} |
table_definition_cache | 768 | {MAX(DBInitMemory*512/1000,2048)} | {MAX(DBInitMemory*512/1000,2048)} |
table_open_cache | 2000 | {MAX(DBInitMemory*512/1000,2048)} | {MAX(DBInitMemory*512/1000,2048)} |
table_open_cache_instances | 16 | {MIN(DBInitMemory/1000,16)} | {MIN(DBInitMemory/1000,16)} |
innodb_disable_sort_file_cache | OFF | OFF | ON |
innodb_log_compressed_pages | ON | OFF | ON |
innodb_print_all_deadlocks | OFF | OFF | ON |
sync_binlog | 0 | 1000 | 1 |
thread_handling | one-thread-per-connection | pool-of-threads | one-thread-per-connection |
innodb_flush_redo_using_fdatasync | FALSE | TRUE | FALSE |
innodb_fast_ahi_cleanup_for_drop_table | FALSE | TRUE | FALSE |
innodb_adaptive_hash_index | FALSE | TRUE | FALSE |
innodb_table_drop_mode | SYNC_DROP | ASYNC_DROP | SYNC_DROP |
innodb_flush_log_at_trx_commit | 2 | 2 | 1 |
For more information on template parameters, see Managing Parameter Template.
Parameter | TencentDB for MySQL 5.6 | TencentDB for MySQL 5.7 | TencentDB for MySQL 8.0 |
---|---|---|---|
character_set_client | - | ✓ | - |
default_password_lifetime | - | ✓ | ✓ |
innodb_alter_table_default_algorithm | - | ✓ | - |
innodb_async_truncate_size | - | ✓ | ✓ |
innodb_async_truncate_work_enabled | - | ✓ | - |
innodb_buffer_pool_instances | ✓ | ✓ | ✓ |
innodb_buffer_pool_size | ✓ | ✓ | ✓ |
innodb_default_row_format | - | ✓ | ✓ |
innodb_fast_ahi_cleanup_for_drop_table | - | - | ✓ |
innodb_flush_redo_using_fdatasync | - | ✓ | ✓ |
innodb_page_cleaners | - | ✓ | ✓ |
innodb_table_drop_mode | - | - | ✓ |
innodb_temp_tablespace_fast_cleanup | - | - | ✓ |
internal_tmp_mem_storage_engine | - | - | ✓ |
slave_net_timeout | ✓ | ✓ | - |
slave_parallel_type | ✓ | - | - |
slave_parallel_workers | ✓ | ✓ | ✓ |
sort_buffer_size | ✓ | - | - |
temptable_use_mmap | - | - | ✓ |
thread_handling | ✓ | ✓ | ✓ |
thread_handling_switch_mode | - | - | ✓ |
thread_pool_oversubscribe | ✓ | ✓ | ✓ |
thread_pool_size | - | ✓ | ✓ |
tx_isolation | - | ✓ | ✓ |
The test results are as shown below:
For detailed performance test data, see Performance Comparison of Parameter Templates.
After the new parameter system is released, the original default parameter template will be replaced by the high-performance and high-stability parameter templates. Before then, you still can retain the default parameter template settings by creating a parameter template. For more information, see Managing Parameter Template.
The parameter comparison feature allows you to compare the parameters of different templates.
Click Compare on the parameter template page and select the templates to be compared in the pop-up window. Only templates for databases on the same version can be compared.
Contact us if you have any questions. Thank you for your support for Tencent Cloud. We will continue to provide you with more cost-effective products.
Was this page helpful?