当前位置:网站首页>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 .
边栏推荐
- TiDB数据迁移工具概览
- Socket and socket address
- CodeCraft-22 and Codeforces Round #795 (Div. 2)D,E
- Base64 coding can be understood this way
- LeetCode 2320. Count the number of ways to place the house
- LeetCode 2320. 统计放置房子的方式数
- Error: NPM warn config global ` --global`, `--local` are deprecated Use `--location=global` instead.
- 表格响应式布局小技巧
- IE 浏览器正式退休
- Full of knowledge points, how to use JMeter to generate encrypted data and write it to the database? Don't collect it quickly
猜你喜欢
随机推荐
TiDB数据迁移场景综述
TiDB 集群最小部署的拓扑架构
用户隐私协议有些汉字编码不规范导致网页显示乱码,需要统一找出来处理一下
MFC CString 转 char*
N皇后问题的解决
Add vector formula in rich text editor (MathType for TinyMCE, visual addition)
Socket and socket address
Database connection pool and data source
taobao. trades. sold. Get query the transaction data that the seller has sold (according to the creation time), Taobao store sales order query API interface, Taobao R2 interface, Taobao oauth2.0 trans
C thread transfer parameters
[noi Simulation Competition] scraping (dynamic planning)
Internet Explorer officially retired
Slashgear shares 2021 life changing technology products, which are somewhat unexpected
蜻蜓低代码安全工具平台开发之路
c语言入门--数组
07_哈希
btrace-(字节码)动态跟踪工具
Dragonfly low code security tool platform development path
AtCoder Beginner Contest 254
Li Chuang EDA learning notes 15: draw border or import border (DXF file)









