Skip to content

32C128G 規格の TPC-C テスト結果

テスト概要

TDSQL Boundless の TPC-C テストレポートを提供し、TDSQL Boundless の異なるバージョン間のパフォーマンス比較基準とします。

説明: TPC-C は業界で広く使用されているベンチマークで、TPC 委員会が策定・公開しています。データベースのオンライントランザクション処理(OLTP 指向)能力を評価するために使用されます。主に 10 個のテーブルを含み、NewOrder(新規注文の生成)、Payment(注文支払い)、OrderStatus(最近の注文照会)、Delivery(配送)、StockLevel(在庫欠品状態分析)の 5 種類のビジネストランザクションモデルが含まれます。TPC-C は tpmC 値(Transactions per Minute)を使用してシステムの最大有効スループット(MQTh:Max Qualified Throughput)を測定します。Transactions は NewOrder Transaction を基準とし、最終的な測定単位は 1 分あたりに処理される新規注文数です。

テスト環境

ハードウェア環境

ノードタイプノードスペックノード数
ピアノード16 コア CPU / 32 GB メモリ / 拡張型 SSD クラウドディスク 300 GB3
管理ノード4 コア CPU / 8 GB メモリ3

ソフトウェアバージョン

ノードタイプソフトウェアバージョン
ピアノードv21.1.0
BenchmarkSQLv5.0

パラメータ設定

sql
set persist audit_log_policy = "NONE";
set persist max_prepared_stmt_count = 1000000;
set persist temptable_max_mmap = 214748364800

テスト計画

負荷テストツールの準備

コミュニティのオープンソース BenchmarkSQL 負荷テストツールをダウンロードし、解凍してテストを実施します。

テストデータの準備

1000 Warehouse を基準に定量テストを実施します。負荷テストマシンで以下のコマンドを実行し、props.mysql 設定ファイルを編集してインスタンスの接続情報を入力します。

bash
cd benchmarksql/run
vi props.mysql

設定ファイル props.mysql と主要パラメータは以下のとおりです:

properties
db=mysql
driver=com.mysql.jdbc.Driver 
conn=jdbc:mysql://{ip}:{port}/tpcc?useSSL=false&useServerPrepStmts=true&useConfigs=maxPerformance&rewriteBatchedStatements=true&cachePrepStmts=true&prepStmtCacheSize=1000&prepStmtCacheSqlLimit=2048
user={user}
password={password}

warehouses=1000 
loadWorkers=20   

terminals={terminals} 
runTxnsPerTerminal=0
runMins=5 
limitTxnsPerMin=0 
terminalWarehouseFixed=true

newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4

データベースの作成:

sql
create database tpcc;

テーブルとインデックスの作成を開始し、コアテーブルのテーブル定義を Hash パーティションテーブルに変更します。デフォルトで 9 パーティションを作成します:

bash
cd benchmarksql/run/sql.common
# テーブル構造を変更。コアテーブルを Hash パーティションテーブルとして定義(デフォルト 9 パーティション)
cp tableCreates.sql tableCreates_tdsql.sql
vi tableCreates_tdsql.sql
sql
CREATE TABLE bmsql_config (
  cfg_name    varchar(30) primary key,
  cfg_value   varchar(50)
);

CREATE TABLE bmsql_warehouse (
   w_id        integer   not null,
   w_ytd       decimal(12,2),
   w_tax       decimal(4,4),
   w_name      varchar(10),
   w_street_1  varchar(20),
   w_street_2  varchar(20),
   w_city      varchar(20),
   w_state     char(2),
   w_zip       char(9),
   primary key(w_id)
) partition by hash(w_id) partitions 9;

CREATE TABLE bmsql_district (
   d_w_id       integer       not null,
   d_id         integer       not null,
   d_ytd        decimal(12,2),
   d_tax        decimal(4,4),
   d_next_o_id  integer,
   d_name       varchar(10),
   d_street_1   varchar(20),
   d_street_2   varchar(20),
   d_city       varchar(20),
   d_state      char(2),
   d_zip        char(9),
   PRIMARY KEY (d_w_id, d_id)
) partition by hash(d_w_id) partitions 9;

CREATE TABLE bmsql_customer (
   c_w_id         integer        not null,
   c_d_id         integer        not null,
   c_id           integer        not null,
   c_discount     decimal(4,4),
   c_credit       char(2),
   c_last         varchar(16),
   c_first        varchar(16),
   c_credit_lim   decimal(12,2),
   c_balance      decimal(12,2),
   c_ytd_payment  decimal(12,2),
   c_payment_cnt  integer,
   c_delivery_cnt integer,
   c_street_1     varchar(20),
   c_street_2     varchar(20),
   c_city         varchar(20),
   c_state        char(2),
   c_zip          char(9),
   c_phone        char(16),
   c_since        timestamp,
   c_middle       char(2),
   c_data         varchar(500),
   PRIMARY KEY (c_w_id, c_d_id, c_id)
) partition by hash(c_w_id) partitions 9;

CREATE TABLE bmsql_history (
   hist_id  integer,
   h_c_id   integer,
   h_c_d_id integer,
   h_c_w_id integer,
   h_d_id   integer,
   h_w_id   integer,
   h_date   timestamp,
   h_amount decimal(6,2),
   h_data   varchar(24)
) partition by hash(h_w_id) partitions 9;

CREATE TABLE bmsql_new_order (
   no_w_id  integer   not null,
   no_d_id  integer   not null,
   no_o_id  integer   not null,
   PRIMARY KEY (no_w_id, no_d_id, no_o_id)
) partition by hash(no_w_id) partitions 9;

CREATE TABLE bmsql_oorder (
   o_w_id       integer      not null,
   o_d_id       integer      not null,
   o_id         integer      not null,
   o_c_id       integer,
   o_carrier_id integer,
   o_ol_cnt     integer,
   o_all_local  integer,
   o_entry_d    timestamp,
   PRIMARY KEY (o_w_id, o_d_id, o_id)
) partition by hash(o_w_id) partitions 9;

CREATE TABLE bmsql_order_line (
   ol_w_id         integer   not null,
   ol_d_id         integer   not null,
   ol_o_id         integer   not null,
   ol_number       integer   not null,
   ol_i_id         integer   not null,
   ol_delivery_d   timestamp,
   ol_amount       decimal(6,2),
   ol_supply_w_id  integer,
   ol_quantity     integer,
   ol_dist_info    char(24),
   PRIMARY KEY (ol_w_id, ol_d_id, ol_o_id, ol_number)
) partition by hash(ol_w_id) partitions 9;

CREATE TABLE bmsql_item (
   i_id     integer      not null,
   i_name   varchar(24),
   i_price  decimal(5,2),
   i_data   varchar(50),
   i_im_id  integer,
   PRIMARY KEY (i_id)
);

CREATE TABLE bmsql_stock (
   s_w_id       integer       not null,
   s_i_id       integer       not null,
   s_quantity   integer,
   s_ytd        integer,
   s_order_cnt  integer,
   s_remote_cnt integer,
   s_data       varchar(50),
   s_dist_01    char(24),
   s_dist_02    char(24),
   s_dist_03    char(24),
   s_dist_04    char(24),
   s_dist_05    char(24),
   s_dist_06    char(24),
   s_dist_07    char(24),
   s_dist_08    char(24),
   s_dist_09    char(24),
   s_dist_10    char(24),
   PRIMARY KEY (s_w_id, s_i_id)
) partition by hash(s_w_id) partitions 9;

データベースとテーブルの作成完了後、負荷テストデータのインポートを開始します:

bash
cd ..
nohup ./runLoader.sh props.mysql &

データインポート完了後、以下の SQL を実行してインデックスを作成します:

sql
create index bmsql_customer_idx1 
  on bmsql_customer (c_w_id, c_d_id, c_last, c_first);
create unique index bmsql_oorder_idx1 
  on bmsql_oorder (o_w_id, o_d_id, o_carrier_id, o_id);

テスト実行

以下のコマンドで TPC-C テストを実行します:

bash
cd benchmarksql/run
./runBenchmark.sh props.mysql

テスト結果

スレッド数tpmTOTALtpmC (NewOrders)
64208,948.1494,035.97
128310,788.33139,550.15
256379,050.95170,517.90
512412,147.72185,392.99
1,024434,737.57195,442.64

Tencent Cloud プロダクトドキュメント