Skip to content

Latest commit

 

History

History
132 lines (93 loc) · 3.07 KB

v4.0-performance-benchmarking-with-tpcc.md

File metadata and controls

132 lines (93 loc) · 3.07 KB
title aliases
TiDB TPC-C 性能对比测试报告 - v4.0 对比 v3.0
/docs-cn/dev/benchmark/v4.0-performance-benchmarking-with-tpcc/

TiDB TPC-C 性能对比测试报告 - v4.0 对比 v3.0

测试目的

测试对比 TiDB v4.0 和 v3.0 OLTP 场景下的性能。

测试环境 (AWS EC2)

硬件配置

服务类型 EC2 类型 实例数
PD m5.xlarge 3
TiKV i3.4xlarge 3
TiDB c5.4xlarge 3
TPC-C m5.4xlarge 1

软件版本

服务类型 软件版本
PD 3.0、4.0
TiDB 3.0、4.0
TiKV 3.0、4.0
BenchmarkSQL

配置参数

TiDB v3.0 参数配置

{{< copyable "" >}}

log.level: "error"
performance.max-procs: 20
prepared-plan-cache.enabled: true
tikv-client.max-batch-wait-time: 2000000

TiKV v3.0 参数配置

{{< copyable "" >}}

storage.scheduler-worker-pool-size: 5
raftstore.store-pool-size: 3
raftstore.apply-pool-size: 3
rocksdb.max-background-jobs: 3
raftdb.max-background-jobs: 3
raftdb.allow-concurrent-memtable-write: true
server.grpc-concurrency: 6
readpool.storage.normal-concurrency: 10
readpool.coprocessor.normal-concurrency: 5

TiDB v4.0 参数配置

{{< copyable "" >}}

log.level: "error"
performance.max-procs: 20
prepared-plan-cache.enabled: true
tikv-client.max-batch-wait-time: 2000000

TiKV v4.0 参数配置

{{< copyable "" >}}

storage.scheduler-worker-pool-size: 5
raftstore.store-pool-size: 3
raftstore.apply-pool-size: 3
rocksdb.max-background-jobs: 3
raftdb.max-background-jobs: 3
raftdb.allow-concurrent-memtable-write: true
server.request-batch-enable-cross-command: false
server.grpc-concurrency: 6
readpool.unifiy-read-pool: true
readpool.unified.min-thread-count: 5
readpool.unified.max-thread-count: 20
readpool.storage.normal-concurrency: 10
pessimistic-txn.pipelined: true

全局变量配置

{{< copyable "sql" >}}

set global tidb_hashagg_final_concurrency=1;
set global tidb_hashagg_partial_concurrency=1;
set global tidb_disable_txn_auto_retry=0;

测试方案

  1. 通过 TiUP 部署 TiDB v4.0 和 v3.0。

  2. 通过 BenchmarkSQL 导入 TPC-C 5000 Warehouse 数据。

    1. 编译 BenchmarkSQL:

      {{< copyable "bash" >}}

      git clone https://github.com/pingcap/benchmarksql && cd benchmarksql && ant
    2. 进入 run 目录,根据实际情况编辑 props.mysql 文件,调整 connwarehousesloadWorkersterminalsrunMins 配置项。

    3. 运行 runSQL.sh ./props.mysql sql.mysql/tableCreates.sql 命令。

    4. 运行 runSQL.sh ./props.mysql sql.mysql/indexCreates.sql 命令。

    5. 运行 MySQL client 并对每个表执行 analyze table 语句。

  3. 运行 runBenchmark.sh ./props.mysql 命令。

  4. 从结果中提取 New Order 的 tpmC 的数据。

测试结果

v4.0 比 v3.0 在 TPC-C 性能上提升了 50%

TPC-C