Skip to content

Latest commit

 

History

History
111 lines (74 loc) · 4.36 KB

v6.5-performance-benchmarking-with-tpcc.md

File metadata and controls

111 lines (74 loc) · 4.36 KB
title summary
TiDB Cloud TPC-C Performance Test Report for TiDB v6.5.6
Introduce the TPC-C performance test results for a TiDB Cloud Dedicated cluster with the TiDB version of v6.5.6.

TiDB Cloud TPC-C Performance Test Report for TiDB v6.5.6

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

Test overview

This test aims at showing the TPC-C performance of TiDB v6.5.6 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: v6.5.6

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

  • Cluster configuration:

    Node type Node size Node quantity Node storage
    TiDB 16 vCPU, 32 GiB 2 N/A
    TiKV 16 vCPU, 64 GiB 3 1000 GiB

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 v6.5.6 in the test environment is as follows:

Threads v6.5.6 tpmC
50 44183
100 74424
200 101545

TPC-C