Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 怎么设置"推荐 PD 和 TiKV 采用不同的磁盘" ?
I am reading the article Best Practices for Three-Node Hybrid Deployment, and I happen to be setting up such a cluster. However, I have two questions about the article:
-
In the article:
“Three physical machines, each with 16 CPU cores and 32 GB of memory. Each node (machine) has 1 TiDB (instance) + 1 TiKV (instance) + 1 PD (instance) deployed in a hybrid manner.”
So, does that mean there are a total of 3 TiDB + 3 TiKV + 3 PD across the three machines? -
In the article:
“Since both PD and TiKV store information on disk, the read and write latency of the disk will directly affect the service latency of PD and TiKV. To prevent PD and TiKV from competing for disk resources and affecting each other, it is recommended that PD and TiKV use different disks.”
How can I achieve using different disks for PD and TiKV? My current yml file is as follows, and I don’t see any parameters to set different disks:global: user: "root" ssh_port: 22 server_configs: pd: replication.location-labels: [host] tidb_servers: - host: 192.168.9.81 port: 4000 status_port: 10080 - host: 192.168.9.82 port: 4000 status_port: 10080 - host: 192.168.9.83 port: 4000 status_port: 10080 pd_servers: - host: 192.168.9.81 client_port: 2379 peer_port: 2380 - host: 192.168.9.82 client_port: 2379 peer_port: 2380 - host: 192.168.9.83 client_port: 2379 peer_port: 2380 tikv_servers: - host: 172.168.9.81 port: 20160 status_port: 10080 deploy_dir: "/data/sdc/tikv-cluster/tikv-deploy" data_dir: "/data/sdc/tikv-cluster/tikv-data" config: server.labels: host: "tikv-81" - host: 192.168.9.82 port: 20160 status_port: 10080 deploy_dir: "/data/sdc/tikv-cluster/tikv-deploy" data_dir: "/data/sdc/tikv-cluster/tikv-data" config: server.labels: host: "tikv-82" - host: 192.168.9.83 port: 20160 status_port: 10080 deploy_dir: "/data/sdc/tikv-cluster/tikv-deploy" data_dir: "/data/sdc/tikv-cluster/tikv-data" config: server.labels: host: "tikv-83"
What parameters should I use to set the directory for PD? For example, TiKV has
data_dir
anddeploy_dir
, but what about PD? Can I also adddata_dir
anddeploy_dir
for PD? Where can I find documentation about these parameters? I checked in tiup but couldn’t find it, probably because I didn’t look in the right place.