当前位置:网站首页>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 .
边栏推荐
- C#延时、在线程中开启定时器、获取系统时间
- LeetCode_滑动窗口_中等_395.至少有 K 个重复字符的最长子串
- Li Chuang EDA learning notes 15: draw border or import border (DXF file)
- C语言中的printf函数和scanf函数
- 电脑怎么设置扬声器播放麦克风的声音
- Why can't programmers who can only program become excellent developers?
- Printf function and scanf function in C language
- CodeCraft-22 and Codeforces Round #795 (Div. 2)D,E
- 数据库内容输出有问题怎么解决
- 学习使用php实现公历农历转换的方法代码
猜你喜欢

Mavn 搭建 Nexus 私服

Socket and socket address

c语言入门--数组

CodeCraft-22 and Codeforces Round #795 (Div. 2)D,E

C language exercises - (array)

btrace-(字节码)动态跟踪工具

IE 浏览器正式退休

Base64 coding can be understood this way
![[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)
[email protected]: The platform “win32“ is incompatible with this module."/>info [email protected]: The platform “win32“ is incompatible with this module.
随机推荐
Add vector formula in rich text editor (MathType for TinyMCE, visual addition)
Ad20 cannot select the solution of component packaging in PCB editor
CodeCraft-22 and Codeforces Round #795 (Div. 2)D,E
LeetCode 209. 长度最小的子数组
C code audit practice + pre knowledge
How does CTO help the business?
qml 弹窗框架,可定制
MFC timer usage
tmall. product. schema. Get (product information acquisition schema acquisition), Taobao store upload commodity API interface, Taobao commodity publishing interface, Taobao commodity upload API interf
用户隐私协议有些汉字编码不规范导致网页显示乱码,需要统一找出来处理一下
LeetCode 2310. 个位数字为 K 的整数之和
[untitled] leetcode 2321 Maximum score of concatenated array
为什么只会编程的程序员无法成为优秀的开发者?
kityformula-editor 配置字号和间距
C#延时、在线程中开启定时器、获取系统时间
[QNX hypervisor 2.2 user manual]6.3 communication between guest and external
C # delay, start the timer in the thread, and obtain the system time
Why can't browsers read JSX?
Database connection pool and data source
MFC console printing, pop-up dialog box