当前位置:网站首页>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

边栏推荐
- Kotlin data flow - flow
- 智能金融再升级,景联文科技提供数据采集标注服务
- Jetpack - basic use of room
- Hidden and wx:if
- IIS batch bind domain name
- Computer network interview questions
- Scrcpy source code walk 2 how to connect a client to a mobile server
- 面试必刷算法TOP101之单调栈 TOP31
- Host computer development (Architecture Design of firmware download software)
- Notes on wechat applet development
猜你喜欢

如何使用望友DFM軟件進行冷板分析

ML之FE:Vintage曲线/Vintage分析的简介、计算逻辑、案例应用之详细攻略

景联文科技提供语音数据采集标注服务

牙周炎问题调研(持续进行中)

In kotlin?,!,?:,:, - & gt;、== Brief description of symbols

Common method of props changing value V-model sync

Learning notes of MySQL series by database and table

Do you want to carry out rapid steel mesh design and ensure the quality of steel mesh? Look here

Ffmpeg compressed video.

【sketchup 2021】草图大师的图像输出与渲染之样式说明【边线设置、平面设置、背景设置、水印设置、建模设置、天空背景创建天空、利用水印背景创建天空(重要)】
随机推荐
玄武云科技通过上市聆讯:业绩波动明显,陈永辉等三人为控股股东
Differences between SQL and NoSQL of mongodb series
Comment utiliser le logiciel wangyou DFM pour l'analyse des plaques froides
The new retail market has set off blind box e-commerce. Can the new blind box marketing model bring dividends to businesses?
Comprehensive overview of ijkplayer contour features for ijkplayer code walk through
16、 IO stream (II)
C # mapping from entity class to database (SQLite)
景联文科技提供语音数据采集标注服务
ML:机器学习模型的稳定性分析简介、常见的解决方法之详细攻略
Intelligent entertainment has developed steadily, and jinglianwen technology provides data collection and labeling services
Host computer development (Architecture Design of firmware download software)
髋关节MR详细图谱(转载)
不间断管理设计
'ipconfig' is not an internal or external command, nor is it a runnable program or batch file.
上位机开发(固件下载软件之编码调试)
JNI's bitmap grayscale image (rgba_8888 and rgb_565)
Periodontitis investigation (ongoing)
上位机开发(固件下载软件之架构设计)
测试开发程序员,你还在迷茫吗?不能把自己定义为码农......
Kotlin collaboration -- context and exception handling