TiDB TPC-C パフォーマンス テスト レポート -- v4.0 対 v3.0

テストの目的

このテストは、オンライン トランザクション処理 (OLTP) シナリオで TiDB 4.0 と TiDB 3.0 の TPC-C パフォーマンスを比較することを目的としています。

テスト環境(AWS EC2)

ハードウェア構成

サービスの種類EC2タイプインスタンス数
PDm5.xlarge3
TiKVi3.4xlarge3
TiDBc5.4xlarge3
TPC-Cm5.4x大1

ソフトウェアバージョン

サービスの種類ソフトウェアバージョン
PD3.0 と 4.0
TiDB3.0 と 4.0
TiKV3.0 と 4.0
ベンチマークSQLなし

パラメータ構成

TiDB v3.0 構成

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

TiKV v3.0 構成

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 構成

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

TiKV v4.0 構成

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.unified.min-thread-count: 5
readpool.unified.max-thread-count: 20
readpool.storage.normal-concurrency: 10
pessimistic-txn.pipelined: true

グローバル変数の構成

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 をコンパイルします。

      git clone https://github.com/pingcap/benchmarksql && cd benchmarksql && ant
      
    2. runディレクトリに入り、実際の状況に応じてprops.mysqlファイルを編集し、 connwarehousesloadWorkersterminals 、およびrunMins構成項目を変更します。

    3. runSQL.sh ./props.mysql sql.mysql/tableCreates.sqlコマンドを実行します。

    4. runSQL.sh ./props.mysql sql.mysql/indexCreates.sqlコマンドを実行します。

    5. MySQL クライアントを実行し、すべてのテーブルでanalyze tableのステートメントを実行します。

  3. runBenchmark.sh ./props.mysqlコマンドを実行します。

  4. 結果から New Order の tpmC データを抽出します。

テスト結果

テスト統計によると、TiDB v4.0 の TPC-C パフォーマンスは、TiDB v3.0 と比較して50% 向上しています。

TPC-C

エコシステム
TiDB
TiKV
TiFlash
TiSpark
Chaos Mesh
© 2023 PingCAP. All Rights Reserved.