5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

HammerDB で Oracle Database の OLTP パフォーマンス テストしてみてみた

Last updated at Posted at 2025-11-26

HammerDB は、Oracle Database、Microsoft SQL Server、IBM Db2、PostgreSQL、MySQL、MariaDB をサポートする、世界で最も人気のあるデータベース向けの主要なベンチマークおよび負荷テスト ソフトウェアです。
image.png
image.png
HammerDB は 業界標準のTPROC-CおよびTPROC-H(それぞれ商標TPC-CおよびTPC-H)の派生ワークロードを実行することを可能にし、システム、データベース、およびデータベース・クラウドサービスを比較対照することができます。
Windows と Linux 上で構築・テストされており、比類のないパフォーマンスとスケーラビリティを実現しています。GUI、CLI、ブラウザインターフェースをサポートし、あらゆるアーキテクチャとオペレーティングシステム上のデータベースをベンチマークできます。HammerDB には、リアルタイムおよび集計されたパフォーマンス分析のための統計情報とツールが組み込まれています。

フォーチュン500企業、商用およびオープンソースデータベースISV、クラウドサービスプロバイダ、主要なハードウェアベンダーはすべて、データベースのパフォーマンスとスケーラビリティの洞察と比較のためにHammerDBを利用しています。

ということで、HammerDB で Oracle Database の TPROC-C パフォーマンス テストしてみてみます。

■ HammarDB Download

HammarDB Download から ダウンロードします。

今回、Release 5.0 for Red Hat Enterprise Linux 8 RPM file を wgetでダウンロードします。

1) Download

[opc@client-inst ~]$ wget https://github.com/TPC-Council/HammerDB/releases/download/v5.0/hammerdb-5.0-1.el8.x86_64.rpm
    --2025-09-02 05:46:38--  https://github.com/TPC-Council/HammerDB/releases/download/v5.0/hammerdb-5.0-1.el8.x86_64.rpm
    Resolving github.com (github.com)... 20.27.177.113
    Connecting to github.com (github.com)|20.27.177.113|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://release-assets.githubusercontent.com/github-production-release-asset/159393955/2830bf48-98e1-4f10-8015-9746f7bc1414?sp=r&sv=2018-11-09&sr=b&spr=https&se=2025-09-02T06%3A28%3A37Z&rscd=attachment%3B+filename%3Dhammerdb-5.0-1.el8.x86_64.rpm&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2025-09-02T05%3A28%3A12Z&ske=2025-09-02T06%3A28%3A37Z&sks=b&skv=2018-11-09&sig=CADttrZn2snnbmn52Tv5KPH1%2BPnKFGFPiDkw5jBKX2A%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc1Njc5MjI5OSwibmJmIjoxNzU2NzkxOTk5LCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.IO4jWweHow0zP_xBxQ-8cyI0wSrsMSDWHf7X-YwyuOo&response-content-disposition=attachment%3B%20filename%3Dhammerdb-5.0-1.el8.x86_64.rpm&response-content-type=application%2Foctet-stream [following]
    --2025-09-02 05:46:39--  https://release-assets.githubusercontent.com/github-production-release-asset/159393955/2830bf48-98e1-4f10-8015-9746f7bc1414?sp=r&sv=2018-11-09&sr=b&spr=https&se=2025-09-02T06%3A28%3A37Z&rscd=attachment%3B+filename%3Dhammerdb-5.0-1.el8.x86_64.rpm&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2025-09-02T05%3A28%3A12Z&ske=2025-09-02T06%3A28%3A37Z&sks=b&skv=2018-11-09&sig=CADttrZn2snnbmn52Tv5KPH1%2BPnKFGFPiDkw5jBKX2A%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc1Njc5MjI5OSwibmJmIjoxNzU2NzkxOTk5LCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.IO4jWweHow0zP_xBxQ-8cyI0wSrsMSDWHf7X-YwyuOo&response-content-disposition=attachment%3B%20filename%3Dhammerdb-5.0-1.el8.x86_64.rpm&response-content-type=application%2Foctet-stream
    Resolving release-assets.githubusercontent.com (release-assets.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.108.133, ...
    Connecting to release-assets.githubusercontent.com (release-assets.githubusercontent.com)|185.199.110.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 34550540 (33M) [application/octet-stream]
    Saving to: ‘hammerdb-5.0-1.el8.x86_64.rpm’

    hammerdb-5.0-1.el8.x86_64.rpm 100%[================================================>]  32.95M  --.-KB/s    in 0.09s

    2025-09-02 05:46:39 (356 MB/s) - ‘hammerdb-5.0-1.el8.x86_64.rpm’ saved [34550540/34550540]

2) Download 確認

[opc@client-inst ~]$ ls -l
    total 33744
    -rw-rw-r--. 1 opc opc 34550540 Apr  5 15:40 hammerdb-5.0-1.el8.x86_64.rpm

■ LinuxへのHammerDBのインストールと起動

● hammerdbインストール(失敗)

次のような 依存 RPM 足りない場合は事前にインストールしときます。

[opc@client-inst ~]$ sudo rpm -ivh hammerdb-5.0-1.el8.x86_64.rpm
    error: Failed dependencies:
	libXft is needed by hammerdb-5.0-1.el8.x86_64
	libXft.so.2()(64bit) is needed by hammerdb-5.0-1.el8.x86_64
	libpq is needed by hammerdb-5.0-1.el8.x86_64
	mariadb-connector-c is needed by hammerdb-5.0-1.el8.x86_64
	xorg-x11-server-Xorg is needed by hammerdb-5.0-1.el8.x86_64
	xorg-x11-xauth is needed by hammerdb-5.0-1.el8.x86_64

● hammerdb 依存 RPMインストール

[opc@client-inst ~]$ sudo yum install libXft libXft.so.2 libpq mariadb-connector-c xorg-x11-server-Xorg xorg-x11-xauth
Last metadata expiration check: 0:25:54 ago on Tue 02 Sep 2025 05:27:02 AM GMT.
Dependencies resolved.
======================================================================================================================================
 Package                                 Architecture        Version                             Repository                      Size
======================================================================================================================================
Installing:
 libXft                                  i686                2.3.3-1.el8                         ol8_appstream                   68 k
 libXft                                  x86_64              2.3.3-1.el8                         ol8_appstream                   67 k
 libpq                                   x86_64              13.20-1.el8_10                      ol8_appstream                  198 k

・・・

  xorg-x11-server-common-1.20.11-26.el8_10.x86_64                     xorg-x11-xauth-1:1.0.9-12.el8.x86_64
  xorg-x11-xkb-utils-7.7-28.el8.x86_64                                zlib-1.2.11-25.el8.i686

Complete!

● HammerDBインストール

1) Install
オペレーティング システム用の .rpm ファイルをインストールするには、次のコマンドを使用します。

[opc@client-inst ~]$ sudo rpm -ivh hammerdb-5.0-1.el8.x86_64.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:hammerdb-5.0-1.el8               ################################# [100%]

2) Install確認
これにより、HammerDB が /opt ディレクトリにインストールされます。
デフォルトでは、所有権は root ユーザーにあります。

[opc@client-inst ~]$ ls -l /opt/HammerDB-5.0/
    total 31260
    drwxr-xr-x. 2 root root       19 Sep  2 05:55 agent
    drwxr-xr-x. 3 root root     4096 Sep  2 05:55 config
    -rwxr-xr-x. 1 root root 12868126 Mar 30 14:04 hammerdb
    -rwxr-xr-x. 1 root root 11071110 Mar 30 14:04 hammerdbcli
    -rwxr-xr-x. 1 root root  8022095 Mar 30 14:04 hammerdbws
    -rw-r--r--. 1 root root    35149 Mar 30 14:04 LICENSE
    drwxr-xr-x. 3 root root       24 Sep  2 05:55 pylib
    -rw-r--r--. 1 root root      518 Mar 30 14:04 README.md
    drwxr-xr-x. 4 root root       31 Sep  2 05:55 scripts

3) HammerDB OS owner変更
所有権を任意の OS ユーザーに変更できます。

[opc@client-inst ~]$ sudo chown -R opc:opc /opt/HammerDB-5.0
[opc@client-inst ~]$ ls -l /opt/HammerDB-5.0/
    total 31260
    drwxr-xr-x. 2 opc opc       19 Sep  2 05:55 agent
    drwxr-xr-x. 3 opc opc     4096 Sep  2 05:55 config
    -rwxr-xr-x. 1 opc opc 12868126 Mar 30 14:04 hammerdb
    -rwxr-xr-x. 1 opc opc 11071110 Mar 30 14:04 hammerdbcli
    -rwxr-xr-x. 1 opc opc  8022095 Mar 30 14:04 hammerdbws
    -rw-r--r--. 1 opc opc    35149 Mar 30 14:04 LICENSE
    drwxr-xr-x. 3 opc opc       24 Sep  2 05:55 pylib
    -rw-r--r--. 1 opc opc      518 Mar 30 14:04 README.md
    drwxr-xr-x. 4 opc opc       31 Sep  2 05:55 scripts

4) HammerDB実行確認

[opc@client-inst ~]$ /opt/HammerDB-5.0/hammerdbcli
    HammerDB CLI v5.0
    Copyright © HammerDB Ltd hosted by tpc.org 2019-2025
    Type "help" for a list of commands
    Initialized new Jobs on-disk database /tmp/hammer.DB
hammerdb>

5) HammerDB HELP確認

hammerdb>help
    HammerDB v5.0 CLI Help Index

    Type "help command" for more details on specific commands below

        buildschema
        checkschema
        deleteschema
        clearscript
        savescript
        customscript
        custommonitor
        datagenrun
        dbset
        dgset
        diset
        distributescript
        giset
        jobs
        librarycheck
        loadscript
        metset
        metstart
        metstatus
        metstop
        print
        quit
        steprun
        switchmode
        tcset
        tcstart
        tcstatus
        tcstop
        vucomplete
        vucreate
        vudestroy
        vurun
        vuset
        vustatus
        wsport
        wsstart
        wsstatus
        wsstop

■ Oracle Client 設定と HammerDB ライブラリチェック

Oracle Instant Client を使用する場合、HammerDB は追加の環境変数 ORACLE_LIBRARY を使用してOracleクライアントライブラリを識別します。
Linuxの場合、ライブラリはlibclntsh.soという名前で、これは通常、製品固有の名前(Oracle 21cの場合はlibclntsh.so.21.1など)へのシンボリックリンクです。

● Oracle Instant Client Install

次を参考に Oracle Instant Clientをインストール

● ORACLE環境変数設定

HammerDB に必要な ORACLE_LIBRARY 変数追加して設定します。

1) .bash_profile 設定
今回は、.bash_profile へ設定します。

[opc@client-inst ~]$ vi ~/.bash_profile
    export ORACLE_HOME=/home/opc/instantclient_23_9
    export LD_LIBRARY_PATH=$ORACLE_HOME/
    export ORACLE_LIBRARY=$ORACLE_HOME/libclntsh.so
    export ORACLE_SID=CDB
    export PATH=$ORACLE_HOME:$PATH
    
[opc@client-inst ~]$ cat .bash_profile
    ・・・
    export ORACLE_HOME=/home/opc/instantclient_23_9
    export LD_LIBRARY_PATH=$ORACLE_HOME/
    export ORACLE_LIBRARY=$ORACLE_HOME/libclntsh.so
    export ORACLE_SID=CDB
    export PATH=$ORACLE_HOME:$PATH

2) .bash_profile 設定反映

[opc@client-inst ~]$ source .bash_profile
[opc@client-inst ~]$ env | grep ORA
    ORACLE_SID=CDB
    ORACLE_HOME=/home/opc/instantclient_23_9
    ORACLE_LIBRARY=/home/opc/instantclient_23_9/libclntsh.so

● HammerDB ライブラリチェック

最初に行うべきことの一つは、使用するデータベースのサードパーティ製ドライバライブラリにアクセスできることを確認することです。
これは librarycheck コマンドで実行できます。この例では Oracle を使用しているため、メッセージが表示され、すべてが正常であることが示され、テストの実行に進むことができます。ライブラリのロードに失敗した場合は、HammerDBのドキュメントを参照して、Windowsの場合はPATH環境変数、Linuxの場合はLIBRARY_PATH環境変数を使用したライブラリのインストールと設定を行ってください。

1) hammerdbcli実行

[oracle@oms1 HammerDB-4.4]$ /opt/HammerDB-5.0/hammerdbcli
    HammerDB CLI v4.4
    Copyright (C) 2003-2022 Steve Shaw
    Type "help" for a list of commands
    The xml is well-formed, applying configuration

2) librarycheck
以下のように Checking database library for Oracle 部分が Success すれば OK

hammerdb>librarycheck
    Checking database library for Oracle
    Success ... loaded library Oratcl for Oracle
    Checking database library for MSSQLServer
    Error: failed to load tdbc::odbc - couldn't load file "libiodbc.so": libiodbc.so: cannot open shared object file: No such file or directory
    Ensure that MSSQLServer client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
    Checking database library for Db2
    Error: failed to load db2tcl - couldn't load file "/tmp/tcl_QHTTdb": libdb2.so.1: cannot open shared object file: No such file or directory
    Ensure that Db2 client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
    Checking database library for MySQL
    Error: failed to load mysqltcl - couldn't load file "/tmp/tcl_RM1IQN": libmysqlclient.so.24: cannot open shared object file: No such file or directory
    Ensure that MySQL client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
    Checking database library for PostgreSQL
    Success ... loaded library Pgtcl for PostgreSQL
    Checking database library for MariaDB
    Success ... loaded library mariatcl for MariaDB

■ Oracle Database 事前設定

HammerDBで利用する表領域を作成します。
TPROC-Cで利用するの表領域のサイズは、the general guidance is to allow up to 100MB per warehouse. なので、それに合わせた表領域サイズに設定し、また不足する場合やWarehouse数を増やせるよう自動拡張するよう設定しときます。

● tpcctab 表領域作成

1) CREATE TABLESPACE

SQL> create bigfile tablespace TPCCTAB datafile size 100g AUTOEXTEND ON NEXT 10G;

    Tablespace created.

1) CREATE TABLESPACE 確認

SELECT 
    a.TABLESPACE_NAME 
    ,a.BYTES/1024/1024 as "Size(MB)"
    ,a.autoextensible as "Auto_Extent"
    ,a.increment_by * (select VALUE from v$parameter where NAME='db_block_size') /1024/1024 as "Auto_Extent_Size(MB)"
    ,TO_CHAR(a.MAXBYTES/1024/1024,'999,999,999') as "MAX_SIZE(MB)"
    ,b.BLOCK_SIZE
    ,b.BIGFILE
FROM DBA_DATA_FILES a
    , DBA_TABLESPACES b
WHERE a.TABLESPACE_NAME=b.TABLESPACE_NAME
union all
SELECT 
    x.TABLESPACE_NAME 
    ,x.BYTES/1024/1024 as "Size(MB)"
    ,x.autoextensible as "Auto_Extent"
    ,x.increment_by * (select VALUE from v$parameter where NAME='db_block_size') /1024/1024 as "Auto_Extent_Size(MB)"
    ,TO_CHAR(x.MAXBYTES/1024/1024,'999,999,999') as "MAX_SIZE(MB)"
    ,y.BLOCK_SIZE
    ,y.BIGFILE
FROM dba_temp_files x
    , DBA_TABLESPACES y
WHERE x.TABLESPACE_NAME=y.TABLESPACE_NAME  
ORDER By TABLESPACE_NAME
;

    TABLESPACE_NAME 		 Size(MB) Aut Auto_Extent_Size(MB) MAX_SIZE(MB) BLOCK_SIZE BIG
    ------------------------------ ---------- --- -------------------- ------------ ---------- ---
    SYSAUX				     4696 YES		      4096   33,554,432       8192 YES
    SYSTEM				      600 YES		      4096   33,554,432       8192 YES
    TEMP				     1024 YES		     16384   33,554,432       8192 YES
    TPCCTAB 			   102400 YES		     10240   33,554,432       8192 YES
    UNDOTBS1			     4696 YES		      4096	524,288       8192 YES
    USERS				     1024 YES		     16384   33,554,432       8192 YES

    6 rows selected.

● tpccユーザー作成

Oracle接続先 PDB において HammerDB TPROC-C ワークロードで利用するユーザ (tpcc) を作成します。

1) CREATE USER

SQL> CREATE USER tpcc
    IDENTIFIED BY "Password"
    DEFAULT TABLESPACE tpcctab
    TEMPORARY TABLESPACE temp
    ;

    User created.

SQL> select USERNAME, ACCOUNT_STATUS, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE from dba_users where USERNAME='TPCC';
    USERNAME	     ACCOUNT_STATUS		      DEFAULT_TABLESPACE	     TEMPORARY_TABLESPACE
    -------------------- -------------------------------- ------------------------------ ------------------------------
    TPCC		     OPEN			      TPCCTAB			     TEMP

2) GRANT TO USER

SQL> grant CREATE SESSION,resource to tpcc;
SQL> grant UNLIMITED TABLESPACE TO tpcc;
SQL> grant all privileges to tpcc;

   Grant succeeded

SQL> select GRANTEE, GRANTED_ROLE, DEFAULT_ROLE from dba_role_privs where GRANTEE='TPCC';
   GRANTEE 	     GRANTED_ROLE	  DEF
   -------------------- -------------------- ---
   TPCC		     RESOURCE		  YES

3) TPCCユーザー接続確認

SQL> conn tpcc/Password@PDB
Connected.

SQL> show user
   USER is "TPCC"

SQL> show con_name

   CON_NAME
   ------------------------------
   PDB

■ HammerDB TPROC-C スキーマ作成

buildschemaコマンドで Oracle Databaseへ TPROC-C スキーマを構築します。

● hammerdbcli実行

[oracle@oms1 HammerDB-4.4]$ /opt/HammerDB-5.0/hammerdbcli
    HammerDB CLI v4.4
    Copyright (C) 2003-2022 Steve Shaw
    Type "help" for a list of commands
    The xml is well-formed, applying configuration
hammerdb>

● ライブラリチェック

使用するデータベースのサードパーティ製ドライバライブラリにアクセスできることを確認

hammerdb>librarycheck
    Checking database library for Oracle
    Success ... loaded library Oratcl for Oracle
    Checking database library for MSSQLServer
    Error: failed to load tdbc::odbc - couldn't load file "libiodbc.so": libiodbc.so: cannot open shared object file: No such file or directory
    Ensure that MSSQLServer client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
    Checking database library for Db2
    Error: failed to load db2tcl - couldn't load file "/tmp/tcl_QHTTdb": libdb2.so.1: cannot open shared object file: No such file or directory
    Ensure that Db2 client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
    Checking database library for MySQL
    Error: failed to load mysqltcl - couldn't load file "/tmp/tcl_RM1IQN": libmysqlclient.so.24: cannot open shared object file: No such file or directory
    Ensure that MySQL client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
    Checking database library for PostgreSQL
    Success ... loaded library Pgtcl for PostgreSQL
    Checking database library for MariaDB
    Success ... loaded library mariatcl for MariaDB

● データベースの選択

希望するデータベースを選択します。
CLI では、これは XML 構成内のプレフィックス (Oracle、Microsoft SQL Server、IBM Db2、MySQL、PostgreSQL の場合はそれぞれ ora、mssqls、db2、mysql、pg) に従って db 引数を使用してデータベースが設定された dbset コマンドに相当します。
dbsetコマンドを使用して、データベースとベンチマークを選択します。間違ったデータベースを選択した場合は、使用可能な値の入力を求められます。

hammerdb>dbset db ora
    Database set to Oracle

● TPROC-C 向けにセットします。

bm引数でベンチマークセットを指定します。TPRO-C または TPC-C のいずれかを使用できます。

hammerdb> dbset bm TPC-C
    Benchmark set to TPC-C for Oracle

● DB 接続名をセット

tnsnames.oraへ設定した接続記述子を設定、EZCOnnect記述でもOKです。

hammerdb> diset connection instance PDB
    Changed connection:instance from oracle to PDB for Oracle

● SYSTEM ユーザ・パスワードをセット

hammerdb> diset connection system_password Password
    Changed connection:system_password from manager to Password for Oracle

● TPROC-C ワークロード用ユーザをセット

hammerdb> diset tpcc tpcc_user tpcc
    Value tpcc for tpcc:tpcc_user is the same as existing value tpcc, no change made

● TPROC-C ワークロードで用ユーザ・パスワードをセット

hammerdb> diset tpcc tpcc_pass Password
    Changed tpcc:tpcc_pass from tpcc to Password for Oracle

● TPROC-C ワークロード用ユーザ・デフォルト表領域名をセット

hammerdb> diset tpcc tpcc_def_tab tpcctab
    Changed tpcc:tpcc_def_tab from users to tpcctab for Oracle

● TPROC-C ワークロード用ユーザ・一時表領域名をセット

hammerdb> diset tpcc tpcc_def_temp temp
    Value temp for tpcc:tpcc_def_temp is the same as existing value temp, no change made

● TPROC-C ワークロード用 Warehouse 数をセット

Warehouse 数は、利用 CPU コア数 x 10〜100 程度を目安に設定します。

hammerdb> diset tpcc count_ware 100
    Changed tpcc:count_ware from 1 to 100 for Oracle

● TPROC-C スキーマ作成する Virtual User 数をセット

仮想ユーザーの作成 より、ウェアハウス数(規模)を 160 に設定した場合は、[Virtual Users] を 16 に設定します。
これは TPROC-C のガイドラインが、行のロックを防止するために 10 倍の比率を推奨していることによります。

hammerdb> diset tpcc num_vu 10 
    Changed tpcc:num_vu from 1 to 10 for Oracle

● TPROC-C スキーマ作成パラメータ確認

print dict コマンドによってスキーマ作成パラメータ構成変数の一覧を確認できます。
この内容でTPROC-C スキーマが作成されます。

hammerdb>print dict
Dictionary Settings for Oracle
connection {
 system_user     = system
 system_password = Pawwsord
 instance        = PDB
 rac             = 0
}
tpcc       {
 count_ware       = 64
 num_vu           = 16
 tpcc_user        = tpcc
 tpcc_pass        = Password
 tpcc_def_tab     = tpcctab
 tpcc_ol_tab      = users
 tpcc_def_temp    = temp
 partition        = false
 hash_clusters    = false
 tpcc_tt_compat   = false
 total_iterations = 10000000
 raiseerror       = false
 keyandthink      = false
 checkpoint       = false
 ora_driver       = timed
 rampup           = 1
 duration         = 3
 allwarehouse     = false
 ora_timeprofile  = false
 async_scale      = false
 async_client     = 10
 async_verbose    = false
 async_delay      = 1000
 connect_pool     = false
}

hammerdb>

● TPROC-C スキーマを作成します。

buildschema コマンドを実行すると、設定に基づいてプロンプトなしでビルドが開始され、成功した場合はビルド終了時にステータスが報告されます。
ビルドの完了にかかる時間はHammerDBクライアントのCPUと、ロードされているデータベースサーバーのパフォーマンスに依存します。この間、各アクションがディスプレイに表示されます。ビルドが完了するまでに数分かかる場合があります。

hammerdb>buildschema
    Script cleared
    Building 32 Warehouses with 17 Virtual Users, 16 active + 1 Monitor VU(dict value num_vu is set to 16)
    Ready to create a 32 Warehouse Oracle TPROC-C schema
    in database oracledb.CLIENTSUBNET.VCNDBASHBURN.ORACLEVCN.COM:1521/PDB.PAAS.ORACLE.COM under user TPCC in tablespace TPCCTAB?
    Enter yes or no: replied yes
    Vuser 1 created - WAIT IDLE
    Vuser 2 created - WAIT IDLE
    Vuser 3 created - WAIT IDLE
    ・・・
    Vuser 1:GATHERING SCHEMA STATISTICS
    Vuser 1:TPCC SCHEMA COMPLETE
    Vuser 1:FINISHED SUCCESS
    ALL VIRTUAL USERS COMPLETE
    Schema Build jobid=68B6C470CEEA03E213134373

    hammerdb>exit
[opc@client-inst ~]$

・ Virtual User リセット
ビルドが完了したら、仮想ユーザーを破棄し、ステータスを確認します。

hammerdb> vudestroy
    vudestroy success

hammerdb>vustatus
    No Virtual Users found

● スキーマ作成確認

sqlで作成されたスキーマを確認

col OBJECT_NAME format a30
SELECT OBJECT_NAME, OBJECT_TYPE  FROM DBA_OBJECTS WHERE OWNER='TPCC';

    OBJECT_NAME		       OBJECT_TYPE
    ------------------------------ -----------------------
    CUSTOMER		       TABLE
    DISTRICT		       TABLE
    HISTORY 		       TABLE
    ITEM			       TABLE
    WAREHOUSE		       TABLE
    STOCK			       TABLE
    NEW_ORDER		       TABLE
    INORD			       INDEX
    ORDERS			       TABLE
    ORDER_LINE		       TABLE
    IORDL			       INDEX
    STOCK_ITEM		       VIEW
    CUSTOMER_I1		       INDEX
    CUSTOMER_I2		       INDEX
    DISTRICT_I1		       INDEX
    ITEM_I1 		       INDEX
    ORDERS_I1		       INDEX
    ORDERS_I2		       INDEX
    STOCK_I1		       INDEX
    WAREHOUSE_I1		       INDEX
    NEWORD			       PROCEDURE
    DELIVERY		       PROCEDURE
    PAYMENT 		       PROCEDURE
    OSTAT			       PROCEDURE
    SLEV			       PROCEDURE

    25 rows selected.

● おまけ: スキーマ削除

スキーマ削除する場合、sql で次を実行

SQL> DROP USER tpcc CASCADE;

■ ドライバーを構成する

ドライバースクリプトのオプションを定義することです。

● hammerdbcli 実行

[opc@client-inst ~]$ /opt/HammerDB-5.0/hammerdbcli
    HammerDB CLI v5.0
    Copyright © HammerDB Ltd hosted by tpc.org 2019-2025
    Type "help" for a list of commands
    Initialized Jobs on-disk database /tmp/hammer.DB using existing tables (217,088 bytes)

hammerdb> 

● Oracle Database 用セット

スキーマ作成した値をセット

今回用設定
dbset db ora
dbset bm TPC-C
diset connection instance PDB
diset connection system_password Password
diset tpcc tpcc_user tpcc
diset tpcc tpcc_pass Password
diset tpcc count_ware 100
diset tpcc num_vu 4

● TPROC-C 用ドライバー設定

ワークロード設定を構成します。この例では、ランプアップ時間と継続時間が設定をします。

・ TPROC-C ワークロード 設定
実行するワークロードの種類を設定します。テストワークロードではコマンドプロンプトに大量の出力が表示されるため、出力を抑制した時間指定のワークロードを強くお勧めします。

hammerdb>diset tpcc ora_driver timed
    Value timed for tpcc:ora_driver is the same as existing value timed, no change made

・ 計測前のランプアップ(分単位) 設定

hammerdb>diset tpcc rampup 1
    Changed tpcc:rampup from 2 to 1 for Oracle

・ テストの実行時間(分単位) 設定
print dict コマンドで設定を確認

hammerdb>diset tpcc duration 3
Changed tpcc:duration from 5 to 3 for Oracle

・ 設定パラメータ確認

hammerdb>print dict
Dictionary Settings for Oracle
connection {
 system_user     = system
 system_password = Password
 instance        = PDB
 rac             = 0
}
tpcc       {
 count_ware       = 100
 num_vu           = 4
 tpcc_user        = tpcc
 tpcc_pass        = Password
 tpcc_def_tab     = tpcctab
 tpcc_ol_tab      = users
 tpcc_def_temp    = temp
 partition        = false
 hash_clusters    = false
 tpcc_tt_compat   = false
 total_iterations = 10000000
 raiseerror       = false
 keyandthink      = false
 checkpoint       = false
 ora_driver       = timed
 rampup           = 1
 duration         = 3
 allwarehouse     = false
 ora_timeprofile  = false
 async_scale      = false
 async_client     = 10
 async_verbose    = false
 async_delay      = 1000
 connect_pool     = false
}

・ ドライバー・スクリプトをロード
すべての設定を選択したら、loadscript コマンドを使用してドライバー スクリプトをロードします (loadscript を実行せずに vurun を実行すると、loadscript が自動的に実行されます)。

hammerdb>loadscript
    Script loaded, Type "print script" to view

・ ロード・スクリプト確認
ロードされたスクリプトは、print scriptコマンドで確認できます。ドライバースクリプトは、GUIで表示されるドライバースクリプトと全く同じであることに注意してください。

hammerdb>print script
    #!/usr/local/bin/tclsh9.0
    #OPTIONS
    set library Oratcl ;# Oracle OCI Library
    set total_iterations 10000000 ;# Number of transactions before logging off
    set RAISEERROR "false" ;# Exit script on Oracle error (true or false)
    set KEYANDTHINK "false" ;# Time for user thinking and keying (true or false)
    set CHECKPOINT "false" ;# Perform Oracle checkpoint when complete (true or false)
    set rampup 1;  # Rampup time in minutes before first snapshot is taken
    set duration 3;  # Duration in minutes before second AWR snapshot is taken
    set mode "Local" ;# HammerDB operational mode
    set timesten "false" ;# Database is TimesTen
    set systemconnect system/Password\#@PDB ;# Oracle connect string for system user
    set connect tpcc/Password\#@PDB ;# Oracle connect string for tpc-c user
    #OPTIONS
    #LOAD LIBRARIES AND MODULES
    if [catch {package require $library} message] { error "Failed to load $library - $message" }
    if [catch {package require tpcccommon} ] { error "Failed to load tpcc common functions" } else { namespace import tpcccommon::* }

・・・

● Virtual User 設定

スキーマが構築され、ドライバー スクリプトがロードされたら、ワークフローの次の手順は仮想ユーザーを構成することです。 print コマンドを使用すると、現在作成されている仮想ユーザーの数を表示できます。
vuset コマンドで仮想ユーザー オプションを設定し、print vuconf コマンドで設定を表示

・ Virtual User 数をセット
vuset コマンドは、整数または値 vcpu を設定して仮想ユーザー オプションを構成するために使用されます。
値 vcpu は、作成する仮想ユーザーの数など、システム上の論理 CPU の最大値に vu を設定します。

hammerdb> vuset vu 4

・ テストログ・ファイル出力有効化
テキストログを有効にすると、/tmp 下にファイル出力されます。
(ただし、ジョブが有効になっている場合は、すべての出力がジョブに保存されます)

hammerdb> vuset logtotemp 1

・ テストログ unique設定
テスト結果ファイルの出力を、テスト毎にファイル名を変えて出力させます。

hammerdb> vuset unique 1

・ テストログ timestamps 設定
テスト結果ファイルにタイムスタンプを出力させます。

hammerdb> vuset timestamps 1

・ Virtual User 設定確認
print vuconf で設定を確認

hammerdb>print vuconf
    Virtual Users = 4
    User Delay(ms) = 500
    Repeat Delay(ms) = 500
    Iterations = 1
    Show Output = 1
    Log Output = 1
    Unique Log Name = 1
    No Log Buffer = 0
    Log Timestamps = 1

・ Virtual User 作成
仮想ユーザーの設定が完了したら、次は vucreate を実行して仮想ユーザーを作成します。仮想ユーザーはアイドル状態(まだ実行されていない状態)で作成されます。時間制限付きテストを選択した場合は、グラフィカルインターフェースの場合と同様に、モニター仮想ユーザーも作成されることに注意してください。
vucreate コマンドは仮想ユーザーを作成し、vustatus コマンドは GUI の仮想ユーザー・テーブルのステータス列に表示されるステータスを表示します。

hammerdb>vucreate
    Script loaded, Type "print script" to view
    Vuser 1 created MONITOR - WAIT IDLE
    Vuser 2 created - WAIT IDLE
    Vuser 3 created - WAIT IDLE
    Vuser 4 created - WAIT IDLE
    Vuser 5 created - WAIT IDLE
    Logging activated
    to /tmp/hammerdb_68B6E665D51203E213734303.log
    5 Virtual Users Created with Monitor VU

・ Virtual User 状態確認
Virtual User を状態は以下のコマンドで確認できます。

hammerdb>vustatus
    1 = WAIT IDLE
    2 = WAIT IDLE
    3 = WAIT IDLE
    4 = WAIT IDLE
    5 = WAIT IDLE

・ Virtual User リセット
ビルドが完了したら、仮想ユーザーを破棄し、ステータスを確認します。

hammerdb> vudestroy
    vudestroy success

hammerdb>vustatus
    No Virtual Users found

● ワークロード実行

vurun コマンドを使用してワークロードを開始します。テストは設定に従って実行され、終了時に結果と仮想ユーザーのステータスが報告されます。

NOPMとTPM/TPS
NOPMは速度、つまりスループットであり、TPMはそのスループットを実現するためにエンジンがどれだけの負荷をかけているかを表します。
 ・ NOPMメトリック: データベースが他のトランザクションも処理している間に、1分あたりに実行される新規注文トランザクションのレート測定値
 ・ TPM: データベースエンジンが処理しているコミットとロールバックの数から算出される指標

hammerdb>vurun
    Vuser 1:RUNNING
    Vuser 1:DBVersion:23.0.0.0.0
    Vuser 1:Beginning rampup time of 1 minutes
    Vuser 2:RUNNING
    Vuser 2:Processing 10000000 transactions with output suppressed...
    Vuser 3:RUNNING
    Vuser 3:Processing 10000000 transactions with output suppressed...
    Vuser 4:RUNNING
    Vuser 4:Processing 10000000 transactions with output suppressed...
    Vuser 5:RUNNING
    Vuser 5:Processing 10000000 transactions with output suppressed...
    Vuser 1:Rampup 1 minutes complete ...
    Vuser 1:Rampup complete, Taking start AWR snapshot.
    Vuser 1:Start Snapshot 13 taken at 02 SEP 2025 12:45 of instance CDB1 (**1) of database CDB (971190190)
    Vuser 1:Timing test period of 3 in minutes
    Vuser 1:1 ...,
    Vuser 1:2 ...,
    Vuser 1:3 ...,
    Vuser 1:Test complete, Taking end AWR snapshot.
    Benchmark Run jobid=68B6E69ED87E03E223937303
    hammerdb>Vuser 1:End Snapshot 14 taken at 02 SEP 2025 12:48 of instance CDB1 (**1) of database CDB (971190190)
    Vuser 1:Test complete: view report from SNAPID 13 to 14
    Vuser 1:4 Active Virtual Users configured
    Vuser 1:TEST RESULT : System achieved 99054 NOPM from 107749 Oracle TPM
    Vuser 2:FINISHED SUCCESS
    Vuser 1:FINISHED SUCCESS
    Vuser 3:FINISHED SUCCESS
    Vuser 4:FINISHED SUCCESS
    Vuser 5:FINISHED SUCCESS
    ALL VIRTUAL USERS COMPLETE

・ Virtual User リセット
テストを完了するには、「vudestroy」と入力します。

hammerdb>vudestroy
    vudestroy success

・ CLI終了

hammerdb>exit
[opc@client-inst ~]$

・ LOG確認

[opc@client-inst ~]$ cat /tmp/hammerdb_68B6E665D51203E213734303.log
    Hammerdb Log @ Tue Sep 02 12:43:17 GMT 2025
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
    Timestamp 1 @ Tue Sep 02 12:44:15 GMT 2025
    Vuser 1:DBVersion:23.0.0.0.0
    Timestamp 1 @ Tue Sep 02 12:44:15 GMT 2025
    Vuser 1:Beginning rampup time of 1 minutes
    Timestamp 2 @ Tue Sep 02 12:44:15 GMT 2025
    Vuser 2:Processing 10000000 transactions with output suppressed...
    Timestamp 3 @ Tue Sep 02 12:44:16 GMT 2025
    Vuser 3:Processing 10000000 transactions with output suppressed...
    Timestamp 4 @ Tue Sep 02 12:44:16 GMT 2025
    Vuser 4:Processing 10000000 transactions with output suppressed...
    Timestamp 5 @ Tue Sep 02 12:44:17 GMT 2025
    Vuser 5:Processing 10000000 transactions with output suppressed...
    Timestamp 1 @ Tue Sep 02 12:45:15 GMT 2025
    Vuser 1:Rampup 1 minutes complete ...
    Timestamp 1 @ Tue Sep 02 12:45:15 GMT 2025
    Vuser 1:Rampup complete, Taking start AWR snapshot.
    Timestamp 1 @ Tue Sep 02 12:45:22 GMT 2025
    Vuser 1:Start Snapshot 13 taken at 02 SEP 2025 12:45 of instance CDB1 (**1) of database CDB (971190190)
    Timestamp 1 @ Tue Sep 02 12:45:22 GMT 2025
    Vuser 1:Timing test period of 3 in minutes
    Timestamp 1 @ Tue Sep 02 12:46:22 GMT 2025
    Vuser 1:1 ...,
    Timestamp 1 @ Tue Sep 02 12:47:22 GMT 2025
    Vuser 1:2 ...,
    Timestamp 1 @ Tue Sep 02 12:48:22 GMT 2025
    Vuser 1:3 ...,
    Timestamp 1 @ Tue Sep 02 12:48:22 GMT 2025
    Vuser 1:Test complete, Taking end AWR snapshot.
    Timestamp 1 @ Tue Sep 02 12:51:26 GMT 2025
    Vuser 1:End Snapshot 14 taken at 02 SEP 2025 12:48 of instance CDB1 (**1) of database CDB (971190190)
    Timestamp 1 @ Tue Sep 02 12:51:26 GMT 2025
    Vuser 1:Test complete: view report from SNAPID 13 to 14
    Timestamp 1 @ Tue Sep 02 12:51:26 GMT 2025
    Vuser 1:4 Active Virtual Users configured
    Timestamp 1 @ Tue Sep 02 12:51:26 GMT 2025
    Vuser 1:TEST RESULT : System achieved 99054 NOPM from 107749 Oracle TPM

● トランザクション・カウンターとメトリック・カウンターを実行したワークロード実行

トランザクションカウンタとメトリクスは、それぞれ tcstartコマンドと metstartコマンドで実行できます。これらのコマンドを実行すると、ジョブ出力にトランザクションとメトリクスが収集されます。

hammerdb>tcstart
    Transaction Counter logging activated to /tmp/hdbtcount.log
    Transaction Counter Started

hammerdb>metstart
    Starting Local Metrics Agent on client-inst.publicsubnet.vcndbashburn.oraclevcn.com
    after#551
    Connecting to Agent to Display CPU Metrics
    Metric receive port open @ 30515 on client-inst.publicsubnet.vcndbashburn.oraclevcn.com
    Connecting to HammerDB Agent @ localhost:10000
    Testing Agent Connectivity...OK
    Metrics Connected
    Started CPU Metrics for Intel(R) Xeon(R) Gold 6354 CPU @ 3.00GHz:(2 CPUs)

・ トランザクション・カウンター状態確認
トランザクション・カウンターの状態は以下のコマンドで確認できます。

hammerdb>tcstatus
        Transaction Counter thread running with threadid:tid0x7f52121fc700

        Vuser 1:End Snapshot 16 taken at 04 JUN 2022 15:44 of instance cdb1 (**1) of database CDB (502337279)
        Vuser 1:Test complete: view report from SNAPID 15 to 16
        Vuser 1:8 Active Virtual Users configured
        Vuser 1:TEST RESULT : System achieved 51752 NOPM from 104540 Oracle TPM
        Vuser 5:FINISHED SUCCESS
        Vuser 1:FINISHED SUCCESS
        Vuser 8:FINISHED SUCCESS
        Vuser 9:FINISHED SUCCESS
        Vuser 6:FINISHED SUCCESS
        Vuser 7:FINISHED SUCCESS
        Vuser 2:FINISHED SUCCESS
        Vuser 4:FINISHED SUCCESS
        Vuser 3:FINISHED SUCCESS
        ALL VIRTUAL USERS COMPLETE
        75240 Oracle tpm

・ ワークロード実行
vurun コマンドを使用してワークロードを開始します。

hammerdb>vurun
    Vuser 1:RUNNING
    Vuser 1:DBVersion:23.0.0.0.0
    Vuser 1:Beginning rampup time of 1 minutes
    Vuser 2:RUNNING
    Vuser 2:Processing 10000000 transactions with output suppressed...
    Vuser 3:RUNNING
    Vuser 3:Processing 10000000 transactions with output suppressed...
    Vuser 4:RUNNING
    Vuser 4:Processing 10000000 transactions with output suppressed...
    Vuser 5:RUNNING
    Vuser 5:Processing 10000000 transactions with output suppressed...
    Vuser 6:RUNNING
    Vuser 6:Processing 10000000 transactions with output suppressed...
    Vuser 7:RUNNING
    Vuser 8:RUNNING
    CPU all usr%-0.00 sys%-0.00 irq%-0.00 idle%-97.45
    Vuser 9:RUNNING
    Vuser 9:Processing 10000000 transactions with output suppressed...
    Vuser 10:RUNNING
    Vuser 7:Processing 10000000 transactions with output suppressed...
    Vuser 8:Processing 10000000 transactions with output suppressed...
    Vuser 10:Processing 10000000 transactions with output suppressed...
    Vuser 11:RUNNING
    Vuser 11:Processing 10000000 transactions with output suppressed...
    Vuser 12:RUNNING
    Vuser 12:Processing 10000000 transactions with output suppressed...
    Vuser 13:RUNNING
    Vuser 13:Processing 10000000 transactions with output suppressed...
    Vuser 14:RUNNING
    Vuser 14:Processing 10000000 transactions with output suppressed...
    Vuser 15:RUNNING
    Vuser 15:Processing 10000000 transactions with output suppressed...
    Vuser 16:RUNNING
    Vuser 16:Processing 10000000 transactions with output suppressed...
    Vuser 17:RUNNING
    Vuser 17:Processing 10000000 transactions with output suppressed...
    0 Oracle tpm
    CPU all usr%-3.59 sys%-1.26 irq%-0.00 idle%-93.44
    16866 Oracle tpm
    CPU all usr%-3.91 sys%-1.49 irq%-0.00 idle%-92.09
    35784 Oracle tpm
    CPU all usr%-5.23 sys%-2.16 irq%-0.00 idle%-89.06
    63108 Oracle tpm
    CPU all usr%-4.17 sys%-2.16 irq%-0.00 idle%-88.86
    42996 Oracle tpm
    CPU all usr%-4.39 sys%-2.13 irq%-0.00 idle%-89.52
    68784 Oracle tpm
    Vuser 1:Rampup 1 minutes complete ...
    Vuser 1:Rampup complete, Taking start AWR snapshot.
    CPU all usr%-5.05 sys%-2.42 irq%-0.00 idle%-89.61
    34296 Oracle tpm
    CPU all usr%-7.54 sys%-3.51 irq%-0.00 idle%-84.06
    Vuser 1:Start Snapshot 9 taken at 02 SEP 2025 12:04 of instance CDB2 (**2) of database CDB (971190190)
    Vuser 1:Timing test period of 3 in minutes
    75924 Oracle tpm
    CPU all usr%-3.59 sys%-1.40 irq%-0.00 idle%-91.42
    44646 Oracle tpm
    CPU all usr%-7.79 sys%-3.59 irq%-0.29 idle%-83.73
    113574 Oracle tpm
    CPU all usr%-7.52 sys%-3.59 irq%-0.00 idle%-80.93
    83172 Oracle tpm
    CPU all usr%-6.49 sys%-2.95 irq%-0.00 idle%-87.38
    45156 Oracle tpm
    CPU all usr%-5.97 sys%-2.70 irq%-0.00 idle%-88.43
    61590 Oracle tpm
    CPU all usr%-5.92 sys%-2.77 irq%-0.00 idle%-86.00
    Vuser 1:1 ...,
    57216 Oracle tpm
    CPU all usr%-6.92 sys%-2.87 irq%-0.29 idle%-86.99
    102750 Oracle tpm
    CPU all usr%-9.42 sys%-4.43 irq%-0.00 idle%-81.32
    124782 Oracle tpm
    CPU all usr%-7.08 sys%-3.03 irq%-0.00 idle%-83.84
    49992 Oracle tpm
    CPU all usr%-7.88 sys%-3.38 irq%-0.00 idle%-84.20
    64110 Oracle tpm
    CPU all usr%-5.42 sys%-2.55 irq%-0.29 idle%-88.71
    39696 Oracle tpm
    CPU all usr%-6.10 sys%-2.61 irq%-0.25 idle%-88.12
    Vuser 1:2 ...,
    14910 Oracle tpm
    CPU all usr%-5.45 sys%-2.47 irq%-0.00 idle%-89.14
    64476 Oracle tpm
    CPU all usr%-3.69 sys%-2.00 irq%-0.00 idle%-87.87
    55818 Oracle tpm
    CPU all usr%-8.45 sys%-4.05 irq%-0.33 idle%-83.09
    109008 Oracle tpm
    CPU all usr%-9.43 sys%-4.00 irq%-0.33 idle%-82.36
    127848 Oracle tpm
    CPU all usr%-5.47 sys%-2.10 irq%-0.25 idle%-88.43
    162852 Oracle tpm
    CPU all usr%-9.77 sys%-4.56 irq%-0.33 idle%-80.70
    Vuser 1:3 ...,
    Vuser 1:Test complete, Taking end AWR snapshot.
    131766 Oracle tpm
    CPU all usr%-7.02 sys%-2.91 irq%-0.00 idle%-84.67
    111306 Oracle tpm
    CPU all usr%-8.57 sys%-3.95 irq%-0.00 idle%-83.41
    109212 Oracle tpm
    CPU all usr%-5.54 sys%-2.26 irq%-0.29 idle%-87.16
    103836 Oracle tpm
    CPU all usr%-8.25 sys%-3.59 irq%-0.00 idle%-83.43
    125472 Oracle tpm
    CPU all usr%-9.39 sys%-4.32 irq%-0.00 idle%-81.59
    Vuser 1:End Snapshot 10 taken at 02 SEP 2025 12:07 of instance CDB2 (**2) of database CDB (971190190)
    Vuser 1:Test complete: view report from SNAPID 9 to 10
    Vuser 1:16 Active Virtual Users configured
    Vuser 1:TEST RESULT : System achieved 129601 NOPM from 217794 Oracle TPM
    Vuser 1:FINISHED SUCCESS
    Vuser 15:FINISHED SUCCESS
    Vuser 16:FINISHED SUCCESS
    Vuser 11:FINISHED SUCCESS
    Vuser 4:FINISHED SUCCESS
    Vuser 10:FINISHED SUCCESS
    Vuser 3:FINISHED SUCCESS
    Benchmark Run jobid=68B6DD0D467C03E233934303
    hammerdb>Vuser 13:FINISHED SUCCESS
    87558 Oracle tpm
    Vuser 14:FINISHED SUCCESS
    Vuser 12:FINISHED SUCCESS
    Vuser 9:FINISHED SUCCESS
    Vuser 7:FINISHED SUCCESS
    Vuser 8:FINISHED SUCCESS
    CPU all usr%-2.47 sys%-1.16 irq%-0.00 idle%-93.39
    Vuser 2:FINISHED SUCCESS
    Vuser 17:FINISHED SUCCESS
    Vuser 5:FINISHED SUCCESS
    Vuser 6:FINISHED SUCCESS
    ALL VIRTUAL USERS COMPLETE

・ トランザクション カウンター停止
トランザクション カウンターは tcstop で停止できます。

hammerdb> tcstop

●カウンター停止

hammerdb>tcstop
    Transaction Counter thread running with threadid:tid0x7f8b4effd700
    Stopping Transaction Counter

● メトリック停止

hammerdb>metstop
    Stopping Metrics Agent and Display on localhost:10000

● Log確認

[opc@client-inst admin]$ cat /tmp/hammerdb_68B6DC11377803E213931333.log
Hammerdb Log @ Tue Sep 02 11:59:13 GMT 2025
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Timestamp 1 @ Tue Sep 02 12:03:25 GMT 2025
Vuser 1:DBVersion:23.0.0.0.0
Timestamp 1 @ Tue Sep 02 12:03:25 GMT 2025
Vuser 1:Beginning rampup time of 1 minutes
Timestamp 2 @ Tue Sep 02 12:03:25 GMT 2025
Vuser 2:Processing 10000000 transactions with output suppressed...
Timestamp 3 @ Tue Sep 02 12:03:26 GMT 2025
Vuser 3:Processing 10000000 transactions with output suppressed...
Timestamp 4 @ Tue Sep 02 12:03:26 GMT 2025
Vuser 4:Processing 10000000 transactions with output suppressed...
Timestamp 5 @ Tue Sep 02 12:03:27 GMT 2025
Vuser 5:Processing 10000000 transactions with output suppressed...
Timestamp 6 @ Tue Sep 02 12:03:27 GMT 2025
Vuser 6:Processing 10000000 transactions with output suppressed...
Timestamp 9 @ Tue Sep 02 12:03:29 GMT 2025
Vuser 9:Processing 10000000 transactions with output suppressed...
Timestamp 7 @ Tue Sep 02 12:03:29 GMT 2025
Vuser 7:Processing 10000000 transactions with output suppressed...
Timestamp 8 @ Tue Sep 02 12:03:29 GMT 2025
Vuser 8:Processing 10000000 transactions with output suppressed...
Timestamp 10 @ Tue Sep 02 12:03:29 GMT 2025
Vuser 10:Processing 10000000 transactions with output suppressed...
Timestamp 11 @ Tue Sep 02 12:03:30 GMT 2025
Vuser 11:Processing 10000000 transactions with output suppressed...
Timestamp 12 @ Tue Sep 02 12:03:30 GMT 2025
Vuser 12:Processing 10000000 transactions with output suppressed...
Timestamp 13 @ Tue Sep 02 12:03:31 GMT 2025
Vuser 13:Processing 10000000 transactions with output suppressed...
Timestamp 14 @ Tue Sep 02 12:03:31 GMT 2025
Vuser 14:Processing 10000000 transactions with output suppressed...
Timestamp 15 @ Tue Sep 02 12:03:32 GMT 2025
Vuser 15:Processing 10000000 transactions with output suppressed...
Timestamp 16 @ Tue Sep 02 12:03:32 GMT 2025
Vuser 16:Processing 10000000 transactions with output suppressed...
Timestamp 17 @ Tue Sep 02 12:03:33 GMT 2025
Vuser 17:Processing 10000000 transactions with output suppressed...
Timestamp 1 @ Tue Sep 02 12:04:25 GMT 2025
Vuser 1:Rampup 1 minutes complete ...
Timestamp 1 @ Tue Sep 02 12:04:25 GMT 2025
Vuser 1:Rampup complete, Taking start AWR snapshot.
Timestamp 1 @ Tue Sep 02 12:04:39 GMT 2025
Vuser 1:Start Snapshot 9 taken at 02 SEP 2025 12:04 of instance CDB2 (**2) of database CDB (971190190)
Timestamp 1 @ Tue Sep 02 12:04:40 GMT 2025
Vuser 1:Timing test period of 3 in minutes
Timestamp 1 @ Tue Sep 02 12:05:40 GMT 2025
Vuser 1:1 ...,
Timestamp 1 @ Tue Sep 02 12:06:40 GMT 2025
Vuser 1:2 ...,
Timestamp 1 @ Tue Sep 02 12:07:40 GMT 2025
Vuser 1:3 ...,
Timestamp 1 @ Tue Sep 02 12:07:40 GMT 2025
Vuser 1:Test complete, Taking end AWR snapshot.
Timestamp 1 @ Tue Sep 02 12:08:31 GMT 2025
Vuser 1:End Snapshot 10 taken at 02 SEP 2025 12:07 of instance CDB2 (**2) of database CDB (971190190)
Timestamp 1 @ Tue Sep 02 12:08:31 GMT 2025
Vuser 1:Test complete: view report from SNAPID 9 to 10
Timestamp 1 @ Tue Sep 02 12:08:32 GMT 2025
Vuser 1:16 Active Virtual Users configured
Timestamp 1 @ Tue Sep 02 12:08:32 GMT 2025
Vuser 1:TEST RESULT : System achieved 129601 NOPM from 217794 Oracle TPM
Timestamp 1 @ Tue Sep 02 12:14:28 GMT 2025
Vuser 1:DBVersion:23.0.0.0.0
Timestamp 1 @ Tue Sep 02 12:14:28 GMT 2025
Vuser 1:Beginning rampup time of 1 minutes
Timestamp 2 @ Tue Sep 02 12:14:28 GMT 2025
Vuser 2:Processing 10000000 transactions with output suppressed...
Timestamp 3 @ Tue Sep 02 12:14:29 GMT 2025
Vuser 3:Processing 10000000 transactions with output suppressed...
Timestamp 4 @ Tue Sep 02 12:14:29 GMT 2025
Vuser 4:Processing 10000000 transactions with output suppressed...
Timestamp 5 @ Tue Sep 02 12:14:30 GMT 2025
Vuser 5:Processing 10000000 transactions with output suppressed...
Timestamp 6 @ Tue Sep 02 12:14:30 GMT 2025
Vuser 6:Processing 10000000 transactions with output suppressed...
Timestamp 7 @ Tue Sep 02 12:14:31 GMT 2025
Vuser 7:Processing 10000000 transactions with output suppressed...
Timestamp 8 @ Tue Sep 02 12:14:31 GMT 2025
Vuser 8:Processing 10000000 transactions with output suppressed...
Timestamp 9 @ Tue Sep 02 12:14:32 GMT 2025
Vuser 9:Processing 10000000 transactions with output suppressed...
Timestamp 10 @ Tue Sep 02 12:14:32 GMT 2025
Vuser 10:Processing 10000000 transactions with output suppressed...
Timestamp 11 @ Tue Sep 02 12:14:33 GMT 2025
Vuser 11:Processing 10000000 transactions with output suppressed...
Timestamp 12 @ Tue Sep 02 12:14:33 GMT 2025
Vuser 12:Processing 10000000 transactions with output suppressed...
Timestamp 13 @ Tue Sep 02 12:14:34 GMT 2025
Vuser 13:Processing 10000000 transactions with output suppressed...
Timestamp 14 @ Tue Sep 02 12:14:34 GMT 2025
Vuser 14:Processing 10000000 transactions with output suppressed...
Timestamp 15 @ Tue Sep 02 12:14:35 GMT 2025
Vuser 15:Processing 10000000 transactions with output suppressed...
Timestamp 16 @ Tue Sep 02 12:14:35 GMT 2025
Vuser 16:Processing 10000000 transactions with output suppressed...
Timestamp 17 @ Tue Sep 02 12:14:36 GMT 2025
Vuser 17:Processing 10000000 transactions with output suppressed...
Timestamp 1 @ Tue Sep 02 12:15:28 GMT 2025
Vuser 1:Rampup 1 minutes complete ...
Timestamp 1 @ Tue Sep 02 12:15:28 GMT 2025
Vuser 1:Rampup complete, Taking start AWR snapshot.
Timestamp 1 @ Tue Sep 02 12:15:42 GMT 2025
Vuser 1:Start Snapshot 11 taken at 02 SEP 2025 12:15 of instance CDB1 (**1) of database CDB (971190190)
Timestamp 1 @ Tue Sep 02 12:15:42 GMT 2025
Vuser 1:Timing test period of 3 in minutes
Timestamp 1 @ Tue Sep 02 12:16:42 GMT 2025
Vuser 1:1 ...,
Timestamp 1 @ Tue Sep 02 12:17:42 GMT 2025
Vuser 1:2 ...,
Timestamp 1 @ Tue Sep 02 12:18:42 GMT 2025
Vuser 1:3 ...,
Timestamp 1 @ Tue Sep 02 12:18:42 GMT 2025
Vuser 1:Test complete, Taking end AWR snapshot.
Timestamp 1 @ Tue Sep 02 12:19:13 GMT 2025
Vuser 1:End Snapshot 12 taken at 02 SEP 2025 12:18 of instance CDB1 (**1) of database CDB (971190190)
Timestamp 1 @ Tue Sep 02 12:19:13 GMT 2025
Vuser 1:Test complete: view report from SNAPID 11 to 12
Timestamp 1 @ Tue Sep 02 12:19:13 GMT 2025
Vuser 1:16 Active Virtual Users configured
Timestamp 1 @ Tue Sep 02 12:19:13 GMT 2025
Vuser 1:TEST RESULT : System achieved 95564 NOPM from 171397 Oracle TPM

■ 参考

HammerDB
HammerDB: Documents
CLI Commands
HammerDB CLI 101
Why both TPM and NOPM Performance Metrics?
Understanding the TPROC-C workload derived from TPC-C
How to understand TPC-C tpmC and TPROC-C NOPM and what is ‘good’ performance?

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?