Analysis of tikv_storage_async_request Metric Statistics

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tikv_storage_async_request指标统计结果分析

| username: HoniiTro19

[TiDB Version] v6.0.0
[Cluster Parameters]

# Disable cluster hotspot scheduling and region splitting
tiup ctl:v6.0.0 pd config set leader-schedule-limit 0
tiup ctl:v6.0.0 pd config set region-schedule-limit 0
tiup ctl:v6.0.0 pd config set hot-region-schedule-limit 0
tiup ctl:v6.0.0 pd config set hot-region-cache-hits-threshold 60
tiup ctl:v6.0.0 pd config set replica-schedule-limit 0
tiup ctl:v6.0.0 pd config set merge-schedule-limit 0
set config tikv split.qps-threshold=1000000;
set config tikv split.byte-threshold=10000000;

[Encountered Problem]
When running a high-conflict experiment, performing select for update on a single row of data, all queries fall on the same region. Observing the statistics on the TiDB dashboard, it can be seen that the number of tikv_storage_async_request requests on the node where the region leader is located (10.24.14.22) is very high.
My question is why do other nodes also have write and snapshot requests?

| username: xiaohetao | Original post link

Under normal circumstances, the leader role is prioritized. If the leader is busy, the follower will handle some of the read requests. However, this depends on the tidb_replica_read parameter. Check how tidb_replica_read is configured in your cluster.

| username: HoniiTro19 | Original post link

Hello, in the cluster, tidb_replica_read is set to leader, and all my load consists of select for update + update. I don’t think the requests will be sent to the follower nodes.

| username: h5n1 | Original post link

Even without business activities, there will still be some internal activities within the database. Updating data and executing SQL will involve statistics updates and loading, such as stats_meta. You can check the SQL analysis for other SQLs apart from business SQLs.

| username: xiaohetao | Original post link

The configuration is for the leader, so the write operations on the follower nodes should be related to the Raft log and internal cluster scheduling.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.