TiDB TPC-C Performance Test Report -- v5.0 vs. v4.0

Test purpose

This test aims at comparing the TPC-C performance of TiDB v5.0 and TiDB v4.0 in the Online Transactional Processing (OLTP) scenario.

Test environment (AWS EC2)

Hardware configuration

Service typeEC2 typeInstance count
PDm5.xlarge3
TiKVi3.4xlarge3
TiDBc5.4xlarge3
TPC-Cc5.9xlarge1

Software version

Service typeSoftware version
PD4.0 and 5.0
TiDB4.0 and 5.0
TiKV4.0 and 5.0
BenchmarkSQLNone

Parameter configuration

TiDB v4.0 configuration

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

TiKV v4.0 configuration

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

TiDB v5.0 configuration

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

TiKV v5.0 configuration

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

TiDB v4.0 global variable configuration

set global tidb_hashagg_final_concurrency=1; set global tidb_hashagg_partial_concurrency=1;

TiDB v5.0 global variable configuration

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;

Test plan

  1. Deploy TiDB v5.0 and v4.0 using TiUP.

  2. Use BenchmarkSQL to import the TPC-C 5000 Warehouse data.

    1. Compile BenchmarkSQL:

      git clone https://github.com/pingcap/benchmarksql && cd benchmarksql && ant
    2. Enter the run directory, edit the props.mysql file according to the actual situation, and modify the conn, warehouses, loadWorkers, terminals, and runMins configuration items.

    3. Execute the runSQL.sh ./props.mysql sql.mysql/tableCreates.sql command.

    4. Execute the runSQL.sh ./props.mysql sql.mysql/indexCreates.sql command.

    5. Run MySQL client and execute the analyze table statement on every table.

  3. Execute the runBenchmark.sh ./props.mysql command.

  4. Extract the tpmC data of New Order from the result.

Test result

According to the test statistics, the TPC-C performance of TiDB v5.0 has increased by 36% compared with that of TiDB v4.0.

TPC-C

Was this page helpful?