调整几个参数试试:
tidb配置文件:
log.level: “error”
prepared-plan-cache.enabled: true
tikv-client.max-batch-wait-time: 2000000
tikv配置文件:
raftstore.apply-max-batch-size: 2048
raftstore.apply-pool-size: 3
raftstore.store-max-batch-size: 2048
raftstore.store-pool-size: 2
readpool.storage.normal-concurrency: 10
server.grpc-concurrency: 6
enable-async-apply-prewrite: true
enable-log-recycle : true
compression-per-level
- 每一层默认压缩算法。
-
defaultcf
的默认值:[“no”, “no”, “lz4”, “lz4”, “lz4”, “zstd”, “zstd”] -
writecf
的默认值:[“no”, “no”, “lz4”, “lz4”, “lz4”, “zstd”, “zstd”] -
lockcf
的默认值:[“no”, “no”, “no”, “no”, “no”, “no”, “no”]
defaultcf 修改为[“no”, “no”, “zstd”, “zstd”, “zstd”, “zstd”, “zstd”]
全局变量:
set global tidb_hashagg_final_concurrency=1;
set global tidb_hashagg_partial_concurrency=1;
set global tidb_enable_async_commit = 1;
set global tidb_enable_1pc = 1;
set global tidb_guarantee_linearizability = 0;
set global tidb_enable_clustered_index = 1;
set global tidb_prepared_plan_cache_size=1000;
set global tidb_enable_stmt_summary = off;
再试试,看看tpmc大小