TiDB TPC-C パフォーマンス テスト レポート - v4.0 と v3.0 の比較
テスト目的
このテストの目的は、オンライン トランザクション処理 (OLTP) シナリオにおける TiDB 4.0 と TiDB 3.0 の TPC-C パフォーマンスを比較することです。
テスト環境(AWS EC2)
ハードウェア構成
サービスタイプ | EC2タイプ | インスタンス数 |
---|---|---|
PD | m5.特大 | 3 |
ティクヴ | i3.4xlarge | 3 |
ティビ | c5.4xラージ | 3 |
TPC-C | m5.4xラージ | 1 |
ソフトウェアバージョン
サービスタイプ | ソフトウェアバージョン |
---|---|
PD | 3.0 と 4.0 |
ティビ | 3.0 と 4.0 |
ティクヴ | 3.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.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;
テスト計画
TiUPを使用して TiDB v4.0 および v3.0をデプロイ。
BenchmarkSQL を使用して、TPC-C 5000 Warehouse データをインポートします。
BenchmarkSQL をコンパイルします。
git clone https://github.com/pingcap/benchmarksql && cd benchmarksql && antrun
ディレクトリに入り、実際の状況に応じてprops.mysql
ファイルを編集し、conn
、warehouses
、loadWorkers
、terminals
、runMins
設定項目を変更します。runSQL.sh ./props.mysql sql.mysql/tableCreates.sql
コマンドを実行します。runSQL.sh ./props.mysql sql.mysql/indexCreates.sql
コマンドを実行します。MySQL クライアントを実行し、各テーブルに対して
analyze table
ステートメントを実行します。
runBenchmark.sh ./props.mysql
コマンドを実行します。結果からNew OrderのtpmCデータを抽出します。
テスト結果
テスト統計によると、TiDB v4.0 の TPC-C パフォーマンスは TiDB v3.0 と比較して 50% 向上しました。