Transaction module (transaction module)
shceduler pool: coordinate transaction concurrent write conflicts
Rafttml2 module: convert write requests into raft logs, write locally and copy to other nodes
raftstore thread:
RocksDB module: apply raft logs to rocksdb, perform data persistence
apply thread:
2. Write process
1, scheduler-worker-pool-size
scheduler The number of threads is mainly responsible for the transaction consistency check before writing. If the number of cores of CPU is greater than or equal to 16, the default is 8; otherwise, the default is 4.
2, store-max-batch-size
The maximum number of requests processed in one round.
3 and store-pool-size
represent the number of thread in thread pool that processes Raft, that is, the size of the Raftstore thread pool.
4, raft-max-inflight-msgs
The number of logs to be confirmed. If this number exceeds, the number of logs will be slowed down.
5, apply-pool-size
, the number of threads in the thread pool that processes data drops.
6, apply-max-batch-size
The maximum number of requests to process data in one round.
3. Reading process
readpool.unified.max-thread-countt
unified thread pool number that handles read requests, that is, the size of the UnifyReadPool thread pool.
storage.block-cache.capacity
Share the size of block cache
split.qps-threshold
Executes load-base-split threshold for Region. If the QPS of a Region's read request exceeds qps-threshold for a period of time, then split the threshold for load-base-split on the Region
to execute load-base-split on the Region. If the traffic of a region's read request exceeds byte-threshold for a period of time, then divide the Region
point check:
non-point check:
4. Write Stall phenomenon
5. Slow query
small table hotspot
index hotspot
index hotspot
CPU resources are insufficient
Unified read bottleneck
Storage read pool bottleneck
execution plan is unreasonable (full table scan)