当前位置:网站首页>Tidb hybrid deployment topology
Tidb hybrid deployment topology
2022-07-02 15:08:00 【Tianxiang shop】
In this paper, TiDB Clustered TiKV and TiDB Hybrid deployment topology and main parameters . Common scenarios are , The deployer is multi-channel CPU processor , There's plenty of memory , To improve the utilization of physical machine resources , Single machine multi instance deployment , namely TiDB、TiKV adopt numa To nuclear , Isolation CPU resources .PD and Prometheus Mixed deployment , But the data directories of both need to use independent file systems .
Topology information
| example | Number | Physical machine configuration | IP | To configure |
|---|---|---|---|---|
| TiDB | 6 | 32 VCore 64GB | 10.0.1.1 10.0.1.2 10.0.1.3 | To configure numa Binding operation |
| PD | 3 | 16 VCore 32 GB | 10.0.1.4 10.0.1.5 10.0.1.6 | To configure location_labels Parameters |
| TiKV | 6 | 32 VCore 64GB | 10.0.1.7 10.0.1.8 10.0.1.9 | 1. Distinguish instance level port、status_port; 2. Configure global parameters readpool、storage as well as raftstore; 3. Configure instance level host Dimensional labels; 4. To configure numa Binding operation |
| Monitoring & Grafana | 1 | 4 VCore 8GB * 1 500GB (ssd) | 10.0.1.10 | The default configuration |
Topology template
Simple mixed part configuration template
Detailed mix configuration template
above TiDB In the cluster topology file , See adopt TiUP Deploy TiDB Cluster topology file configuration .
Introduction to key parameters of hybrid deployment
This section introduces the key parameters of single machine multi instance , It is mainly used for TiDB、TiKV Single machine multi instance deployment scenario . You need to follow the calculation formula provided , Fill the results in the configuration template of the previous step .
TiKV Make configuration optimization
readpool Thread pool adaptation , To configure
readpool.unified.max-thread-countParameters can makereadpool.storageandreadpool.coprocessorShare a unified route pool , At the same time, adaptive switches should be set separately .Turn on
readpool.storageandreadpool.coprocessor:readpool.storage.use-unified-pool: true readpool.coprocessor.use-unified-pool: trueThe calculation formula is as follows :
readpool.unified.max-thread-count = cores * 0.8 / TiKV Number
storage CF (all RocksDB column families) Memory adaptation , To configure
storage.block-cache.capacityParameters can be implemented CF Automatically balance memory usage .storage.block-cacheDefault on CF The adaptive , There is no need to modify .storage.block-cache.shared: trueThe calculation formula is as follows :
storage.block-cache.capacity = (MEM_TOTAL * 0.5 / TiKV Number of instances )
If more than one TiKV Instances are deployed on the same physical disk , Need to be in tikv Add in configuration capacity Parameters :
raftstore.capacity = Total disk capacity / TiKV Number of instances
label Scheduling configuration
Due to the single machine multi instance deployment TiKV, To avoid physical downtime leading to Region Group Default 3 Replica 2 Copy lost , Problems that make the cluster unavailable , Can pass label To achieve PD Intelligent scheduling , Ensure that there are many machines on the same machine TiKV Instances will not appear Region Group Only 2 The situation of the copy .
TiKV To configure
The same physical machine has the same configuration host Level label Information :
config: server.labels: host: tikv1PD To configure
PD Need configuration labels Type to identify and schedule Region:
pd: replication.location-labels: ["host"]
numa_nodeTo nuclearConfigure the corresponding... In the instance parameter module
numa_nodeParameters , And add the corresponding physical CPU The number of nuclear ;numa Before binding core for use , Confirm that it has been installed numactl Tools , And the physical machine corresponding to the physical machine CPU After , Then configure the parameters ;
numa_nodeThis configuration parameter is similar tonumactl --membindConfiguration correspondence .
Be careful
- When editing the profile template , Pay attention to modifying the necessary parameters 、IP、 Port and directory .
- Of each component deploy_dir, By default global Medium
<deploy_dir>/<components_name>-<port>. for example tidb Port designation 4001, be deploy_dir The default is '/tidb-deploy/tidb-4001'. therefore , When specifying a non default port in a multi instance scenario , There is no need to specify the directory again . - There is no need to manually create
tidbuser ,TiUP cluster The component will automatically create the user on the deployment host . You can customize the user , It can also be consistent with the users of the central control computer . - If the deployment directory is configured as a relative path , It will be deployed in the user's home directory .
边栏推荐
- 华为面试题: 没有回文串
- Wechat applet uses towxml to display formula
- mathML转latex
- Find the maximum inscribed circle of the contour
- Jenkins Pipeline 应用与实践
- 2021-2022學年編譯原理考試重點[華僑大學]
- Makefile separates file names and suffixes
- 可视化搭建页面工具的前世今生
- C # delay, start the timer in the thread, and obtain the system time
- Record an interview
猜你喜欢
![[development environment] install the visual studio community 2013 development environment (download the installation package of visual studio community 2013 with update 5 version)](/img/7b/2c471c070a3faa981f70136603495a.jpg)
[development environment] install the visual studio community 2013 development environment (download the installation package of visual studio community 2013 with update 5 version)

It's no exaggeration to say that this is the most user-friendly basic tutorial of pytest I've ever seen

【无标题】LeetCode 2321. 拼接数组的最大分数

Dragonfly low code security tool platform development path

蜻蜓低代码安全工具平台开发之路

vChain: Enabling Verifiable Boolean Range Queries over Blockchain Databases(sigmod‘2019)

LeetCode 2320. Count the number of ways to place the house

LeetCode 2310. The number of digits is the sum of integers of K

Internet Explorer officially retired

微信小程序使用towxml显示公式
随机推荐
Why can't programmers who can only program become excellent developers?
Reuse and distribution
Base64 编码原来还可以这么理解
数据库内容输出有问题怎么解决
Solve the problem that El radio group cannot be edited after echo
为什么只会编程的程序员无法成为优秀的开发者?
C语言中的printf函数和scanf函数
使用 TiUP 部署 TiDB 集群
数据分析常见的英文缩写(一)
Apprendre le Code de la méthode de conversion du calendrier lunaire grégorien en utilisant PHP
Yolov6 training: various problems encountered in training your dataset
Fundamentals of software testing
mathML转latex
Map介绍
[c voice] explain the advanced pointer and points for attention (2)
Onnx+tensorrt: write preprocessing operations to onnx and complete TRT deployment
LeetCode_滑动窗口_中等_395.至少有 K 个重复字符的最长子串
编译原理课程实践——实现一个初等函数运算语言的解释器或编译器
Mavn 搭建 Nexus 私服
CodeCraft-22 and Codeforces Round #795 (Div. 2)D,E