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 |
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. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan