TiDB Sysbench パフォーマンス テスト レポート -- v5.1.0 対 v5.0.2

テストの概要

このテストは、オンライン トランザクション処理 (OLTP) シナリオで TiDB v5.1.0 と TiDB v5.0.2 の Sysbench パフォーマンスを比較することを目的としています。結果は、v5.0.2 と比較して、v5.1.0 の Point Select パフォーマンスが 19.4% 向上し、Read Write および Update Index のパフォーマンスがわずかに低下したことを示しています。

テスト環境(AWS EC2)

ハードウェア構成

サービスの種類EC2タイプインスタンス数
PDm5.xlarge3
TiKVi3.4xlarge3
TiDBc5.4xlarge3
シスベンチc5.9xlarge1

ソフトウェアバージョン

サービスの種類ソフトウェアバージョン
PDv5.0.2 および v5.1.0
TiDBv5.0.2 および v5.1.0
TiKVv5.0.2 および v5.1.0
シスベンチ1.0.20

パラメータ構成

TiDB v5.1.0 と TiDB v5.0.2 は同じ構成を使用します。

TiDB パラメーター構成

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

TiKV パラメータ設定

storage.scheduler-worker-pool-size: 5 raftstore.store-pool-size: 3 raftstore.apply-pool-size: 3 rocksdb.max-background-jobs: 8 raftdb.max-background-jobs: 4 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 server.enable-request-batch: false

TiDB グローバル変数の構成

set global tidb_hashagg_final_concurrency=1; set global tidb_hashagg_partial_concurrency=1; set global tidb_enable_async_commit = 1; set global tidb_enable_1pc = 1; set global tidb_guarantee_linearizability = 0; set global tidb_enable_clustered_index = 1;

テスト計画

  1. TiUP を使用して TiDB v5.1.0 および v5.0.2 をデプロイします。
  2. Sysbench を使用して、各テーブルに 1,000 万行のデータがある 16 個のテーブルをインポートします。
  3. 各テーブルでanalyze tableのステートメントを実行します。
  4. 異なる同時実行テストの前に、復元に使用されるデータをバックアップします。これにより、各テストのデータの一貫性が保証されます。
  5. Sysbench クライアントを起動して、 point_selectread_writeupdate_index 、およびupdate_non_indexのテストを実行します。 HAProxy を介して TiDB でストレス テストを実行します。テストには 5 分かかります。
  6. 各タイプのテストが完了したら、クラスターを停止し、手順 4 のバックアップ データでクラスターを上書きし、クラスターを再起動します。

テストデータの準備

次のコマンドを実行して、テスト データを準備します。

sysbench oltp_common \ --threads=16 \ --rand-type=uniform \ --db-driver=mysql \ --mysql-db=sbtest \ --mysql-host=$aws_nlb_host \ --mysql-port=$aws_nlb_port \ --mysql-user=root \ --mysql-password=password \ prepare --tables=16 --table-size=10000000

テストを実行する

次のコマンドを実行して、テストを実行します。

sysbench $testname \ --threads=$threads \ --time=300 \ --report-interval=1 \ --rand-type=uniform \ --db-driver=mysql \ --mysql-db=sbtest \ --mysql-host=$aws_nlb_host \ --mysql-port=$aws_nlb_port \ run --tables=16 --table-size=10000000

試験結果

ポイントセレクト性能

スレッドv5.0.2 QPSv5.0.2 95%レイテンシー(ミリ秒)v5.1.0 QPSv5.1.0 95%レイテンシー(ミリ秒)QPS の向上
150137732.271.86158861.67215.34%
3002014年20.582.91238038.442.7118.18%
600303631.523.49428573.212.0741.15%
900383628.133.55464863.223.8921.18%
1200391451.545.28413656.7413.465.67%
1500410276.937.43471418.7810.6514.90%

v5.0.2 と比較すると、v5.1.0 の Point Select のパフォーマンスは 19.4% 向上しています。

Point Select

インデックス以外のパフォーマンスを更新

スレッドv5.0.2 QPSv5.0.2 95%レイテンシー(ミリ秒)v5.1.0 QPSv5.1.0 95%レイテンシー(ミリ秒)QPS の向上
15029248.27.1729362.78.130.39%
30040316.0912.5239651.5213.7-1.65%
60051011.1122.2847047.927.66-7.77%
90058814.1627.6659331.8428.670.88%
120065286.5232.5367745.3931.373.77%
150068300.8639.6567899.1744.17-0.59%

v5.0.2 と比較すると、v5.1.0 の Update Non-index パフォーマンスは 0.8% 低下しています。

Update Non-index

インデックスのパフォーマンスを更新する

スレッドv5.0.2 QPSv5.0.2 95%レイテンシー(ミリ秒)v5.1.0 QPSv5.1.0 95%レイテンシー(ミリ秒)QPS の向上
15015066.5414.7314829.3114.73-1.57%
30018535.9224.8317401.0129.72-6.12%
60022862.7341.121923.7844.98-4.11%
90025286.7457.8724916.7658.92-1.46%
120027566.1870.5527800.6269.290.85%
150028184.7692.4228679.72861.76%

v5.0.2 と比較すると、v5.1.0 の Update Index のパフォーマンスは 1.8% 低下しています。

Update Index

読み書き性能

スレッドv5.0.2 QPSv5.0.2 95%レイテンシー(ミリ秒)v5.1.0 QPSv5.1.0 95%レイテンシー(ミリ秒)QPS の向上
15066415.3356.8466591.4957.870.27%
30082488.3997.5581226.41101.13-1.53%
60099195.36173.5897357.86179.94-1.85%
900107382.76253.35101665.95267.41-5.32%
1200112389.23337.94107426.41350.33-4.42%
1500113548.73450.77109805.26442.73-3.30%

v5.0.2 と比較すると、v5.1.0 の読み書きパフォーマンスは 2.7% 低下しています。

Read Write

Playground
新規
登録なしで TiDB の機能をワンストップでインタラクティブに体験できます。
製品
TiDB Cloud
TiDB
価格
PoC お問い合わせ
エコシステム
TiKV
TiFlash
OSS Insight
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.