title | summary | aliases | ||
---|---|---|---|---|
PD Configuration File |
Learn the PD configuration file. |
|
The PD configuration file supports more options than command-line parameters. You can find the default configuration file here.
This document only describes parameters that are not included in command-line parameters. Check here for the command line parameters.
- The timeout of the PD Leader Key lease. After the timeout, the system re-elects a Leader.
- Default value:
3
- unit: second
- The interval for PD to allocate TSOs for persistent storage in etcd
- Default value:
3
seconds
- The initial state of the cluster
- Default value:
new
- Enables or disables
raft prevote
- Default value:
true
- The storage size of the meta-information database, which is 2GB by default
- Default value:
2147483648
- The automatic compaction modes of the meta-information database
- Available options:
periodic
(by cycle) andrevision
(by version number). - Default value:
periodic
- The time interval for automatic compaction of the meta-information database when
auto-compaction-retention
isperiodic
. When the compaction mode is set torevision
, this parameter indicates the version number for the automatic compaction. - Default value: 1h
- Determines whether to force PD to start as a new cluster and modify the number of Raft members to
1
- Default value:
false
- The tick period of etcd Raft
- Default value:
100ms
- The timeout for the etcd leader election
- Default value:
3s
- Enables or disables independent Region storage
- Default value:
false
Configuration items related to security
- The path of the CA file
- Default value: ""
- The path of the Privacy Enhanced Mail (PEM) file that contains the X509 certificate
- Default value: ""
- The path of the PEM file that contains the X509 key
- Default value: ""
Configuration items related to log
- The log format, which can be specified as "text", "json", or "console"
- Default value:
text
- Whether to disable the automatically generated timestamp in the log
- Default value:
false
Configuration items related to the log file
- The maximum size of a single log file. When this value is exceeded, the system automatically splits the log into several files.
- Default value:
300
- Unit: MiB
- Minimum value:
1
- The maximum number of days in which a log is kept
- Default value:
28
- Minimum value:
1
- The maximum number of log files to keep
- Default value:
7
- Minimum value:
1
Configuration items related to monitoring
- The interval at which monitoring metric data is pushed to Prometheus
- Default value:
15s
Configuration items related to scheduling
- Controls the size limit of
Region Merge
. When the Region size is greater than the specified value, PD does not merge the Region with the adjacent Regions. - Default value:
20
- Specifies the upper limit of the
Region Merge
key. When the Region key is greater than the specified value, the PD does not merge the Region with its adjacent Regions. - Default value:
200000
- Controls the running frequency at which
replicaChecker
checks the health state of a Region. The smaller this value is, the fasterreplicaChecker
runs. Normally, you do not need to adjust this parameter. - Default value:
100ms
- Controls the time interval between the
split
andmerge
operations on the same Region. That means a newly split Region will not be merged for a while. - Default value:
1h
- Control the maximum number of snapshots that a single store receives or sends at the same time. PD schedulers depend on this configuration to prevent the resources used for normal traffic from being preempted.
- Default value value:
3
- Controls the maximum number of pending peers in a single store. PD schedulers depend on this configuration to prevent too many Regions with outdated logs from being generated on some nodes.
- Default value:
16
- The downtime after which PD judges that the disconnected store can not be recovered. When PD fails to receive the heartbeat from a store after the specified period of time, it adds replicas at other nodes.
- Default value:
30m
- The number of Leader scheduling tasks performed at the same time
- Default value:
4
- The number of Region scheduling tasks performed at the same time
- Default value:
4
- The number of Replica scheduling tasks performed at the same time
- Default value:
8
- The number of the
Region Merge
scheduling tasks performed at the same time. Set this parameter to0
to disableRegion Merge
. - Default value:
8
- The threshold ratio below which the capacity of the store is sufficient
- Default value:
0.6
- Minimum value: greater than
0
- Maximum value: less than
1
- The threshold ratio above which the capacity of the store is insufficient
- Default value:
0.8
- Minimum value: greater than
0
- Maximum value: less than
1
- Controls the
balance
buffer size - Default value:
5
- Minimum value:
0
- Determines whether to disable the feature that automatically removes
DownReplica
. When this parameter is set totrue
, PD does not automatically clean up the copy in the down state. - Default value:
false
- Determines whether to disable the feature that migrates
OfflineReplica
. When this parameter is set totrue
, PD does not migrate the replicas in the offline state. - Default value:
false
- Determines whether to disable the feature that automatically supplements replicas. When this parameter is set to
true
, PD does not supplement replicas for the Region with insufficient replicas. - Default value:
false
- Determines whether to disable the feature that removes extra replicas. When this parameter is set to
true
, PD does not remove the extra replicas from the Region with excessive replicas. - Default value:
false
- Determines whether to disable isolation level check. When this parameter is set to
true
, PD does not increase the isolation level of the Region replicas through scheduling. - Default value:
false
Configuration items related to replicas
- The number of replicas
- Default value:
3
- The topology information of a TiKV cluster
- Default value:
[]
Configuration items related to labels
- The label key for the store that rejected the Leader
- Default value:
""
- The label value for the store that rejected the Leader
- Default value:
""