当前位置:网站首页>Tikv key performance parameters and optimization
Tikv key performance parameters and optimization
2022-06-13 06:49:00 【Lao Wang's notes】
TiKV The overall architecture


Focus on three modules :Transaction、Raft、 RocksDB
Focus on the thread pool of these three modules
- scheduler Pool: Coordinate concurrent write conflicts of things , And write down the received modification operation ;
- raftstore thread: After receiving the write request , Convert a write request to raft journal ;raft The log will be stored in rocksdb raft in , Parallel transmission
- apply thread: from rocksdb raft Read the log in , Applied to the rocksdb kv, So as to complete the data persistence
TiKV Read and write flow

Write request from TiDB The incoming to scheduler pool,scheduler pool Responsible for coordinating concurrent write conflicts ; If there are multiple write requests to write the same KEY Or when you encounter a lock ,scheduler pool adopt latch To line up , To succeed in latch You can go on and pass it on to raftstore pool, Other write requests continue to wait ;
raftstore pool Will convert the write request to write log raft log, raft log One side will fall to raft Master rocksdb raft log, In addition, it will be sent to follower node ;
apply pool Will raft log Apply to local rocksdb kv, Complete data persistence ;

Follow the flow chart above to see which part of the monitoring system is elevated , If which position is raised , You can adjust the corresponding parameters according to the following figure ( Turn it up properly );
store-pool-size: Default processing raft Number of thread pools , Default 2;
store-max-bach-size: By default, each batch of requests rows Number , Default 256
raft-max-inflight-msgs: If exceeded raft log The number of write waits exceeds raft-max-inflight-msgs, Will slow down the writing , Carry out current limiting ;
apply-pool-size: The number of threads processing data dropping ;
apply-max-batch-size: Number of requests processed in batch ;
TiKV Read process
Check the process :

Non click Check process

Read bottleneck analysis


readpool.unified.max-thread-count: Read thread pool
storage.block-cache.capacity: Block Cache The amount of , If you find that Block Cache Low hit rate , It can be increased properly , This value usually takes up... Of the machine memory 45-60%
split.qps-threshold, Default 3000
split.byte-threshold, Default 30MB/s, When this value is reached, it will default to region Break up , Thus dispersing hot spots ;
common problem

边栏推荐
- [virtual machine] VMware virtual machine occupies too much space. Solution
- Hidden and wx:if
- Notepad++ settings delete current line shortcut
- JetPack - - - DataBinding
- How to quickly support the team leader to attract new fission users in the business marketing mode of group rebate?
- JNI exception handling
- JetPack - - -WorkManger
- Upper computer development (detailed design of firmware download software)
- 智能文娱稳步发展,景联文科技提供数据采集标注服务
- 景联文科技:数据采集标注行业现状及解决方案
猜你喜欢

如何从头自己制作开发板?图文并茂,一步步操作给你看。

What is the essence of social e-commerce disruption? How can businesses get more traffic?

105. 从前序与中序遍历序列构造二叉树

Computer network interview questions

【虚拟机】 VMware虚拟机占用空间过大解决

That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?

Will the chain 2+1 model be a new business outlet and a popular Internet e-commerce market?

Learning notes of MySQL series by database and table

Machine learning notes - supervised learning memo list
![[cloud native | kubernetes] kubernetes configuration](/img/cb/20595d34a9e203b83dd086cc27037d.png)
[cloud native | kubernetes] kubernetes configuration
随机推荐
JetPack - - - DataBinding
Jfinal uses freemaker to output map.
Comprehensive overview of ijkplayer contour features for ijkplayer code walk through
景联文科技:数据采集标注行业现状及解决方案
Outil de formatage du temps - mode. JS (affichage en temps réel du temps Web)
【sketchup 2021】草图大师中CAD文件的导入与建模(利用cad图纸在草图大师中建立立面模型)、草图大师导出成品为dwg格式的二维、三维、立面效果到cad中打开预览】
Command line for database
How to make a development board from scratch? Illustrated and illustrated, step by step operation for you to see.
髋关节MR详细图谱(转载)
Kotlin collaboration channel
Socket programming server and client (multiple clients can connect to the same port of a server at the same time)
Host computer development (Architecture Design of firmware download software)
Ijkplayer code walk through H264 unpacker application details
Cocos creator compilation game cannot read property 'polygonpolygon' of undefined
Two uses of bottomsheetbehavior
Eureka server multi node deployment
Kotlin collaboration - flow+room database
数字时代进化论
Learning notes of MySQL series by database and table
Gold jewelry enterprise operation mode, beautiful tiantians business solution