-
Notifications
You must be signed in to change notification settings - Fork 409
/
config-template.toml
195 lines (169 loc) · 9.96 KB
/
config-template.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# Copyright 2023 PingCAP, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
## The listening host for supporting TCP service. It is recommended to configure it as "0.0.0.0", which means to listen on all IP addresses of this machine.
# listen_host = "0.0.0.0"
## The TiFlash TCP service port. This port is used for internal testing and is set to 9000 by default. Before TiFlash v7.1.0, this port is enabled by default with a security risk. To enhance security, it is recommended to apply access control on this port to only allow access from whitelisted IP addresses. Starting from TiFlash v7.1.0, you can avoid the security risk by commenting out the configuration of this port. When the TiFlash configuration file does not specify this port, it will be disabled. It is **NOT** recommended to configure this port in any TiFlash deployment. (Note: Starting from TiFlash v7.1.0, TiFlash deployed by TiUP >= v1.12.5 or TiDB Operator >= v1.5.0 disables the port by default and is more secure.)
# tcp_port = 9000
## The cache size limit of the metadata of a data block. Generally, you do not need to change this value.
# mark_cache_size = 1073741824
## The cache size limit of the min-max index of a data block. Generally, you do not need to change this value.
# minmax_index_cache_size = 1073741824
## The path in which the TiFlash temporary files are stored. By default it is the first directory in storage.latest.dir appended with "/tmp".
# tmp_path = "/tidb-data/tiflash-9000/tmp"
## Storage paths settings.
[storage]
## The storage format version in storage engine. Valid values: 1, 2.
## format_version = 2
## If there are multiple SSD disks on the machine,
## specify the path list on `storage.main.dir` can improve TiFlash performance.
## If there are multiple disks with different IO metrics (e.g. one SSD and some HDDs)
## on the machine,
## set `storage.latest.dir` to store the latest data on SSD (disks with higher IOPS metrics)
## set `storage.main.dir` to store the main data on HDD (disks with lower IOPS metrics)
## can improve TiFlash performance.
[storage.main]
## The list of directories to store the main data. More than 90% of the total data is stored in
## the directory list.
# dir = [ "/tidb-data/tiflash-9000" ]
## or
# dir = [ "/ssd0/tidb-data/tiflash", "/ssd1/tidb-data/tiflash" ]
## The maximum storage capacity of each directory in storage.main.dir.
## If it is not set, or is set to multiple 0, the actual disk (the disk where the directory is located) capacity is used.
## Note that human-readable numbers such as "10GB" are not supported yet.
## Numbers are specified in bytes.
## The size of the capacity list should be the same with the dir size.
## For example:
# capacity = [ 10737418240, 10737418240 ]
[storage.latest]
## The list of directories to store the latest data. About 10% of the total data is stored in
## the directory list. The directories (or directory) listed here require higher IOPS
## metrics than those in storage.main.dir.
## If it is not set (by default), the values of storage.main.dir are used.
# dir = [ ]
## The maximum storage capacity of each directory in storage.latest.dir.
## If it is not set, or is set to multiple 0, the actual disk (the disk where the directory is located) capacity is used.
# capacity = [ 10737418240, 10737418240 ]
[storage.raft]
## The path(s) to store Raft data.
## If not set, it will be the paths in `storage.latest.dir` appended with "/kvstore".
# dir = [ ]
[storage.io_rate_limit]
## This configuration item determines whether to limit the I/O traffic, which is disabled by default. This traffic limit in TiFlash is suitable for cloud storage that has the disk bandwidth of a small and specific size.
## The total I/O bandwidth for disk reads and writes. The unit is bytes and the default value is 0, which means the I/O traffic is not limited by default.
# max_bytes_per_sec = 0
## max_read_bytes_per_sec and max_write_bytes_per_sec have similar meanings to max_bytes_per_sec. max_read_bytes_per_sec means the total I/O bandwidth for disk reads, and max_write_bytes_per_sec means the total I/O bandwidth for disk writes.
## These configuration items limit I/O bandwidth for disk reads and writes separately. You can use them for cloud storage that calculates the limit of I/O bandwidth for disk reads and writes separately, such as the Persistent Disk provided by Google Cloud Platform.
## When the value of max_bytes_per_sec is not 0, max_bytes_per_sec is prioritized.
# max_read_bytes_per_sec = 0
# max_write_bytes_per_sec = 0
## The following parameters control the bandwidth weights assigned to different I/O traffic types. Generally, you do not need to adjust these parameters.
## TiFlash internally divides I/O requests into four types: foreground writes, background writes, foreground reads, background reads.
## When the I/O traffic limit is initialized, TiFlash assigns the bandwidth according to the following weight ratio.
## The following default configurations indicate that each type of traffic gets a weight of 25% (25 / (25 + 25 + 25 + 25) = 25%).
## If the weight is configured to 0, the corresponding I/O traffic is not limited.
# foreground_write_weight = 25
# background_write_weight = 25
# foreground_read_weight = 25
# background_read_weight = 25
## TiFlash supports automatically tuning the traffic limit for different I/O types according to the current I/O load. Sometimes, the tuned bandwidth might exceed the weight ratio set above.
## auto_tune_sec indicates the interval of automatic tuning. The unit is seconds. If the value of auto_tune_sec is 0, the automatic tuning is disabled.
# auto_tune_sec = 5
[flash]
# service_addr = "0.0.0.0:3930"
# compact_log_min_period = 120
# overlap_threshold = 0.6
# compact_log_min_rows = 40960
# compact_log_min_bytes = 33554432
# replica_read_max_thread = 1
# batch_read_index_timeout_ms = 10000
# wait_index_timeout_ms = 300000
# wait_region_ready_timeout_sec = 1200
## The number of context to run read-index worker. Set 0 to disable async read-index worker.
# read_index_runner_count = 1
## The minimum duration to handle read-index tasks in each worker.
# read_index_worker_tick_ms = 10
# disaggregated_mode = "tiflash_write" or "tiflash_compute"
## Means whether we use AutoScaler or PD for tiflash_compute nodes. Default is false.
# use_autoscaler = false
[flash.proxy]
# addr = "0.0.0.0:20170"
# advertise-addr = "tiflash0:20170"
# data-dir = "/data"
# config = "/proxy.toml"
# log-file = "/log/proxy.log"
# log-level = "info"
# status-addr = "0.0.0.0:20292"
# advertise-status-addr = "tiflash0:20292"
# engine-addr = "tiflash0:3930"
# [cluster]
# Used to specify which cluster the tiflash compute node belongs to.
# cluster_id = "${cluster_id}"
[logger]
# log = "/tmp/tiflash/log/server.log"
# level = "debug"
# errorlog = "/tmp/tiflash/log/error.log"
# size = "100M"
# count = 10
[raft]
# pd_addr = "pd0:2379"
# specify which storage engine we use. tmt or dt TODO: Remove deprecated tmt engine
# storage_engine = "dt"
[status]
# The port through which Prometheus pulls metrics information.
# metrics_port = 8234
# metrics_interval = 15
[profiles]
[profiles.default]
## The memory usage limit for the generated intermediate data when a single
## coprocessor query is executed. The default value is 0, which means no limit.
# max_memory_usage = 0
## The memory usage limit for the generated intermediate data when all queries
## are executed. The default value is 0 (in bytes), which means no limit.
# max_memory_usage_for_all_queries = 0
## New in v5.0. This item specifies the maximum number of cop requests that TiFlash
## Coprocessor executes at the same time. If the number of requests exceeds the specified value,
## the exceeded requests will queue. If the configuration value is set to 0 or not set,
## the default value is used, which is twice the number of physical cores.
# cop_pool_size = 0
## New in v5.0. This item specifies the maximum number of batch requests that TiFlash
## Coprocessor executes at the same time. If the number of requests exceeds the specified value,
## the exceeded requests will queue. If the configuration value is set to 0 or not set,
## the default value is used, which is twice the number of physical cores.
# batch_cop_pool_size = 0
## New in v6.1.
## Specifies the maximum number of manual compact requests executes at the same time.
## If value is not set, or set to 0, the default value (1) will be used.
# manual_compact_pool_size = 1
## The default value is false. This parameter determines whether the segment
## of DeltaTree Storage Engine uses logical split.
## Using the logical split can reduce the write amplification, and improve the write speed.
## However, these are at the cost of disk space waste.
# dt_enable_logical_split = false
## Compression algorithm of DeltaTree Storage Engine
# dt_compression_method = lz4
## Compression level of DeltaTree Storage Engine
# dt_compression_level = 1
## Security settings take effect starting from v4.0.5.
[security]
## Path of the file that contains a list of trusted SSL CAs. If set, the following settings
## cert_path and key_path are also needed.
# ca_path = "/path/to/ca.pem"
## Path of the file that contains X509 certificate in PEM format.
# cert_path = "/path/to/tiflash-server.pem"
## Path of the file that contains X509 key in PEM format.
# key_path = "/path/to/tiflash-server-key.pem"
## New in v5.0. This configuration item enables or disables log redaction. If the configuration value
## is set to true, all user data in the log will be replaced by ?.
## Note that you also need to set security.redact-info-log for tiflash-learner's logging in tiflash-learner.toml.
# redact_info_log = false