当前位置:网站首页>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
- 871. Minimum refueling times: simple priority queue (heap) greedy question
- GeoServer offline map service construction and layer Publishing
- Niuke Practice 101
- Base64 编码原来还可以这么理解
- TiDB 集群最小部署的拓扑架构
- Map介绍
- HUSTPC2022
- Factal: Unsafe repository is owned by someone else Solution
- 【C语音】详解指针进阶和注意点(2)
猜你喜欢

C语言习题---(数组)

kibana 基础操作

.NET Core 日志系统

C language exercises - (array)

Wechat applet uses towxml to display formula

LeetCode 209. Minimum length subarray

Simple verification code generator for 51 single chip microcomputer experiment

C#代码审计实战+前置知识

Add vector formula in rich text editor (MathType for TinyMCE, visual addition)

Map介绍
随机推荐
解决el-radio-group 回显后不能编辑问题
forEach的错误用法,你都学废了吗
MFC CString 转 char*
Obsidian installs third-party plug-ins - unable to load plug-ins
实用调试技巧
Fatal: unsafe repository is owned by someone else
Table responsive layout tips
How does CTO help the business?
【C语言】详解指针的初阶和进阶以及注意点(1)
List集合&UML图
TiDB混合部署拓扑
Ad20 cannot select the solution of component packaging in PCB editor
可视化搭建页面工具的前世今生
Btrace- (bytecode) dynamic tracking tool
TiDB数据迁移工具概览
tmall. product. schema. Get (product information acquisition schema acquisition), Taobao store upload commodity API interface, Taobao commodity publishing interface, Taobao commodity upload API interf
MFC CString to char*
Map介绍
C language exercises - (array)
[apipost] tutorial