[转帖]PD Config 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.
name
- The unique name of a PD node
- Default value:
"pd" - To start multiply PD nodes, use a unique name for each node.
data-dir
- The directory in which PD stores data
- Default value:
default.${name}"
client-urls
- The list of client URLs to be listened to by PD
- Default value:
"http://127.0.0.1:2379" - When you deploy a cluster, you must specify the IP address of the current host as
client-urls(for example,"http://192.168.100.113:2379"). If the cluster runs on Docker, specify the IP address of Docker as"http://0.0.0.0:2379".
advertise-client-urls
- The list of advertise URLs for the client to access PD
- Default value:
"${client-urls}" - In some situations such as in the Docker or NAT network environment, if a client cannot access PD through the default client URLs listened to by PD, you must manually set the advertise client URLs.
- For example, the internal IP address of Docker is
172.17.0.1, while the IP address of the host is192.168.100.113and the port mapping is set to-p 2380:2380. In this case, you can setadvertise-client-urlsto"http://192.168.100.113:2380". The client can find this service through"http://192.168.100.113:2380".
peer-urls
- The list of peer URLs to be listened to by a PD node
- Default value:
"http://127.0.0.1:2380" - When you deploy a cluster, you must specify
peer-urlsas the IP address of the current host, such as"http://192.168.100.113:2380". If the cluster runs on Docker, specify the IP address of Docker as"http://0.0.0.0:2380".
advertise-peer-urls
- The list of advertise URLs for other PD nodes (peers) to access a PD node
- Default:
"${peer-urls}" - In some situations such as in the Docker or NAT network environment, if the other nodes (peers) cannot access the PD node through the default peer URLs listened to by this PD node, you must manually set the advertise peer URLs.
- For example, the internal IP address of Docker is
172.17.0.1, while the IP address of the host is192.168.100.113and the port mapping is set to-p 2380:2380. In this case, you can setadvertise-peer-urlsto"http://192.168.100.113:2380". The other PD nodes can find this service through"http://192.168.100.113:2380".
initial-cluster
The initial cluster configuration for bootstrapping
Default value:
"{name}=http://{advertise-peer-url}"For example, if
nameis “pd”, andadvertise-peer-urlsis"http://192.168.100.113:2380", theinitial-clusteris"pd=http://192.168.100.113:2380".If you need to start three PD servers, the
initial-clustermight be:pd1=http://192.168.100.113:2380, pd2=http://192.168.100.114:2380, pd3=192.168.100.115:2380
initial-cluster-state
- The initial state of the cluster
- Default value:
"new"
initial-cluster-token
- Identifies different clusters during the bootstrap phase.
- Default value:
"pd-cluster" - If multiple clusters that have nodes with same configurations are deployed successively, you must specify different tokens to isolate different cluster nodes.
lease
- The timeout of the PD Leader Key lease. After the timeout, the system re-elects a Leader.
- Default value:
3 - Unit: second
tso-save-interval
- The interval for PD to allocate TSOs for persistent storage in etcd
- Default value:
3 - Unit: second
enable-prevote
- Enables or disables
raft prevote - Default value:
true
quota-backend-bytes
- The storage size of the meta-information database, which is 8GiB by default
- Default value:
8589934592
auto-compaction-mod
- The automatic compaction modes of the meta-information database
- Available options:
periodic(by cycle) andrevision(by version number). - Default value:
periodic
auto-compaction-retention
- The time interval for automatic compaction of the meta-information database when
auto-compaction-retentionisperiodic. When the compaction mode is set torevision, this parameter indicates the version number for the automatic compaction. - Default value: 1h
force-new-cluster
- Determines whether to force PD to start as a new cluster and modify the number of Raft members to
1 - Default value:
false
tick-interval
- The tick period of etcd Raft
- Default value:
100ms
election-interval
- The timeout for the etcd leader election
- Default value:
3s
use-region-storage
- Enables or disables independent Region storage
- Default value:
false
security
Configuration items related to security
cacert-path
- The path of the CA file
- Default value: "”
cert-path
- The path of the Privacy Enhanced Mail (PEM) file that contains the X509 certificate
- Default value: "”
key-path
- The path of the PEM file that contains the X509 key
- Default value: "”
redact-info-log
- Controls whether to enable log redaction in the PD log.
- When you set the configuration value to
true, user data is redacted in the PD log. - Default value:
false
log
Configuration items related to log
format
- The log format, which can be specified as “text”, “json”, or “console”
- Default value:
text
disable-timestamp
- Whether to disable the automatically generated timestamp in the log
- Default value:
false
log.file
Configuration items related to the log file
max-size
- 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
max-days
- The maximum number of days in which a log is kept
- Default value:
28 - Minimum value:
1
max-backups
- The maximum number of log files to keep
- Default value:
7 - Minimum value:
1
metric
Configuration items related to monitoring
interval
- The interval at which monitoring metric data is pushed to Prometheus
- Default value:
15s
schedule
Configuration items related to scheduling
max-merge-region-size
- 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
max-merge-region-keys
- Specifies the upper limit of the
Region Mergekey. When the Region key is greater than the specified value, the PD does not merge the Region with its adjacent Regions. - Default value:
200000
patrol-region-interval
- Controls the running frequency at which
replicaCheckerchecks the health state of a Region. The smaller this value is, the fasterreplicaCheckerruns. Normally, you do not need to adjust this parameter. - Default value:
100ms
split-merge-interval
- Controls the time interval between the
splitandmergeoperations on the same Region. That means a newly split Region will not be merged for a while. - Default value:
1h
max-snapshot-count
- 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
max-pending-peer-count
- 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
max-store-down-time
- 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
leader-schedule-limit
- The number of Leader scheduling tasks performed at the same time
- Default value:
4
region-schedule-limit
- The number of Region scheduling tasks performed at the same time
- Default value:
2048
hot-region-schedule-limit
- Controls the hot Region scheduling tasks that are running at the same time. It is independent of the Region scheduling.
- Default value:
4
hot-region-cache-hits-threshold
- The threshold used to set the number of minutes required to identify a hot Region. PD can participate in the hotspot scheduling only after the Region is in the hotspot state for more than this number of minutes.
- Default value:
3
replica-schedule-limit
- The number of Replica scheduling tasks performed at the same time
- Default value:
64
merge-schedule-limit
- The number of the
Region Mergescheduling tasks performed at the same time. Set this parameter to0to disableRegion Merge. - Default value:
8
high-space-ratio
- The threshold ratio below which the capacity of the store is sufficient. If the space occupancy ratio of the store is smaller than this threshold value, PD ignores the remaining space of the store when performing scheduling, and balances load mainly based on the Region size. This configuration takes effect only when
region-score-formula-versionis set tov1. - Default value:
0.7 - Minimum value: greater than
0 - Maximum value: less than
1
low-space-ratio
- The threshold ratio above which the capacity of the store is insufficient. If the space occupancy ratio of a store exceeds this threshold value, PD avoids migrating data to this store as much as possible. Meanwhile, to avoid the disk space of the corresponding store being exhausted, PD performs scheduling mainly based on the remaining space of the store.
- Default value:
0.8 - Minimum value: greater than
0 - Maximum value: less than
1
tolerant-size-ratio
- Controls the
balancebuffer size - Default value:
0(automatically adjusts the buffer size) - Minimum value:
0
enable-cross-table-merge
- Determines whether to enable the merging of cross-table Regions
- Default value:
true
region-score-formula-version
- Controls the version of the Region score formula
- Default value:
v2 - Optional values:
v1andv2
disable-remove-down-replica
- 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
disable-replace-offline-replica
- 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
disable-make-up-replica
- 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
disable-remove-extra-replica
- 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
disable-location-replacement
- 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
store-balance-rate
- Determines the maximum number of operations related to adding peers within a minute
- Type: Integer
- Default value:
15 - Minimum value:
0 - Maximum value:
200
enable-joint-consensus
- Controls whether to use Joint Consensus for replica scheduling. If this configuration is disabled, PD schedules one replica at a time.
- Default value:
true
replication
Configuration items related to replicas
max-replicas
- The number of replicas
- Default value:
3
location-labels
- The topology information of a TiKV cluster
- Default value:
[] - Cluster topology configuration
isolation-level
- The minimum topological isolation level of a TiKV cluster
- Default value:
"" - Cluster topology configuration
strictly-match-label
- Enables the strict check for whether the TiKV label matches PD’s
location-labels. - Default value:
false
enable-placement-rules
- Enables
placement-rules. - Default value:
false - See Placement Rules.
- An experimental feature of TiKV 4.0.
label-property
Configuration items related to labels
key
- The label key for the store that rejected the Leader
- Default value:
""
value
- The label value for the store that rejected the Leader
- Default value:
""
replication-mode
Configuration items related to the replication mode of all Regions. See Enable synchronous replication in PD configuration file for details.
[转帖]PD Config Learn the PD configuration file的更多相关文章
- No redirect found in host configuration file (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet.config).
Configuration Error Description: An error occurred during the processing of a configuration file req ...
- ASP.NET Web.config文件的配置(Configuration API)
本次我们讨论主要聚焦在以下Web.config配置文件的设置值的读取. 1.<connectionString />连接字符串的读取. 2.<appSettings />应用程 ...
- PowerDesigner 12小技巧-pd小技巧-pd工具栏不见了-pd修改外键命名规则-pd添加外键
PowerDesigner 12小技巧-pd小技巧-pd工具栏不见了-pd修改外键命名规则-pd添加外键 1. 附加:工具栏不见了 调色板(Palette)快捷工具栏不见了PowerDesigner ...
- spring cloud config center Git SSH configuration
Git SSH configuration using properties By default, the JGit library used by Spring Cloud Config Serv ...
- phpmyadmin Wrong permissions on configuration file, should not be world writable!
巴拉巴拉,实际场景是这样,因为有需要,所以想用django 做个rest服务给其他平台提供服务,发现以前正常的页面都无法运行,奇怪发现有一个页面提示连接不上mysql 难道mysql挂了,打开phpm ...
- springMVC+mybatis 进行单元测试时 main SqlSessionFactoryBean - Parsed configuration file: 'class path resource' 无限的读取xml文件
今天终于写完的Dao层的操作,怀着无比激动的心情,进行单元测试,就在最后一个方法,对的就是最后一个方法,启动单元测试就会报以下错误: [2016-05-11 18:25:01,691] [WARN ] ...
- This configuration file was broken by system-config-keyboard
posts • Page of problem with startx Postby evarie » // :: Normally i can get started with the x wind ...
- mac 启动php-fpm报错 failed to open configuration file '/private/etc/php-fpm.conf': No such file or direc
直接运行,有报错找不到配置文件. $ php-fpm [11-Jan-2014 16:03:03] ERROR: failed to open configuration file '/private ...
- “Invalid configuration file. File "I:/My Virtual Machines/Windows XP english Professional/Windows XP Professional.vmx" was created by a VMware product
“Invalid configuration file. File "I:/My Virtual Machines/Windows XP english Professional/Windo ...
- No configuration file found and no output filename configured via Cli option.报错
webpack手动配置webpack.config.js文件,打包时出现的报错,可以试试这种解决方案 报错如下: No configuration file found and no output f ...
随机推荐
- 14、Flutter Card卡片组件
Card是卡片组件块,内容可以由大多数类型的Widget构成,Card具有圆角和阴影,这让它看起来有立 体感. Card实现一个通讯录的卡片 class MyApp2 extends Stateles ...
- SVN工具基础知识
SVN工具基础知识 1.简介 1.全称Subversion,是一个开放源代码的版本控制系统,Subversion 在 2000 年由 CollabNet Inc 开发,现 在发展成为 Apache 软 ...
- Boost程序库完全开发指南:1-开发环境和构建工具
Boost官方于2019年12月发布的1.72版编写,共包含160余个库/组件,涵盖字符串与文本处理.容器.迭代器.算法.图像处理.模板元编程.并发编程等多个领域,使用Boost,将大大增强C++ ...
- C# 在Word中添加Latex 数学公式和符号
本篇内容介绍使用Spire.Doc for .NET在Word中添加Latex数学公式和符号的方法.编辑代码前,将Spire.Doc.dll文件添加引用至VS程序.dll文件包可通过官网下载导入(如果 ...
- Kmesh内核级流量治理,服务转发性能提升50%+
本文分享自华为云社区<DTSE Tech Talk | 第49期:Kmesh内核级流量治理,服务转发性能提升50%+!>,作者:华为云社区精选. 数据面时延开销,无法满足应用SLA诉求?内 ...
- 华为发布5GtoB核心网建设白皮书
摘要:近日,华为发布<5GtoB核心网建设白皮书>. 近日,华为发布<5GtoB核心网建设白皮书>.该白皮书从5GtoB市场特征和发展规律角度切入,深度剖析了产业需求和与之对应 ...
- 带你了解VXLAN网络中报文的转发机制
摘要:本节以集中式VXLAN网络(手工方式建立VXLAN隧道)为例,分别介绍相同子网内.不同子网间是如何进行通信的.在了解转发机制的前提下,我们先来看下VXLAN网关有哪些种类. VXLAN二层网关与 ...
- 消除数据孤岛,华为云DRS让一汽红旗ERP系统数据活起来
摘要:拒绝延时,华为云DRS实现一汽红旗ERP系统数据实时同步. 本文分享自华为云社区<消除数据孤岛,华为云DRS让一汽红旗ERP系统数据活起来>,原文作者:心机胖. 数字化时代,数据成为 ...
- 云图说|初识华为云数据库GaussDB(for openGauss)
摘要:本文带你了解华为云华为云数据库GaussDB(for openGauss),将AI 技术融入分布式数据库的全生命周期,实现自运维.自管理.自调优.故障自诊断和自愈. 本文分享自华为云社区< ...
- 云小课 | 网络知识一箩筐——NAT网关,让IP地址华丽变身,轻松实现内外网互通
阅识风云是华为云信息大咖,擅长将复杂信息多元化呈现,其出品的一张图(云图说).深入浅出的博文(云小课) 或短视频(云视厅)总有一款能让您快速上手华为云.更多精彩内容请单击此处. 摘要: 网络知识一箩筐 ...