TiDBTPC-Cパフォーマンステストレポート-v4.0とv3.0
テスト目的
このテストは、オンライントランザクション処理(OLTP)シナリオでのTiDB4.0とTiDB3.0のTPC-Cパフォーマンスを比較することを目的としています。
テスト環境(AWS EC2)
ハードウェア構成
サービスの種類 | EC2タイプ | インスタンス数 |
---|---|---|
PD | m5.xlarge | 3 |
TiKV | i3.4xlarge | 3 |
TiDB | c5.4xlarge | 3 |
TPC-C | m5.4xlarge | 1 |
ソフトウェアバージョン
サービスの種類 | ソフトウェアバージョン |
---|---|
PD | 3.0および4.0 |
TiDB | 3.0および4.0 |
TiKV | 3.0および4.0 |
BenchmarkSQL | なし |
パラメータ設定
TiDBv3.0構成
log.level: "error"
performance.max-procs: 20
prepared-plan-cache.enabled: true
tikv-client.max-batch-wait-time: 2000000
TiKVv3.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
TiDBv4.0構成
log.level: "error"
performance.max-procs: 20
prepared-plan-cache.enabled: true
tikv-client.max-batch-wait-time: 2000000
TiKVv4.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;
テスト計画
TiUPを使用してTiDBv4.0およびv3.0をデプロイします。
BenchmarkSQLを使用して、TPC-C5000ウェアハウスデータをインポートします。
- BenchmarkSQLのコンパイル:
```bash
git clone https://github.com/pingcap/benchmarksql && cd benchmarksql && ant
```
2. `run`ディレクトリに入り、実際の状況に応じて`props.mysql`ファイルを編集し、 `conn` 、および`warehouses`の構成項目を`terminals` `runMins` `loadWorkers` 。
3. `runSQL.sh ./props.mysql sql.mysql/tableCreates.sql`コマンドを実行します。
4. `runSQL.sh ./props.mysql sql.mysql/indexCreates.sql`コマンドを実行します。
5. MySQLクライアントを実行し、すべてのテーブルで`analyze table`のステートメントを実行します。
runBenchmark.sh ./props.mysql
コマンドを実行します。結果からNewOrderのtpmCデータを抽出します。
テスト結果
テスト統計によると、TiDB v4.0のTPC-Cパフォーマンスは、TiDB v3.0のパフォーマンスと比較して50%向上しています。