tencent cloud

TDSQL Boundless

Parameter Templates

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-06-02 21:51:27

Feature Introduction

TDSQL Boundless provides default preset parameter templates to cover typical business workload characteristics. You can select the most suitable parameter template based on your specific business scenario. You can use database parameter templates to manage the parameter configuration of the database engine. A database parameter group acts as a container for engine configuration values, which can be applied to one or more database instances.
The default parameter templates include the read-write balancing template, the Write Optimized Template: template, and the read optimized template.
Note:
Parameter template selection is supported only for instances of version V21.6.1 or later.
Database instances that have applied parameter templates will not be synchronously updated when the parameter templates are updated. It is necessary to manually perform a batch update of the database instances.
The current template only covers parameters related to the storage engine. Other business-related parameters, such as character set, maximum connections, and isolation level, are not affected by the template.

Introduction of the System Default Template

TDSQL Boundless provides a general-purpose template and default templates that focus on either read performance or write performance, catering to the varying requirements of different systems for database performance and stability.

Read/Write Load Balancing Template (Recommended)

The read-write balancing parameter template focuses on read-write balance and is suitable for general OLTP workloads.

Write Optimized Template

The write ptimized parameter template is designed to focus on write optimization and is suitable for write-intensive workloads or scenarios involving batch data loading, such as, but not limited to, log processing, transaction flow, and IoT data aggregation services.

Read Optimized Template

The read optimized parameter template is designed to focus on read optimization and is suitable for read-intensive, write-light workloads, such as, but not limited to, reporting and archiving services.

Template Parameter Differences

Parameters involved are as follows:
Note:
The values for some parameters in the parameter template are automatically calculated based on formulas.
In the template parameter comparison table:
Read-Write balancing template (default): The values of some parameters are automatically adjusted based on the instance specification.
Write Optimized template: For parameters within the template's coverage, some are fixed to preset values, and write stop or write slowdown is triggered, preventing them from automatically changing with the specification.
Read Optimized template: The values of some parameters are automatically adjusted based on the instance specification.
Name of Parameter with Difference
Read/Write Balanced Template (Default)
Write Optimized Template
Read Optimized Template
tdstore_user_cf_write_buffer_size
Memory < 32 GB: 64 MB
32 GB ≤ memory < 64 GB: 128 MB
Memory >= 64 GB: 256 MB
256 MB
256 MB
tdstore_user_cf_max_bytes_for_level_base
{tdstore_user_cf_level0_file_num_compaction_trigger} * {tdstore_user_cf_write_buffer_size}
4 GB
1 GB
tdstore_user_cf_target_file_size_base
32 MB
32 MB
256 MB
tdstore_user_cf_level0_file_num_compaction_trigger
4
16
1
64
128
64
128
256
128
tdstore_user_cf_disable_intra_l0_compaction
OFF
(Intra-L0 compaction enabled)
ON
(Intra-L0 compaction disabled)
OFF
(Intra-L0 compaction enabled)
tdstore_user_cf_soft_l0_pending_compaction_bytes_limit
Disk < 1 TB: 32 GB
1 TB ≤ disk < 3 TB:64 GB
Disk >= 3 TB: 128 GB (global write slowdown)
128 GB
Same as the default template
tdstore_user_cf_hard_l0_pending_compaction_bytes_limit
Disk < 1 TB: 128 GB
1 TB ≤ disk < 3 TB:128 GB
Disk >= 3 TB: 256 GB (global write slowdown)
256 GB
Same as the default template
Disk < 1 TB: 256 GB
1 TB ≤ disk < 3 TB:512 GB
Disk >= 3 TB: 0 (global write slowdown protection mechanism disabled)
0
(global write slowdown protection mechanism disabled)
Same as the default template
Disk < 1 TB: 512 GB
1 TB ≤ disk < 3 TB:1024 GB
Disk >= 3 TB: 0 (global write slowdown protection mechanism disabled)
0
(global write stop protection mechanism disabled)
Same as the default template
tdstore_user_cf_compression_per_level
kNoCompression:kNoCompression:kLZ4Compression:kLZ4Compression:kZSTD:kZSTD:kZSTD
kLZ4Compression:kLZ4Compression:kZSTD:kZSTD:kZSTD:kZSTD:kZSTD
Same as the default template

Core Parameter Description

Parameter
Description
Selection Recommendation
tdstore_user_cf_write_buffer_size
The size of a single write buffer (MemTable). Write operations first go to the buffer and are flushed to disk only when the buffer is full. A larger value increases write throughput (by reducing flush frequency) but also increases memory usage and fault recovery time.
64 MB: Scenarios with memory constraints or low write volumes.
128 MB: General recommendation.
256 MB: High-volume write scenarios, such as data import.
tdstore_user_cf_max_bytes_for_level_base
The capacity limit of the LSM-Tree L1 level. This parameter determines the total number of levels and the write amplification of the LSM-Tree. A larger value results in fewer levels and lower write amplification, but a larger amount of data per Compaction.
1 GB: Workloads with moderate data volume and read performance priority.
4 GB: Workloads with extremely large data volume and write throughput priority.
tdstore_user_cf_target_file_size_base
The target size of each SST data file. A larger value: fewer files and lower metadata overhead. A smaller value: finer-grained Compaction and a higher cache hit ratio.
32 MB: Workloads with moderate data volume and read performance priority.
256 MB: Workloads with extremely large data volume and write throughput priority.
tdstore_user_cf_level0_file_num_compaction_trigger
The L0 level is a file accumulation area where data is flushed from memory. More files in this level result in slower queries. This parameter controls the number of files that can accumulate in the L0 level before Compaction is triggered. A smaller value: more timely compaction and stable read performance. A larger value: smoother writes but more fluctuating read latency.
1: Workloads with more reads than writes and read performance priority.
4: General scenarios with balanced read and write operations.
16: High-volume write scenarios, such as data import, trade temporary read performance degradation for non-blocking writes.
When the number of L0 files reaches this threshold, the write speed is reduced (throttled) to allow Compaction time to catch up.
64: General scenarios with balanced read and write operations.
128: High-volume write scenarios, such as data import, trade temporary read performance degradation for non-blocking writes.
When the number of L0 files reaches this threshold, writes are completely stopped until Compaction catches up. This is a protection mechanism to prevent unlimited expansion of the L0 level.
128: General scenarios with balanced read and write operations.
256: High-volume write scenarios, such as data import, trade temporary read performance degradation for non-blocking writes.
tdstore_user_cf_disable_intra_l0_compaction
This parameter controls whether intra-L0 file compaction is enabled. If intra-L0 file compaction is enabled, small files within the L0 level are first merged into larger files, reducing the number of L0 files and helping to reduce read amplification. If intra-L0 file compaction is disabled, it is suitable for write-intensive scenarios where the L0 file quantity threshold is set high, reducing Compaction CPU overhead.
OFF: Enables L0 intra-level compaction, suitable for workloads with more reads than writes.
ON: Disables L0 intra-level compaction, suitable for write-intensive scenarios.
tdstore_user_cf_soft_l0_pending_compaction_bytes_limit
The L0-level write slowdown parameter. When the number of pending Compaction bytes in the L0 level reaches this value, write slowdown (reducing write speed) is triggered, specifically to prevent L0-level expansion.
32 GB: Workloads with more reads than writes and read performance priority.
64 GB: General scenarios with balanced read and write operations.
128 GB: High-volume write scenarios, such as data import, trade temporary oversized L0 Compaction granularity for non-blocking writes.
tdstore_user_cf_hard_l0_pending_compaction_bytes_limit
The L0-level write stop parameter. When the number of pending Compaction bytes in the L0 level reaches this value, write stop is triggered, specifically to prevent L0-level expansion.
128 GB: Scenarios with balanced read and write operations.
256 GB: High-volume write scenarios, such as data import, trade temporary oversized L0 Compaction granularity for non-blocking writes.
The global write slowdown parameter. When Compaction cannot keep up with the write speed, data pending organization accumulates. This parameter protects against disk exhaustion by triggering write slowdown (reducing write speed).
0: Disables the global write slowdown protection trigger mechanism.
256 GB: Triggers the write slowdown protection mechanism when the global pending Compaction data volume reaches 256 GB. A general-purpose configuration.
512 GB: Triggers the write slowdown protection mechanism when the global pending Compaction data volume reaches 512 GB. Suitable for extra-large instances.
The global write stop parameter. When Compaction cannot keep up with the write speed, data pending organization accumulates. This parameter protects against disk exhaustion by triggering write stop (stopping writes).
0: Disables the global write stop protection trigger mechanism, meaning writes are never stopped as a result.
512 GB: Triggers the write stop protection mechanism when the global pending Compaction data volume reaches 512 GB. A general-purpose configuration.
1024 GB: Triggers the write stop protection mechanism when the global pending Compaction data volume reaches 1024 GB. Suitable for extra-large instances.
tdstore_user_cf_compression_per_level
Configures compression algorithms separately for each LSM level. L0~L1 uses LZ4 (fast speed, low CPU usage), and L2~L6 uses ZSTD (high compression ratio, saves disk space). Upper levels prioritize speed, while lower levels prioritize space.
kNoCompression:kNoCompression:kLZ4Compression:kLZ4Compression:kZSTD:kZSTD:kZSTD: The upper layer is not compressed, enabling faster reads of hot data in the upper layer. The compression ratio for a large volume of cold data in the lower layer is high, achieving balanced read and write performance.
kLZ4Compression:kLZ4Compression:kZSTD:kZSTD:kZSTD:kZSTD:kZSTD: The upper layer data is also compressed, reducing IO bandwidth consumption by compaction in write-intensive scenarios.

How to Use

Log in to the TDSQL Boundless console and configure settings via Create Instance. For details, see Create Instance.

Limitations

1. Parameters within the template's coverage are fixed: After "Write Optimized" or "Read Optimized" is selected, parameters covered by the template no longer change automatically with instance scaling. To allow these parameters to continue adapting to the specification, select the "Read-Write Balanced Template (Default)" when creating an instance.
2. Individual parameters can be modified: After the template takes effect, you can still fine-tune individual parameters on the console's Parameter Configuration page. Modifying a single parameter does not affect other parameters within the template.

FAQs

What Are the Differences Between the "Read/Write Load Balancing Template" and the "

Read-write balancing template (default): Parameters within the template are automatically recalculated and take effect as the instance specification changes. For example:
Memory upgrade: The memory write buffer is enlarged accordingly (for example, when memory increases from less than 32 GB to greater than or equal to 64 GB, the write buffer increases from 64 MiB to 256 MiB), and the L1 baseline capacity is scaled up synchronously.
Memory downgrade: Parameters are scaled down to the tier that matches the new specification.
Disk scaling: The four pending bytes thresholds (write slowdown/write stop) are recalculated in tiers based on the new disk capacity.
Write Optimized / Read Optimized Template: Parameters covered by the template are fixed to preset values and do not change with the specification. Other parameters not covered by the template continue to change with the specification according to the default rules.

What Happens If I Manually Modified a Parameter Covered by the Template and Then Perform Scaling?

Read-write balancing template (default): Parameters that you manually modify and persist are prioritized for retention. During instance scaling, the system does not overwrite parameters you have manually modified. Other parameters not modified by you change normally according to the template or adaptive rules.
Write Optimized / Read Optimized Template Template: These two templates are deeply tuned by the system for extreme read/write scenarios. Modifying a single item individually may cause overall performance to fall short of expectations.
Temporary modification: This feature supports temporary parameter adjustments, which take effect before a restart and do not affect other parameters.
Persistent modification (not recommended): If you modify and persist a parameter, after the instance restarts, that instance parameter will be rolled back to the default value corresponding to the "Read-Write Balanced Template". At this point, the parameter is marked as user-modified and is retained during subsequent scaling operations, but it is no longer part of the optimization framework of the original Write Optimized / Read Optimized Template Template.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan