|
81 | 81 | // Determines whether to process requests in batches |
82 | 82 | "server.enable-request-batch": bool | *true |
83 | 83 |
|
84 | | - // Specifies server attributes, such as `{ zone = "us-west-1", disk = "ssd" }`. |
85 | | - "server.labels": string | *"{}" |
| 84 | + // Specifies server labels as key-value pairs, such as `{ zone = "us-west-1", disk = "ssd" }`. The template default is `{}`. |
| 85 | + "server.labels": {[string]: string} | *{} |
86 | 86 |
|
87 | 87 | // The working thread count of the background pool, including endpoint threads, BR threads, split-check threads, Region threads, and other threads of delay-insensitive tasks. |
88 | 88 | // Default value: when the number of CPU cores is less than 16, the default value is 2; otherwise, the default value is 3. |
|
103 | 103 | // The minimal working thread count of the unified read pool |
104 | 104 | "readpool.unified.min-thread-count": int | *1 |
105 | 105 |
|
106 | | - // The maximum working thread count of the unified read pool or the UnifyReadPool thread pool. When you modify the size of this thread pool, refer to [Performance tuning for TiKV thread pools](/tune-tikv-thread-performance.md#performance-tuning-for-tikv-thread-pools). Value range: `[min-thread-count, MAX(4, CPU quota * 10)]`. `MAX(4, CPU quota * 10)` takes the greater value out of `4` and the `CPU quota * 10`. |
107 | | - "readpool.unified.max-thread-count": string | *"MAX" |
| 106 | + // The maximum working thread count of the unified read pool. The template default is `4`; the upstream default is `MAX(4, CPU * 0.8)`. Value range: `[min-thread-count, MAX(4, CPU quota * 10)]`. |
| 107 | + "readpool.unified.max-thread-count": int & >=1 | *4 |
108 | 108 |
|
109 | 109 | // The stack size of the threads in the unified thread pool. Type: Integer + Unit. Unit: KiB|MiB|GiB |
110 | 110 | "readpool.unified.stack-size": string | *"10MiB" |
|
115 | 115 | // Controls whether to automatically adjust the thread pool size. When it is enabled, the read performance of TiKV is optimized by automatically adjusting the UnifyReadPool thread pool size based on the current CPU usage. The possible range of the thread pool is `[max-thread-count, MAX(4, CPU)]`. The maximum value is the same as the one of [`max-thread-count`](#max-thread-count). |
116 | 116 | "readpool.unified.auto-adjust-pool-size": bool | *false |
117 | 117 |
|
118 | | - // Determines whether to use the unified thread pool (configured in [`readpool.unified`](#readpoolunified)) for storage requests. If the value of this parameter is `false`, a separate thread pool is used, which is configured through the rest parameters in this section (`readpool.storage`). |
119 | | - // Default value: If this section (readpool.storage) has no other configurations, the default value is true. Otherwise, for the backward compatibility, the default value is false. Change the configuration in readpool.unified as needed before enabling this option. |
120 | | - "readpool.storage.use-unified-pool": string |
| 118 | + // Determines whether to use the unified read pool for storage requests. If `false`, storage requests use the separate `readpool.storage` thread pool. The template default is `true`. |
| 119 | + "readpool.storage.use-unified-pool": bool | *true |
121 | 120 |
|
122 | 121 | // The allowable number of concurrent threads that handle high-priority `read` requests. When `8` ≤ `cpu num` ≤ `16`, the default value is `cpu_num * 0.5`; when `cpu num` is smaller than `8`, the default value is `4`; when `cpu num` is greater than `16`, the default value is `8`. |
123 | 122 | "readpool.storage.high-concurrency": int & >=1 |
|
241 | 240 | // Enables or disables `prevote`. Enabling this feature helps reduce jitter on the system after recovery from network partition. |
242 | 241 | "raftstore.prevote": bool | *true |
243 | 242 |
|
244 | | - // The storage capacity, which is the maximum size allowed to store data. If `capacity` is left unspecified, the capacity of the current disk prevails. To deploy multiple TiKV instances on the same physical disk, add this parameter to the TiKV configuration. For details, see [Key parameters of the hybrid deployment](/hybrid-deployment-topology.md#key-parameters). Unit: KiB|MiB|GiB |
245 | | - "raftstore.capacity": string | *"0" |
| 243 | + // The storage capacity, which is the maximum size allowed to store data. TiKV parses this as ReadableSize, so it accepts non-negative integers such as `0` and size strings such as `"10GiB"`. If `capacity` is left unspecified, the capacity of the current disk prevails. The template default is `0`. |
| 244 | + "raftstore.capacity": int | string | *0 |
246 | 245 |
|
247 | 246 | // The path to the Raft library, which is `storage.data-dir/raft` by default |
248 | 247 | "raftstore.raftdb-path": string |
|
280 | 279 | // The soft limit on the maximum allowable count of residual Raft logs |
281 | 280 | "raftstore.raft-log-gc-threshold": int & >=1 | *50 |
282 | 281 |
|
283 | | - // The hard limit on the allowable number of residual Raft logs |
284 | | - // Default value: the log number that can be accommodated in the 3/4 Region size |
285 | | - "raftstore.raft-log-gc-count-limit": string |
| 282 | + // The hard limit on the allowable number of residual Raft logs. The template default is `73728`; the upstream default is calculated from three-fourths of the Region size, assuming each log is 1 KiB. Minimum value: `0`. |
| 283 | + "raftstore.raft-log-gc-count-limit": int & >=0 | *73728 |
286 | 284 |
|
287 | 285 | // The hard limit on the allowable size of residual Raft logs |
288 | 286 | // Default value: 3/4 of the Region size |
|
309 | 307 | // The time interval at which to check whether it is necessary to manually trigger RocksDB compaction. `0` means that this feature is disabled. |
310 | 308 | "raftstore.region-compact-check-interval": string | *"5m" |
311 | 309 |
|
312 | | - // The number of Regions checked at one time for each round of manual compaction |
313 | | - // Default value:When `storage.engine="raft-kv"`, the default value is `100`.When `storage.engine="partitioned-raft-kv"`, the default value is `5`. |
314 | | - "raftstore.region-compact-check-step": string |
| 310 | + // The number of Regions checked at one time for each round of manual compaction. The template default is `100`. Minimum value: `0`. |
| 311 | + "raftstore.region-compact-check-step": int & >=0 | *100 |
315 | 312 |
|
316 | 313 | // The number of tombstones required to trigger RocksDB compaction |
317 | 314 | "raftstore.region-compact-min-tombstones": int & >=0 | *10000 |
|
407 | 404 | "raftstore.apply-max-batch-size": int & <=10240 | *256 |
408 | 405 |
|
409 | 406 | // The allowable number of threads in the pool that flushes data to the disk, which is the size of the Apply thread pool. When you modify the size of this thread pool, refer to [Performance tuning for TiKV thread pools](/tune-tikv-thread-performance.md#performance-tuning-for-tikv-thread-pools). Value ranges: `[1, CPU * 10]`. `CPU` means the number of your CPU cores. |
410 | | - "raftstore.apply-pool-size": int | >=1 | *2 |
| 407 | + "raftstore.apply-pool-size": int & >=1 | *2 |
411 | 408 |
|
412 | 409 | // Raft state machines process requests for flushing logs into the disk in batches by the BatchSystem. This configuration item specifies the maximum number of Raft state machines that can process the requests in one batch. If `hibernate-regions` is enabled, the default value is `256`. If `hibernate-regions` is disabled, the default value is `1024`. |
413 | 410 | "raftstore.store-max-batch-size": int & >=0 & <=10240 |
414 | 411 |
|
415 | 412 | // The allowable number of threads in the pool that processes Raft, which is the size of the Raftstore thread pool. When you modify the size of this thread pool, refer to [Performance tuning for TiKV thread pools](/tune-tikv-thread-performance.md#performance-tuning-for-tikv-thread-pools). Value ranges: `[1, CPU * 10]`. `CPU` means the number of your CPU cores. |
416 | 413 | "raftstore.store-pool-size": int | *2 |
417 | 414 |
|
418 | | - // The allowable number of threads that process Raft I/O tasks, which is the size of the StoreWriter thread pool. When you modify the size of this thread pool, refer to [Performance tuning for TiKV thread pools](/tune-tikv-thread-performance.md#performance-tuning-for-tikv-thread-pools). |
419 | | - "raftstore.store-io-pool-size": float & >=0 | *0 |
| 415 | + // The allowable number of threads that process Raft I/O tasks, which is the size of the StoreWriter thread pool. The template default is `0`, which disables the dedicated Raft I/O pool. Minimum value: `0`. |
| 416 | + "raftstore.store-io-pool-size": int & >=0 | *0 |
420 | 417 |
|
421 | 418 | // The allowable number of threads that drive `future` |
422 | 419 | "raftstore.future-poll-size": int | *1 |
|
427 | 424 | // At a certain interval, TiKV inspects the latency of the Raftstore component. This parameter specifies the interval of the inspection. If the latency exceeds this value, this inspection is marked as timeout. Judges whether the TiKV node is slow based on the ratio of timeout inspection. |
428 | 425 | "raftstore.inspect-interval": string | *"100ms" |
429 | 426 |
|
430 | | - // Determines the threshold at which Raft data is written into the disk. If the data size is larger than the value of this configuration item, the data is written to the disk. When the value of `store-io-pool-size` is `0`, this configuration item does not take effect. |
| 427 | + // Determines the threshold at which Raft data is written to disk. If the data size is larger than this value, the data is written to disk. This takes effect only when `store-io-pool-size` is greater than `0`. |
431 | 428 | "raftstore.raft-write-size-limit": string | *"1MiB" |
432 | 429 |
|
433 | 430 | // Determines the interval at which the minimum resolved timestamp is reported to the PD leader. If this value is set to `0`, it means that the reporting is disabled. Unit: second |
|
461 | 458 | // The size of the newly split Region. This value is an estimate. Unit: KiB|MiB|GiB |
462 | 459 | "coprocessor.region-split-size": string | *"96MiB" |
463 | 460 |
|
464 | | - // The maximum allowable number of keys in a Region. When this value is exceeded, the Region splits into many. |
465 | | - // Default value: region-split-keys / 2 * 3 |
466 | | - "coprocessor.region-max-keys": string |
| 461 | + // The maximum allowable number of keys in a Region. When this value is exceeded, the Region is split. The template default is `1440000`, which is `region-split-keys / 2 * 3`. |
| 462 | + "coprocessor.region-max-keys": int | *1440000 |
467 | 463 |
|
468 | 464 | // The number of keys in the newly split Region. This value is an estimate. |
469 | 465 | "coprocessor.region-split-keys": int | *960000 |
|
516 | 512 | // Default value:When `storage.engine="raft-kv"`, the default value is `"4GiB"`.When `storage.engine="partitioned-raft-kv"`, the default value is `1`. |
517 | 513 | "raftdb.max-total-wal-size": string |
518 | 514 |
|
519 | | - // Controls whether to enable the readahead feature during RocksDB compaction and specify the size of readahead data. If you use mechanical disks, it is recommended to set the value to `2MiB` at least. Unit: B|KiB|MiB|GiB. Default value: 0 |
520 | | - "raftdb.compaction-readahead-size": string |
| 515 | + // Controls whether to enable readahead during RocksDB compaction and specifies the readahead size. TiKV parses this as ReadableSize, so it accepts non-negative integers such as `0` and size strings such as `"2MiB"`. The template default is `0`, which disables readahead. |
| 516 | + "raftdb.compaction-readahead-size": int | string | *0 |
521 | 517 |
|
522 | 518 | // The maximum buffer size used in WritableFileWrite. Unit: B|KiB|MiB|GiB |
523 | 519 | "raftdb.writable-file-max-buffer-size": string | *"1MiB" |
|
583 | 579 | // Default value: Total machine memory * 15% |
584 | 580 | "raft-engine.memory-limit": string |
585 | 581 |
|
586 | | - // Disable Raft Engine by setting [`enable`](/tikv-configuration-file.md#enable-1) to `false` and restart TiKV to make the configuration take effect. Set `format-version` to `1`. Enable Raft Engine by setting `enable` to `true` and restart TiKV to make the configuration take effect. |
587 | | - "raft-engine.format-version": string |
| 582 | + // Specifies the Raft Engine log file format version. Valid values are `1` and `2`; version `2` supports log recycling and requires TiKV v6.3.0 or later. The template default is `2`. |
| 583 | + // Changing this value can cause TiKV to fail to start. Follow the documented downgrade/upgrade steps before modifying it. |
| 584 | + "raft-engine.format-version": int | *2 |
588 | 585 |
|
589 | 586 | // Determines whether to recycle stale log files in Raft Engine. When it is enabled, logically purged log files will be reserved for recycling. This reduces the long tail latency on write workloads. |
590 | 587 | "raft-engine.enable-log-recycle": bool | *true |
|
631 | 628 | // The window size of Stream channel. When the channel is full, the stream is blocked. |
632 | 629 | "import.stream-channel-window": int | *128 |
633 | 630 |
|
634 | | - // Starting from v6.5.0, PITR supports directly accessing backup log files in memory and restoring data. This configuration item specifies the ratio of memory available for PITR to the total memory of TiKV. Value range: [0.0, 0.5] |
635 | | - "import.memory-use-ratio": float & >=0.0 & <=0.5 | *"0.3" |
| 631 | + // Specifies the ratio of TiKV memory available for PITR to directly access backup log files during restore. Value range: `[0.0, 0.5]`. |
| 632 | + "import.memory-use-ratio": float & >=0.0 & <=0.5 | *0.3 |
636 | 633 |
|
637 | 634 | // The number of keys to be garbage-collected in one batch |
638 | 635 | "gc.batch-keys": int | *512 |
639 | 636 |
|
640 | | - // The maximum bytes that GC worker can write to RocksDB in one second. If the value is set to `0`, there is no limit. |
641 | | - "gc.max-write-bytes-per-sec": int | *0 |
| 637 | + // The maximum bytes that the GC worker can write to RocksDB per second. The template and upstream default are `"0"`, which means no limit. |
| 638 | + "gc.max-write-bytes-per-sec": string | *"0" |
642 | 639 |
|
643 | 640 | // Controls whether to enable the GC in Compaction Filter feature |
644 | 641 | "gc.enable-compaction-filter": bool | *true |
|
649 | 646 | // The number of GC threads when `enable-compaction-filter` is `false`. |
650 | 647 | "gc.num-threads": int | *1 |
651 | 648 |
|
652 | | - // The number of worker threads to process backup. Value range: `[1, CPU]` |
653 | | - "backup.num-threads": string | *"MIN" |
| 649 | + // The number of worker threads used to process backup. The template default is `8`; the upstream default is `MIN(CPU * 0.5, 8)`. Value range: `[1, CPU]`. |
| 650 | + "backup.num-threads": int & >=1 | *8 |
654 | 651 |
|
655 | 652 | // The number of data ranges to back up in one batch |
656 | 653 | "backup.batch-size": int | *8 |
|
0 commit comments