HammerDB is an open source database benchmarking software that supports PostgreSQL, Microsoft SQL Server, IBM Db2, Oracle, MariaDB, and MySQL, as well as CLI, local GUI, and a web browser GUI. The benchmarks used by HammerDB, TPROC-C and TPROC-H, are based on the widely used TPC-C- and TPC-H benchmarks. Test results are reported in NOPM and TPM. The relevant metric for comparing two different databases is NOPM. NOPM is a derivative of the tpmC statistic derived from the TPC-C benchmark and represents the number of order transactions achieved per minute.
In this tutorial, we will use the HammerDB CloudTK-Image published by the TPC-Council, the developers of the TPC benchmark. This image already contains all the client libraries needed to connect to databases and also includes a GUI that can be accessed via web browser.
First Steps
Starting the Application
After downloading the container image, we start it and make sure it’s running:

The HammerDB GUI should now be accessible at http://:8080. Click on launcher and then click Submit to launch the application:


Creating a connection string and schema
The connection string can be configured in the menu under Benchmark Options -> TPROC-C -> Schema -> Options. This opens a window in which you can enter the required information. This information is, with a few minor variations, the same for all databases supported by HammerDB.

The schema is also configured in the same step. This is done by specifying the number of warehouses and virtual users who will place “orders” (transactions) on the warehouses. In our test, we will create 1,000 warehouses and 200 virtual users. The number should be adjusted to the test system. It is recommended to start with approximately 400 warehouses per server CPU socket. The ratio of warehouses to virtual users should be approximately 1:5. However, under no circumstances should more virtual users than warehouses be created, as this would lead to unrepresentative results due to lock contention.
Confirm the configuration with OK, double-click Build in the menu on the left, and then confirm with Yes.


The schema creation is finished as soon as a green check mark appears for each virtual user in the Status tab.

Schema check
To check the schema for errors, double-click Check and confirm with Yes.

If the verification was successful, you will receive the following output:

Driver script configuration
Once the schema has been created and successfully verified, the driver script can now be created. This is where the actual test run is configured.

The fields Oracle Service Name, System User, TPROC-C User, and TPROC-C User Password are automatically adopted from the previous settings. The value for Total Transactions per User is set to 1000000 by default and can be left as is.
The TPROC-C Driver Script should be run as a Timed Driver Script. To keep the test as simple as possible, only the Minutes of Rampup Time and Minutes for Test Duration fields should be adjusted. To obtain a representative result, the test run should last at least 15-20 minutes. Explanations and use cases for the other fields can be found in the Driver Script chapter of the official HammerDB documentation.
Once all values have been set, confirm with OK. The driver script is then loaded by double-clicking Load. Here you can also see how a connection string has now been created from the previous entries from the schema configuration.

Virtual user configuration
In the newly opened window, under Virtual Users-> Options, specify the number of created virtual users. The default values for the other parameters should be accepted. Click OK to confirm the configuration.

Double-clicking Create initiates the process of creating virtual users.

Once all virtual users have been created, the benchmark run can be started by double-clicking Run.

The test now runs for the previously specified duration. During this time, the transactions per user can be monitored.
When the run is complete, this is displayed in the Virtual User 1-MONITOR field along with the result.


The NOPM value can now be compared with that of another database.
