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

    测试环境 (AWS EC2)

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

    TiDB v3.0 参数配置

    TiKV v3.0 参数配置

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

    TiDB v4.0 参数配置

    TiKV v4.0 参数配置

    1. storage.scheduler-worker-pool-size: 5
    2. raftstore.store-pool-size: 3
    3. rocksdb.max-background-jobs: 3
    4. raftdb.max-background-jobs: 3
    5. raftdb.allow-concurrent-memtable-write: true
    6. server.grpc-concurrency: 6
    7. readpool.unified.min-thread-count: 5
    8. readpool.unified.max-thread-count: 20
    9. readpool.storage.normal-concurrency: 10
    10. pessimistic-txn.pipelined: true

    全局变量配置

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

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

      1. 编译 BenchmarkSQL:

        1. git clone https://github.com/pingcap/benchmarksql && cd benchmarksql && ant
      2. 运行 runSQL.sh ./props.mysql sql.mysql/tableCreates.sql 命令。

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

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

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

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