TiDB Cloud TPC-C Performance Test Report for TiDB v8.1.0

This document provides the TPC-C performance test steps and results for a TiDB Cloud Dedicated cluster with the TiDB version of v8.1.0. This report can also be used as a reference for the performance of TiDB Self-Managed v8.1.0 clusters.

Test overview

This test aims at showing the TPC-C performance of TiDB v8.1.0 in the Online Transactional Processing (OLTP) scenario.

Test environment

TiDB cluster

The test is conducted on a TiDB cluster with the following settings:

  • Cluster type: TiDB Cloud Dedicated

  • Cluster version: v8.1.0

  • Cloud provider: AWS (us-west-2)

  • Cluster configuration:

    Node typeNode sizeNode quantityNode storage
    TiDB16 vCPU, 32 GiB2N/A
    TiKV16 vCPU, 64 GiB31000 GiB

Parameter configuration

The TiKV parameter prefill-for-recycle can make log recycling effective immediately after initialization. This document conducts tests with prefill-for-recycle enabled:

raft-engine.prefill-for-recycle = true

Benchmark executor

The benchmark executor sends SQL queries to the TiDB cluster. In this test, its hardware configuration is as follows:

  • Machine type: Amazon EC2 (us-west-2)
  • Instance type: c6a.2xlarge

Test steps

This section introduces how to perform the TPC-C performance test step by step.

  1. In the TiDB Cloud console, create a TiDB Cloud Dedicated cluster that meets the test environment requirements.

    For more information, see Create a TiDB Cloud Dedicated cluster.

  2. On the benchmark executor, connect to the newly created cluster and create a database named tpcc.

    To connect to the cluster, see Connect to TiDB Cloud Dedicated via Private Endpoint.

    To create the tpcc database, execute the following SQL statement:

    CREATE DATABASE tpcc;
  3. Load TPC-C data to the tpcc database.

    1. The test in this document is implemented based on go-tpc. You can download the test program using the following command:

      curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/pingcap/go-tpc/master/install.sh | sh
    2. Run the following go-tpc tpcc command to import 1,000 warehouses to the tpcc database. Replace ${HOST}, ${THREAD}, and ${PASSWORD} with your actual values. This document conducts three tests with the ${THREAD} value of 50, 100, and 200.

      go-tpc tpcc --host ${HOST} --warehouses 1000 prepare -P 4000 -D tpcc -T ${THREAD} --time 2h0m0s -p ${PASSWORD} --ignore-error
  4. To ensure that the TiDB optimizer can generate the optimal execution plan, execute the following SQL statements to collect statistics before conducting the TPC-C test:

    ANALYZE TABLE customer; ANALYZE TABLE district; ANALYZE TABLE history; ANALYZE TABLE item; ANALYZE TABLE new_order; ANALYZE TABLE order_line; ANALYZE TABLE orders; ANALYZE TABLE stock; ANALYZE TABLE warehouse;

    To accelerate the collection of statistics, execute the following SQL statements before collecting:

    SET tidb_build_stats_concurrency=16; SET tidb_distsql_scan_concurrency=16; SET tidb_index_serial_scan_concurrency=16;
  5. Run the following go-tpc tpcc command to conduct stress tests on the TiDB Cloud Dedicated cluster. For each concurrency, the test takes two hours.

    go-tpc tpcc --host ${HOST} -P 4000 --warehouses 1000 run -D tpcc -T ${THREAD} --time 2h0m0s -p ${PASSWORD} --ignore-error
  6. Extract the tpmC data of NEW_ORDER from the result.

    TPC-C uses tpmC (transactions per minute) to measure the maximum qualified throughput (MQTh, Max Qualified Throughput). The transactions are the NewOrder transactions and the final unit of measure is the number of new orders processed per minute.

Test results

The TPC-C performance of v8.1.0 in the test environment is as follows:

Threadsv8.1.0 tpmC
5043,660
10075,495
200102,013

TPC-C

Was this page helpful?